diff options
| author | Jason Evans <jasone@canonware.com> | 2016-06-02 18:11:35 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2016-06-06 03:42:24 (GMT) |
| commit | 7be2ebc23f0f145e095e7230d7d8a202b8dcc55e (patch) | |
| tree | be5cc1aaa67fc479f7cb2b7ac184753e4eb2816e /include | |
| parent | e28b43a739b841c0ca7b0c0e3faf46e40bfc4616 (diff) | |
| download | jemalloc-7be2ebc23f0f145e095e7230d7d8a202b8dcc55e.zip jemalloc-7be2ebc23f0f145e095e7230d7d8a202b8dcc55e.tar.gz jemalloc-7be2ebc23f0f145e095e7230d7d8a202b8dcc55e.tar.bz2 | |
Make tsd cleanup functions optional, remove noop cleanup functions.
Diffstat (limited to 'include')
| -rw-r--r-- | include/jemalloc/internal/jemalloc_internal.h.in | 4 | ||||
| -rw-r--r-- | include/jemalloc/internal/private_symbols.txt | 7 | ||||
| -rw-r--r-- | include/jemalloc/internal/rtree.h | 1 | ||||
| -rw-r--r-- | include/jemalloc/internal/tcache.h | 1 | ||||
| -rw-r--r-- | include/jemalloc/internal/tsd.h | 34 | ||||
| -rw-r--r-- | include/jemalloc/internal/witness.h | 1 |
6 files changed, 17 insertions, 31 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in index 176487e..5b809bf 100644 --- a/include/jemalloc/internal/jemalloc_internal.h.in +++ b/include/jemalloc/internal/jemalloc_internal.h.in @@ -455,13 +455,9 @@ arena_t *arena_init(tsdn_t *tsdn, unsigned ind); arena_tdata_t *arena_tdata_get_hard(tsd_t *tsd, unsigned ind); arena_t *arena_choose_hard(tsd_t *tsd, bool internal); void arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind); -void thread_allocated_cleanup(tsd_t *tsd); -void thread_deallocated_cleanup(tsd_t *tsd); void iarena_cleanup(tsd_t *tsd); void arena_cleanup(tsd_t *tsd); void arenas_tdata_cleanup(tsd_t *tsd); -void narenas_tdata_cleanup(tsd_t *tsd); -void arenas_tdata_bypass_cleanup(tsd_t *tsd); void jemalloc_prefork(void); void jemalloc_postfork_parent(void); void jemalloc_postfork_child(void); diff --git a/include/jemalloc/internal/private_symbols.txt b/include/jemalloc/internal/private_symbols.txt index be81d74..d4e5525 100644 --- a/include/jemalloc/internal/private_symbols.txt +++ b/include/jemalloc/internal/private_symbols.txt @@ -74,7 +74,6 @@ arena_tcache_fill_small arena_tdata_get arena_tdata_get_hard arenas -arenas_tdata_bypass_cleanup arenas_tdata_cleanup atomic_add_p atomic_add_u @@ -285,7 +284,6 @@ malloc_vsnprintf malloc_write mb_write narenas_auto -narenas_tdata_cleanup narenas_total_get ncpus nhbins @@ -410,7 +408,6 @@ rtree_elm_release rtree_elm_witness_access rtree_elm_witness_acquire rtree_elm_witness_release -rtree_elm_witnesses_cleanup rtree_elm_write rtree_elm_write_acquired rtree_new @@ -451,7 +448,6 @@ tcache_cleanup tcache_create tcache_dalloc_large tcache_dalloc_small -tcache_enabled_cleanup tcache_enabled_get tcache_enabled_set tcache_event @@ -467,8 +463,6 @@ tcaches_create tcaches_destroy tcaches_flush tcaches_get -thread_allocated_cleanup -thread_deallocated_cleanup ticker_copy ticker_init ticker_read @@ -539,7 +533,6 @@ tsdn_tsd witness_assert_lockless witness_assert_not_owner witness_assert_owner -witness_fork_cleanup witness_init witness_lock witness_lock_error diff --git a/include/jemalloc/internal/rtree.h b/include/jemalloc/internal/rtree.h index af52f9f..a47a79e 100644 --- a/include/jemalloc/internal/rtree.h +++ b/include/jemalloc/internal/rtree.h @@ -137,7 +137,6 @@ void rtree_elm_witness_access(tsdn_t *tsdn, const rtree_t *rtree, const rtree_elm_t *elm); void rtree_elm_witness_release(tsdn_t *tsdn, const rtree_t *rtree, const rtree_elm_t *elm); -void rtree_elm_witnesses_cleanup(tsd_t *tsd); #endif /* JEMALLOC_H_EXTERNS */ /******************************************************************************/ diff --git a/include/jemalloc/internal/tcache.h b/include/jemalloc/internal/tcache.h index e7606d6..933255c 100644 --- a/include/jemalloc/internal/tcache.h +++ b/include/jemalloc/internal/tcache.h @@ -143,7 +143,6 @@ void tcache_arena_reassociate(tsdn_t *tsdn, tcache_t *tcache, tcache_t *tcache_get_hard(tsd_t *tsd); tcache_t *tcache_create(tsdn_t *tsdn, arena_t *arena); void tcache_cleanup(tsd_t *tsd); -void tcache_enabled_cleanup(tsd_t *tsd); void tcache_stats_merge(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena); bool tcaches_create(tsdn_t *tsdn, unsigned *r_ind); void tcaches_flush(tsd_t *tsd, unsigned ind); diff --git a/include/jemalloc/internal/tsd.h b/include/jemalloc/internal/tsd.h index ca8915e..988edf5 100644 --- a/include/jemalloc/internal/tsd.h +++ b/include/jemalloc/internal/tsd.h @@ -561,20 +561,20 @@ struct tsd_init_head_s { #endif #define MALLOC_TSD \ -/* O(name, type) */ \ - O(tcache, tcache_t *) \ - O(thread_allocated, uint64_t) \ - O(thread_deallocated, uint64_t) \ - O(prof_tdata, prof_tdata_t *) \ - O(iarena, arena_t *) \ - O(arena, arena_t *) \ - O(arenas_tdata, arena_tdata_t *) \ - O(narenas_tdata, unsigned) \ - O(arenas_tdata_bypass, bool) \ - O(tcache_enabled, tcache_enabled_t) \ - O(witnesses, witness_list_t) \ - O(rtree_elm_witnesses, rtree_elm_witness_tsd_t) \ - O(witness_fork, bool) \ +/* O(name, type, cleanup) */ \ + O(tcache, tcache_t *, yes) \ + O(thread_allocated, uint64_t, no) \ + O(thread_deallocated, uint64_t, no) \ + O(prof_tdata, prof_tdata_t *, yes) \ + O(iarena, arena_t *, yes) \ + O(arena, arena_t *, yes) \ + O(arenas_tdata, arena_tdata_t *, yes) \ + O(narenas_tdata, unsigned, no) \ + O(arenas_tdata_bypass, bool, no) \ + O(tcache_enabled, tcache_enabled_t, no) \ + O(witnesses, witness_list_t, yes) \ + O(rtree_elm_witnesses, rtree_elm_witness_tsd_t,no) \ + O(witness_fork, bool, no) \ #define TSD_INITIALIZER { \ tsd_state_uninitialized, \ @@ -595,7 +595,7 @@ struct tsd_init_head_s { struct tsd_s { tsd_state_t state; -#define O(n, t) \ +#define O(n, t, c) \ t n; MALLOC_TSD #undef O @@ -642,7 +642,7 @@ malloc_tsd_protos(JEMALLOC_ATTR(unused), , tsd_t) tsd_t *tsd_fetch(void); tsdn_t *tsd_tsdn(tsd_t *tsd); bool tsd_nominal(tsd_t *tsd); -#define O(n, t) \ +#define O(n, t, c) \ t *tsd_##n##p_get(tsd_t *tsd); \ t tsd_##n##_get(tsd_t *tsd); \ void tsd_##n##_set(tsd_t *tsd, t n); @@ -691,7 +691,7 @@ tsd_nominal(tsd_t *tsd) return (tsd->state == tsd_state_nominal); } -#define O(n, t) \ +#define O(n, t, c) \ JEMALLOC_ALWAYS_INLINE t * \ tsd_##n##p_get(tsd_t *tsd) \ { \ diff --git a/include/jemalloc/internal/witness.h b/include/jemalloc/internal/witness.h index e2f8563..9a2a676 100644 --- a/include/jemalloc/internal/witness.h +++ b/include/jemalloc/internal/witness.h @@ -103,7 +103,6 @@ void witness_lockless_error(const witness_list_t *witnesses); #endif void witnesses_cleanup(tsd_t *tsd); -void witness_fork_cleanup(tsd_t *tsd); void witness_prefork(tsd_t *tsd); void witness_postfork_parent(tsd_t *tsd); void witness_postfork_child(tsd_t *tsd); |
