From 7a27a05940d8eb0afc6ddbe32b420ce9e1452b91 Mon Sep 17 00:00:00 2001 From: Yinan Zhang Date: Thu, 26 Dec 2019 15:28:04 -0800 Subject: [PATCH] Delete tdata states used for cleanup --- include/jemalloc/internal/prof_inlines_b.h | 2 +- include/jemalloc/internal/prof_types.h | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/jemalloc/internal/prof_inlines_b.h b/include/jemalloc/internal/prof_inlines_b.h index 193ede71..186446bb 100644 --- a/include/jemalloc/internal/prof_inlines_b.h +++ b/include/jemalloc/internal/prof_inlines_b.h @@ -88,7 +88,7 @@ prof_sample_accum_update(tsd_t *tsd, size_t usize, bool update) { } prof_tdata_t *tdata = prof_tdata_get(tsd, true); - if (unlikely((uintptr_t)tdata <= (uintptr_t)PROF_TDATA_STATE_MAX)) { + if (unlikely(tdata == NULL)) { return true; } diff --git a/include/jemalloc/internal/prof_types.h b/include/jemalloc/internal/prof_types.h index 7a34385b..ad095da3 100644 --- a/include/jemalloc/internal/prof_types.h +++ b/include/jemalloc/internal/prof_types.h @@ -46,14 +46,6 @@ typedef struct prof_tdata_s prof_tdata_t; */ #define PROF_NTDATA_LOCKS 256 -/* - * prof_tdata pointers close to NULL are used to encode state information that - * is used for cleaning up during thread shutdown. - */ -#define PROF_TDATA_STATE_REINCARNATED ((prof_tdata_t *)(uintptr_t)1) -#define PROF_TDATA_STATE_PURGATORY ((prof_tdata_t *)(uintptr_t)2) -#define PROF_TDATA_STATE_MAX PROF_TDATA_STATE_PURGATORY - /* Minimize memory bloat for non-prof builds. */ #ifdef JEMALLOC_PROF #define PROF_DUMP_FILENAME_LEN (PATH_MAX + 1)