From de9ad1450b09a09732195a1e66c0321d8b077d1e Mon Sep 17 00:00:00 2001 From: Slobodan Predolac Date: Tue, 2 Jun 2026 14:26:23 -0700 Subject: [PATCH] Drop the jemalloc_internal_includes.h umbrella Convert the production source files in src/ (69 .c/.cpp) and test/jemalloc_test.h.in to list the headers they actually use, then delete the umbrella. Three consolidated headers (peak_event.h, prof_sys.h, sz.h) also gain explicit transitive includes. Every translation unit now declares what it uses. A missing include now fails at the failing file rather than silently working because something upstream pulled in the world. --- .../internal/jemalloc_internal_includes.h | 70 ------------------- include/jemalloc/internal/peak_event.h | 1 + include/jemalloc/internal/prof_sys.h | 1 + include/jemalloc/internal/sz.h | 1 + src/arena.c | 17 ++++- src/arenas_management.c | 8 ++- src/background_thread.c | 13 +++- src/base.c | 4 +- src/bin.c | 3 +- src/bin_info.c | 2 +- src/bitmap.c | 2 +- src/buf_writer.c | 3 +- src/cache_bin.c | 4 +- src/ckh.c | 4 +- src/conf.c | 10 +-- src/counter.c | 2 +- src/ctl.c | 13 +++- src/decay.c | 1 - src/ecache.c | 6 +- src/edata.c | 3 +- src/edata_cache.c | 4 +- src/ehooks.c | 8 ++- src/emap.c | 2 +- src/eset.c | 1 - src/exp_grow.c | 3 +- src/extent.c | 12 +++- src/extent_dss.c | 5 +- src/extent_mmap.c | 2 +- src/fxp.c | 2 +- src/hpa.c | 6 +- src/hpa_central.c | 3 +- src/hpa_hooks.c | 3 +- src/hpa_utils.c | 2 +- src/hpdata.c | 1 - src/inspect.c | 6 +- src/jemalloc.c | 18 ++--- src/jemalloc_cpp.cpp | 8 ++- src/jemalloc_fork.c | 8 ++- src/jemalloc_init.c | 11 ++- src/large.c | 8 ++- src/log.c | 1 - src/malloc_dispatch.c | 10 ++- src/malloc_io.c | 1 - src/mutex.c | 2 +- src/nstime.c | 4 +- src/pa.c | 4 +- src/pa_extra.c | 3 +- src/pac.c | 5 +- src/pages.c | 9 +-- src/peak_event.c | 5 +- src/prof.c | 11 +-- src/prof_data.c | 9 ++- src/prof_log.c | 6 +- src/prof_recent.c | 5 +- src/prof_stack_range.c | 1 - src/prof_stats.c | 3 +- src/prof_sys.c | 6 +- src/psset.c | 5 +- src/rtree.c | 2 +- src/safety_check.c | 4 +- src/san.c | 3 +- src/san_bump.c | 9 +-- src/sec.c | 4 +- src/stats.c | 8 ++- src/sz.c | 2 +- src/tcache.c | 16 ++++- src/thread_event.c | 7 +- src/thread_event_registry.c | 11 +-- src/ticker.c | 3 +- src/tsd.c | 12 +++- src/util.c | 2 +- src/witness.c | 2 +- src/zone.c | 6 +- test/include/test/jemalloc_test.h.in | 32 ++++++++- 74 files changed, 304 insertions(+), 190 deletions(-) delete mode 100644 include/jemalloc/internal/jemalloc_internal_includes.h diff --git a/include/jemalloc/internal/jemalloc_internal_includes.h b/include/jemalloc/internal/jemalloc_internal_includes.h deleted file mode 100644 index ede482a8..00000000 --- a/include/jemalloc/internal/jemalloc_internal_includes.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef JEMALLOC_INTERNAL_INCLUDES_H -#define JEMALLOC_INTERNAL_INCLUDES_H - -/* - * jemalloc can conceptually be broken into components (arena, tcache, etc.), - * but there are circular dependencies that cannot be broken without - * substantial performance degradation. - * - * Historically, we dealt with this by each header into four sections (types, - * structs, externs, and inlines), and included each header file multiple times - * in this file, picking out the portion we want on each pass using the - * following #defines: - * JEMALLOC_H_TYPES : Preprocessor-defined constants and pseudo-opaque data - * types. - * JEMALLOC_H_STRUCTS : Data structures. - * JEMALLOC_H_EXTERNS : Extern data declarations and function prototypes. - * JEMALLOC_H_INLINES : Inline functions. - * - * We're moving toward a world in which the dependencies are explicit; each file - * will #include the headers it depends on (rather than relying on them being - * implicitly available via this file including every header file in the - * project). - * - * We're now in an intermediate state: we've broken up the header files to avoid - * having to include each one multiple times, but have not yet moved the - * dependency information into the header files (i.e. we still rely on the - * ordering in this file to ensure all a header's dependencies are available in - * its translation unit). Each component is now broken up into multiple header - * files, corresponding to the sections above (e.g. instead of "foo.h", we now - * have "foo_types.h", "foo_structs.h", "foo_externs.h", "foo_inlines.h"). - * - * Those files which have been converted to explicitly include their - * inter-component dependencies are now in the initial HERMETIC HEADERS - * section. All headers may still rely on jemalloc_preamble.h (which, by fiat, - * must be included first in every translation unit) for system headers and - * global jemalloc definitions, however. - */ - -#include "jemalloc/internal/arena.h" - -/******************************************************************************/ -/* EXTERNS */ -/******************************************************************************/ - -#include "jemalloc/internal/jemalloc_internal_externs.h" -#include "jemalloc/internal/large.h" -#include "jemalloc/internal/tcache.h" -#include "jemalloc/internal/malloc_dispatch.h" -#include "jemalloc/internal/prof.h" -#include "jemalloc/internal/background_thread.h" - -/******************************************************************************/ -/* INLINES */ -/******************************************************************************/ - -#include "jemalloc/internal/jemalloc_internal_inlines_a.h" -/* - * Include portions of arena code interleaved with tcache code in order to - * resolve circular dependencies. - */ -#include "jemalloc/internal/arena_inlines_a.h" -#include "jemalloc/internal/jemalloc_internal_inlines_b.h" -#include "jemalloc/internal/tcache_inlines.h" -#include "jemalloc/internal/arena_inlines_b.h" -#include "jemalloc/internal/malloc_dispatch_inlines.h" -#include "jemalloc/internal/jemalloc_internal_inlines_c.h" -#include "jemalloc/internal/prof_inlines.h" -#include "jemalloc/internal/background_thread_inlines.h" - -#endif /* JEMALLOC_INTERNAL_INCLUDES_H */ diff --git a/include/jemalloc/internal/peak_event.h b/include/jemalloc/internal/peak_event.h index 0d1f1627..67e7a71b 100644 --- a/include/jemalloc/internal/peak_event.h +++ b/include/jemalloc/internal/peak_event.h @@ -2,6 +2,7 @@ #define JEMALLOC_INTERNAL_PEAK_EVENT_H #include "jemalloc/internal/jemalloc_preamble.h" +#include "jemalloc/internal/thread_event_registry.h" #include "jemalloc/internal/tsd_types.h" /* diff --git a/include/jemalloc/internal/prof_sys.h b/include/jemalloc/internal/prof_sys.h index 0745b991..e671a47c 100644 --- a/include/jemalloc/internal/prof_sys.h +++ b/include/jemalloc/internal/prof_sys.h @@ -4,6 +4,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/base.h" #include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/prof.h" extern malloc_mutex_t prof_dump_filename_mtx; extern base_t *prof_base; diff --git a/include/jemalloc/internal/sz.h b/include/jemalloc/internal/sz.h index 3ee8a6b3..0e7b029e 100644 --- a/include/jemalloc/internal/sz.h +++ b/include/jemalloc/internal/sz.h @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/bit_util.h" +#include "jemalloc/internal/jemalloc_internal_externs.h" #include "jemalloc/internal/pages.h" #include "jemalloc/internal/sc.h" #include "jemalloc/internal/util.h" diff --git a/src/arena.c b/src/arena.c index e8d90458..21d52a8c 100644 --- a/src/arena.c +++ b/src/arena.c @@ -1,16 +1,29 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/arena_inlines_a.h" +#include "jemalloc/internal/arena_inlines_b.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/background_thread.h" +#include "jemalloc/internal/background_thread_inlines.h" +#include "jemalloc/internal/bin_inlines.h" #include "jemalloc/internal/decay.h" #include "jemalloc/internal/ehooks.h" #include "jemalloc/internal/extent_dss.h" #include "jemalloc/internal/extent_mmap.h" -#include "jemalloc/internal/san.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_b.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" +#include "jemalloc/internal/large.h" #include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/prof_inlines.h" #include "jemalloc/internal/rtree.h" #include "jemalloc/internal/safety_check.h" +#include "jemalloc/internal/san.h" +#include "jemalloc/internal/tcache.h" #include "jemalloc/internal/util.h" +#include "jemalloc/internal/witness.h" JEMALLOC_DIAGNOSTIC_DISABLE_SPURIOUS diff --git a/src/arenas_management.c b/src/arenas_management.c index 261557b6..e4d2aa75 100644 --- a/src/arenas_management.c +++ b/src/arenas_management.c @@ -1,11 +1,17 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/arenas_management.h" +#include "jemalloc/internal/background_thread.h" +#include "jemalloc/internal/background_thread_inlines.h" #include "jemalloc/internal/jemalloc_init.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_b.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" #include "jemalloc/internal/malloc_io.h" #include "jemalloc/internal/mutex.h" #include "jemalloc/internal/sz.h" +#include "jemalloc/internal/tcache.h" JEMALLOC_ALIGNED(CACHELINE) atomic_p_t arenas[MALLOCX_ARENA_LIMIT]; diff --git a/src/background_thread.c b/src/background_thread.c index 4901856a..fbb8ea24 100644 --- a/src/background_thread.c +++ b/src/background_thread.c @@ -1,7 +1,18 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/arenas_management.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/background_thread.h" +#include "jemalloc/internal/background_thread_inlines.h" +#include "jemalloc/internal/ctl.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_b.h" +#include "jemalloc/internal/malloc_io.h" +#include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/tcache.h" +#include "jemalloc/internal/witness.h" JEMALLOC_DIAGNOSTIC_DISABLE_SPURIOUS diff --git a/src/base.c b/src/base.c index 76227a5e..0ac658b7 100644 --- a/src/base.c +++ b/src/base.c @@ -1,7 +1,9 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/base.h" +#include "jemalloc/internal/ehooks.h" #include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/mutex.h" #include "jemalloc/internal/sz.h" diff --git a/src/bin.c b/src/bin.c index 30a78aba..ac17f16a 100644 --- a/src/bin.c +++ b/src/bin.c @@ -1,6 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/arena_inlines_b.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/bin.h" #include "jemalloc/internal/sc.h" diff --git a/src/bin_info.c b/src/bin_info.c index e10042fd..0b8e551a 100644 --- a/src/bin_info.c +++ b/src/bin_info.c @@ -1,6 +1,6 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" #include "jemalloc/internal/bin_info.h" bin_info_t bin_infos[SC_NBINS]; diff --git a/src/bitmap.c b/src/bitmap.c index 8ac81a67..c399a05c 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -1,7 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/bitmap.h" /******************************************************************************/ diff --git a/src/buf_writer.c b/src/buf_writer.c index 3c298502..48b94100 100644 --- a/src/buf_writer.c +++ b/src/buf_writer.c @@ -1,7 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/buf_writer.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" #include "jemalloc/internal/malloc_io.h" static void * diff --git a/src/cache_bin.c b/src/cache_bin.c index d12ce05f..5c7601ce 100644 --- a/src/cache_bin.c +++ b/src/cache_bin.c @@ -1,9 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" -#include "jemalloc/internal/bit_util.h" +#include "jemalloc/internal/base.h" #include "jemalloc/internal/cache_bin.h" -#include "jemalloc/internal/safety_check.h" const uintptr_t disabled_bin = JUNK_ADDR; diff --git a/src/ckh.c b/src/ckh.c index 80688162..4c61c060 100644 --- a/src/ckh.c +++ b/src/ckh.c @@ -38,10 +38,10 @@ #include "jemalloc/internal/ckh.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" - +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/hash.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" #include "jemalloc/internal/malloc_io.h" #include "jemalloc/internal/prng.h" #include "jemalloc/internal/util.h" diff --git a/src/conf.c b/src/conf.c index ecef73f5..85c4ff9f 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1,8 +1,11 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/atomic.h" +#include "jemalloc/internal/background_thread.h" +#include "jemalloc/internal/conf.h" +#include "jemalloc/internal/extent.h" #include "jemalloc/internal/extent_dss.h" #include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/fxp.h" @@ -10,13 +13,12 @@ #include "jemalloc/internal/malloc_io.h" #include "jemalloc/internal/mutex.h" #include "jemalloc/internal/nstime.h" -#include "jemalloc/internal/safety_check.h" +#include "jemalloc/internal/prof.h" #include "jemalloc/internal/san.h" #include "jemalloc/internal/sc.h" +#include "jemalloc/internal/tcache.h" #include "jemalloc/internal/util.h" -#include "jemalloc/internal/conf.h" - /* Whether encountered any invalid config options. */ bool had_conf_error; diff --git a/src/counter.c b/src/counter.c index 8257a062..243c41ba 100644 --- a/src/counter.c +++ b/src/counter.c @@ -1,7 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/counter.h" +#include "jemalloc/internal/witness.h" bool counter_accum_init(counter_accum_t *counter, uint64_t interval) { diff --git a/src/ctl.c b/src/ctl.c index d39b5a08..9d96f5fc 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -1,22 +1,31 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/arena_inlines_b.h" +#include "jemalloc/internal/arenas_management.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/background_thread.h" +#include "jemalloc/internal/background_thread_inlines.h" #include "jemalloc/internal/ctl.h" #include "jemalloc/internal/extent_dss.h" #include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/inspect.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_b.h" #include "jemalloc/internal/mutex.h" #include "jemalloc/internal/nstime.h" #include "jemalloc/internal/peak_event.h" +#include "jemalloc/internal/prof.h" #include "jemalloc/internal/prof_data.h" #include "jemalloc/internal/prof_log.h" #include "jemalloc/internal/prof_recent.h" #include "jemalloc/internal/prof_stats.h" #include "jemalloc/internal/prof_sys.h" -#include "jemalloc/internal/safety_check.h" #include "jemalloc/internal/sc.h" +#include "jemalloc/internal/tcache.h" +#include "jemalloc/internal/tcache_inlines.h" #include "jemalloc/internal/util.h" +#include "jemalloc/internal/witness.h" /******************************************************************************/ /* Data. */ diff --git a/src/decay.c b/src/decay.c index 7bbce2a6..1ed23bcb 100644 --- a/src/decay.c +++ b/src/decay.c @@ -1,5 +1,4 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/decay.h" diff --git a/src/ecache.c b/src/ecache.c index 20fcee9e..e6620a8a 100644 --- a/src/ecache.c +++ b/src/ecache.c @@ -1,7 +1,9 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" -#include "jemalloc/internal/san.h" +#include "jemalloc/internal/ecache.h" +#include "jemalloc/internal/eset.h" +#include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/witness.h" bool ecache_init(tsdn_t *tsdn, ecache_t *ecache, extent_state_t state, unsigned ind, diff --git a/src/edata.c b/src/edata.c index d71d1679..575e4c86 100644 --- a/src/edata.c +++ b/src/edata.c @@ -1,5 +1,6 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" + +#include "jemalloc/internal/edata.h" ph_gen(, edata_avail, edata_t, avail_link, edata_esnead_comp) ph_gen(, edata_heap, edata_t, heap_link, edata_snad_comp) diff --git a/src/edata_cache.c b/src/edata_cache.c index 3ac8273a..68a399da 100644 --- a/src/edata_cache.c +++ b/src/edata_cache.c @@ -1,5 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" + +#include "jemalloc/internal/edata_cache.h" +#include "jemalloc/internal/witness.h" bool edata_cache_init(edata_cache_t *edata_cache, base_t *base) { diff --git a/src/ehooks.c b/src/ehooks.c index d7abb960..bd9a8ac6 100644 --- a/src/ehooks.c +++ b/src/ehooks.c @@ -1,8 +1,14 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/base.h" +#include "jemalloc/internal/edata.h" #include "jemalloc/internal/ehooks.h" +#include "jemalloc/internal/emap.h" +#include "jemalloc/internal/extent.h" +#include "jemalloc/internal/extent_dss.h" #include "jemalloc/internal/extent_mmap.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" void ehooks_init(ehooks_t *ehooks, extent_hooks_t *extent_hooks, unsigned ind) { diff --git a/src/emap.c b/src/emap.c index c9a371d2..c6936f8a 100644 --- a/src/emap.c +++ b/src/emap.c @@ -1,7 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/emap.h" +#include "jemalloc/internal/extent.h" enum emap_lock_result_e { emap_lock_result_success, diff --git a/src/eset.c b/src/eset.c index bdce1834..4d1f8f04 100644 --- a/src/eset.c +++ b/src/eset.c @@ -1,5 +1,4 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/eset.h" diff --git a/src/exp_grow.c b/src/exp_grow.c index 955823a1..17699561 100644 --- a/src/exp_grow.c +++ b/src/exp_grow.c @@ -1,5 +1,6 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" + +#include "jemalloc/internal/exp_grow.h" void exp_grow_init(exp_grow_t *exp_grow) { diff --git a/src/extent.c b/src/extent.c index cf935c18..0a85d588 100644 --- a/src/extent.c +++ b/src/extent.c @@ -1,12 +1,20 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/background_thread.h" +#include "jemalloc/internal/background_thread_inlines.h" +#include "jemalloc/internal/edata_cache.h" #include "jemalloc/internal/emap.h" +#include "jemalloc/internal/extent.h" #include "jemalloc/internal/extent_dss.h" #include "jemalloc/internal/extent_mmap.h" -#include "jemalloc/internal/ph.h" #include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/pac.h" +#include "jemalloc/internal/ph.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/prof_inlines.h" +#include "jemalloc/internal/witness.h" /******************************************************************************/ /* Data. */ diff --git a/src/extent_dss.c b/src/extent_dss.c index 8fac71a7..2caac9d7 100644 --- a/src/extent_dss.c +++ b/src/extent_dss.c @@ -1,7 +1,10 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/arena_inlines_a.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/edata_cache.h" +#include "jemalloc/internal/extent.h" #include "jemalloc/internal/extent_dss.h" #include "jemalloc/internal/spin.h" diff --git a/src/extent_mmap.c b/src/extent_mmap.c index d39bddc6..10574618 100644 --- a/src/extent_mmap.c +++ b/src/extent_mmap.c @@ -1,8 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/extent_mmap.h" +#include "jemalloc/internal/pages.h" /******************************************************************************/ /* Data. */ diff --git a/src/fxp.c b/src/fxp.c index faeab207..ff3de54e 100644 --- a/src/fxp.c +++ b/src/fxp.c @@ -1,7 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/fxp.h" +#include "jemalloc/internal/malloc_io.h" static bool fxp_isdigit(char c) { diff --git a/src/hpa.c b/src/hpa.c index d59b7fc7..e35ab49a 100644 --- a/src/hpa.c +++ b/src/hpa.c @@ -1,12 +1,10 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/background_thread.h" #include "jemalloc/internal/hpa.h" #include "jemalloc/internal/hpa_utils.h" - -#include "jemalloc/internal/fb.h" -#include "jemalloc/internal/witness.h" #include "jemalloc/internal/jemalloc_probe.h" +#include "jemalloc/internal/witness.h" static void hpa_dalloc_batch(tsdn_t *tsdn, hpa_shard_t *shard, edata_list_active_t *list, bool *deferred_work_generated); diff --git a/src/hpa_central.c b/src/hpa_central.c index b4f770c2..09765459 100644 --- a/src/hpa_central.c +++ b/src/hpa_central.c @@ -1,8 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/hpa.h" #include "jemalloc/internal/hpa_central.h" -#include "jemalloc/internal/tsd.h" #include "jemalloc/internal/witness.h" #define HPA_EDEN_SIZE (128 * HUGEPAGE) diff --git a/src/hpa_hooks.c b/src/hpa_hooks.c index 2ec7029d..1c292732 100644 --- a/src/hpa_hooks.c +++ b/src/hpa_hooks.c @@ -1,8 +1,9 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/hpa_hooks.h" #include "jemalloc/internal/jemalloc_probe.h" +#include "jemalloc/internal/nstime.h" +#include "jemalloc/internal/pages.h" static void *hpa_hooks_map(size_t size); static void hpa_hooks_unmap(void *ptr, size_t size); diff --git a/src/hpa_utils.c b/src/hpa_utils.c index 59bb0d1f..02817d83 100644 --- a/src/hpa_utils.c +++ b/src/hpa_utils.c @@ -1,7 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/hpa_utils.h" +#include "jemalloc/internal/hpdata.h" void hpa_purge_batch(hpa_hooks_t *hooks, hpa_purge_item_t *batch, size_t batch_sz) { diff --git a/src/hpdata.c b/src/hpdata.c index a538a422..1da4ffa0 100644 --- a/src/hpdata.c +++ b/src/hpdata.c @@ -1,5 +1,4 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/hpdata.h" diff --git a/src/inspect.c b/src/inspect.c index f46bc9ef..1c533c5c 100644 --- a/src/inspect.c +++ b/src/inspect.c @@ -1,5 +1,9 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" + +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/bin_info.h" +#include "jemalloc/internal/edata.h" +#include "jemalloc/internal/emap.h" #include "jemalloc/internal/inspect.h" void diff --git a/src/jemalloc.c b/src/jemalloc.c index 028eca86..ad651f48 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -1,32 +1,34 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/arenas_management.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/atomic.h" +#include "jemalloc/internal/background_thread.h" #include "jemalloc/internal/buf_writer.h" #include "jemalloc/internal/ctl.h" #include "jemalloc/internal/emap.h" #include "jemalloc/internal/extent_dss.h" -#include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/fxp.h" -#include "jemalloc/internal/san.h" #include "jemalloc/internal/jemalloc_init.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_b.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" #include "jemalloc/internal/jemalloc_internal_types.h" +#include "jemalloc/internal/large.h" #include "jemalloc/internal/log.h" #include "jemalloc/internal/malloc_io.h" #include "jemalloc/internal/mutex.h" -#include "jemalloc/internal/nstime.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/prof_inlines.h" #include "jemalloc/internal/rtree.h" #include "jemalloc/internal/safety_check.h" #include "jemalloc/internal/sc.h" -#include "jemalloc/internal/spin.h" #include "jemalloc/internal/sz.h" -#include "jemalloc/internal/ticker.h" +#include "jemalloc/internal/tcache.h" #include "jemalloc/internal/thread_event.h" #include "jemalloc/internal/util.h" - -#include "jemalloc/internal/conf.h" +#include "jemalloc/internal/witness.h" /******************************************************************************/ /* Data. */ diff --git a/src/jemalloc_cpp.cpp b/src/jemalloc_cpp.cpp index ac109bb2..d067b734 100644 --- a/src/jemalloc_cpp.cpp +++ b/src/jemalloc_cpp.cpp @@ -7,7 +7,13 @@ extern "C" { #endif #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" + +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/jemalloc_internal_externs.h" +#include "jemalloc/internal/jemalloc_internal_inlines_b.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/tcache.h" #ifdef __cplusplus } diff --git a/src/jemalloc_fork.c b/src/jemalloc_fork.c index 9bab77e8..88c0a8ac 100644 --- a/src/jemalloc_fork.c +++ b/src/jemalloc_fork.c @@ -1,10 +1,16 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/arenas_management.h" +#include "jemalloc/internal/background_thread.h" #include "jemalloc/internal/ctl.h" #include "jemalloc/internal/jemalloc_fork.h" #include "jemalloc/internal/jemalloc_init.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/tcache.h" +#include "jemalloc/internal/tsd.h" /******************************************************************************/ /* diff --git a/src/jemalloc_init.c b/src/jemalloc_init.c index 2500a385..2f2a3703 100644 --- a/src/jemalloc_init.c +++ b/src/jemalloc_init.c @@ -1,17 +1,22 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/arenas_management.h" +#include "jemalloc/internal/background_thread.h" +#include "jemalloc/internal/background_thread_inlines.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_b.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/tcache.h" +#include "jemalloc/internal/witness.h" #include "jemalloc/internal/conf.h" #include "jemalloc/internal/ctl.h" #include "jemalloc/internal/emap.h" #include "jemalloc/internal/extent_dss.h" -#include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/jemalloc_fork.h" #include "jemalloc/internal/jemalloc_init.h" #include "jemalloc/internal/malloc_io.h" #include "jemalloc/internal/mutex.h" -#include "jemalloc/internal/safety_check.h" #include "jemalloc/internal/san.h" #include "jemalloc/internal/sc.h" #include "jemalloc/internal/spin.h" diff --git a/src/large.c b/src/large.c index 610c9b6c..f3c5694d 100644 --- a/src/large.c +++ b/src/large.c @@ -1,10 +1,14 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/arena_inlines_b.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/emap.h" -#include "jemalloc/internal/extent_mmap.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" +#include "jemalloc/internal/large.h" #include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/prof_inlines.h" #include "jemalloc/internal/prof_recent.h" #include "jemalloc/internal/util.h" diff --git a/src/log.c b/src/log.c index 9b1c6261..63054d83 100644 --- a/src/log.c +++ b/src/log.c @@ -1,5 +1,4 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/log.h" diff --git a/src/malloc_dispatch.c b/src/malloc_dispatch.c index ea8d2817..bc9f562b 100644 --- a/src/malloc_dispatch.c +++ b/src/malloc_dispatch.c @@ -1,8 +1,16 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/emap.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" +#include "jemalloc/internal/large.h" +#include "jemalloc/internal/malloc_dispatch.h" +#include "jemalloc/internal/malloc_dispatch_inlines.h" +#include "jemalloc/internal/sc.h" +#include "jemalloc/internal/sz.h" +#include "jemalloc/internal/tcache.h" +#include "jemalloc/internal/tcache_inlines.h" /******************************************************************************/ diff --git a/src/malloc_io.c b/src/malloc_io.c index e76a6b73..2b8a6564 100644 --- a/src/malloc_io.c +++ b/src/malloc_io.c @@ -1,5 +1,4 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/malloc_io.h" #include "jemalloc/internal/util.h" diff --git a/src/mutex.c b/src/mutex.c index aa2ab665..04a14a24 100644 --- a/src/mutex.c +++ b/src/mutex.c @@ -1,8 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/malloc_io.h" +#include "jemalloc/internal/mutex.h" #include "jemalloc/internal/spin.h" #if defined(_WIN32) && !defined(_CRT_SPINCOUNT) diff --git a/src/nstime.c b/src/nstime.c index 0dfbeda1..5517877d 100644 --- a/src/nstime.c +++ b/src/nstime.c @@ -1,9 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" - -#include "jemalloc/internal/nstime.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/nstime.h" #define BILLION UINT64_C(1000000000) #define MILLION UINT64_C(1000000) diff --git a/src/pa.c b/src/pa.c index f14fda81..a3ee51ad 100644 --- a/src/pa.c +++ b/src/pa.c @@ -1,8 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" -#include "jemalloc/internal/san.h" +#include "jemalloc/internal/background_thread.h" #include "jemalloc/internal/hpa.h" +#include "jemalloc/internal/pa.h" static void pa_nactive_add(pa_shard_t *shard, size_t add_pages) { diff --git a/src/pa_extra.c b/src/pa_extra.c index 17b4449a..24ff2e6d 100644 --- a/src/pa_extra.c +++ b/src/pa_extra.c @@ -1,5 +1,6 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" + +#include "jemalloc/internal/pa.h" /* * This file is logically part of the PA module. While pa.c contains the core diff --git a/src/pac.c b/src/pac.c index aab2bb1e..caf5f9d5 100644 --- a/src/pac.c +++ b/src/pac.c @@ -1,8 +1,11 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/background_thread.h" +#include "jemalloc/internal/extent.h" #include "jemalloc/internal/pac.h" #include "jemalloc/internal/san.h" +#include "jemalloc/internal/witness.h" static inline void pac_decay_data_get(pac_t *pac, extent_state_t state, decay_t **r_decay, diff --git a/src/pages.c b/src/pages.c index 4bca965a..4f316a9d 100644 --- a/src/pages.c +++ b/src/pages.c @@ -1,11 +1,12 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/pages.h" - -#include "jemalloc/internal/jemalloc_internal_includes.h" - #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/base.h" +#include "jemalloc/internal/extent.h" +#include "jemalloc/internal/jemalloc_internal_externs.h" #include "jemalloc/internal/malloc_io.h" +#include "jemalloc/internal/pages.h" +#include "jemalloc/internal/sc.h" #ifdef JEMALLOC_SYSCTL_VM_OVERCOMMIT # include diff --git a/src/peak_event.c b/src/peak_event.c index 39f90b70..c38f0beb 100644 --- a/src/peak_event.c +++ b/src/peak_event.c @@ -1,9 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" - -#include "jemalloc/internal/peak_event.h" #include "jemalloc/internal/peak.h" +#include "jemalloc/internal/peak_event.h" +#include "jemalloc/internal/thread_event.h" #include "jemalloc/internal/thread_event_registry.h" /* Update the peak with current tsd state. */ diff --git a/src/prof.c b/src/prof.c index a833fed5..fc37c4fe 100644 --- a/src/prof.c +++ b/src/prof.c @@ -1,16 +1,19 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" -#include "jemalloc/internal/ctl.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/assert.h" -#include "jemalloc/internal/mutex.h" #include "jemalloc/internal/counter.h" +#include "jemalloc/internal/ctl.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/prof.h" #include "jemalloc/internal/prof_data.h" +#include "jemalloc/internal/prof_hook.h" +#include "jemalloc/internal/prof_inlines.h" #include "jemalloc/internal/prof_log.h" #include "jemalloc/internal/prof_recent.h" #include "jemalloc/internal/prof_stats.h" #include "jemalloc/internal/prof_sys.h" -#include "jemalloc/internal/prof_hook.h" #include "jemalloc/internal/thread_event.h" #include "jemalloc/internal/thread_event_registry.h" diff --git a/src/prof_data.c b/src/prof_data.c index 7aa047ac..603505ed 100644 --- a/src/prof_data.c +++ b/src/prof_data.c @@ -1,11 +1,18 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/arena_inlines_b.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/ckh.h" #include "jemalloc/internal/hash.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" #include "jemalloc/internal/malloc_io.h" +#include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/prof.h" #include "jemalloc/internal/prof_data.h" +#include "jemalloc/internal/prof_inlines.h" +#include "jemalloc/internal/witness.h" /* * This file defines and manages the core profiling data structures. diff --git a/src/prof_log.c b/src/prof_log.c index 74f1372f..642e87d7 100644 --- a/src/prof_log.c +++ b/src/prof_log.c @@ -1,8 +1,12 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/buf_writer.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/prof_inlines.h" #include "jemalloc/internal/ckh.h" #include "jemalloc/internal/emitter.h" #include "jemalloc/internal/hash.h" diff --git a/src/prof_recent.c b/src/prof_recent.c index f7108bee..1b15852c 100644 --- a/src/prof_recent.c +++ b/src/prof_recent.c @@ -1,10 +1,13 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/buf_writer.h" #include "jemalloc/internal/emitter.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" +#include "jemalloc/internal/prof.h" #include "jemalloc/internal/prof_data.h" +#include "jemalloc/internal/prof_inlines.h" #include "jemalloc/internal/prof_recent.h" ssize_t opt_prof_recent_alloc_max = PROF_RECENT_ALLOC_MAX_DEFAULT; diff --git a/src/prof_stack_range.c b/src/prof_stack_range.c index 8ebcab8e..ef5e8062 100644 --- a/src/prof_stack_range.c +++ b/src/prof_stack_range.c @@ -1,5 +1,4 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/malloc_io.h" #include "jemalloc/internal/prof_sys.h" diff --git a/src/prof_stats.c b/src/prof_stats.c index db248be7..3c34578d 100644 --- a/src/prof_stats.c +++ b/src/prof_stats.c @@ -1,6 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/prof.h" #include "jemalloc/internal/prof_stats.h" bool opt_prof_stats = false; diff --git a/src/prof_sys.c b/src/prof_sys.c index be50c0be..be59746c 100644 --- a/src/prof_sys.c +++ b/src/prof_sys.c @@ -1,10 +1,14 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/buf_writer.h" #include "jemalloc/internal/ctl.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" #include "jemalloc/internal/malloc_io.h" +#include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/prof.h" #include "jemalloc/internal/prof_data.h" +#include "jemalloc/internal/prof_inlines.h" #include "jemalloc/internal/prof_sys.h" #ifdef JEMALLOC_PROF_LIBUNWIND diff --git a/src/psset.c b/src/psset.c index 4c6ab255..b9b739ad 100644 --- a/src/psset.c +++ b/src/psset.c @@ -1,9 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" - -#include "jemalloc/internal/psset.h" #include "jemalloc/internal/fb.h" +#include "jemalloc/internal/psset.h" +#include "jemalloc/internal/sz.h" void psset_init(psset_t *psset) { diff --git a/src/rtree.c b/src/rtree.c index ac27f829..a63f2b01 100644 --- a/src/rtree.c +++ b/src/rtree.c @@ -1,8 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/rtree.h" /* * Only the most significant bits of keys passed to rtree_{read,write}() are diff --git a/src/safety_check.c b/src/safety_check.c index cdb6f79e..c3ddd36a 100644 --- a/src/safety_check.c +++ b/src/safety_check.c @@ -1,5 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" + +#include "jemalloc/internal/malloc_io.h" +#include "jemalloc/internal/safety_check.h" void safety_check_fail_sized_dealloc(bool current_dealloc, const void *ptr, diff --git a/src/san.c b/src/san.c index 5448c67f..e5e3e510 100644 --- a/src/san.c +++ b/src/san.c @@ -1,10 +1,9 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/ehooks.h" +#include "jemalloc/internal/emap.h" #include "jemalloc/internal/san.h" -#include "jemalloc/internal/tsd.h" /* The sanitizer options. */ size_t opt_san_guard_large = SAN_GUARD_LARGE_EVERY_N_EXTENTS_DEFAULT; diff --git a/src/san_bump.c b/src/san_bump.c index 11031290..30b90b04 100644 --- a/src/san_bump.c +++ b/src/san_bump.c @@ -1,11 +1,12 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" -#include "jemalloc/internal/san_bump.h" +#include "jemalloc/internal/edata_cache.h" +#include "jemalloc/internal/ehooks.h" +#include "jemalloc/internal/extent.h" +#include "jemalloc/internal/mutex.h" #include "jemalloc/internal/pac.h" #include "jemalloc/internal/san.h" -#include "jemalloc/internal/ehooks.h" -#include "jemalloc/internal/edata_cache.h" +#include "jemalloc/internal/san_bump.h" static bool san_bump_grow_locked(tsdn_t *tsdn, san_bump_alloc_t *sba, pac_t *pac, ehooks_t *ehooks, size_t size); diff --git a/src/sec.c b/src/sec.c index 493e4629..879fc47e 100644 --- a/src/sec.c +++ b/src/sec.c @@ -1,8 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" -#include "jemalloc/internal/sec.h" #include "jemalloc/internal/jemalloc_probe.h" +#include "jemalloc/internal/sec.h" +#include "jemalloc/internal/witness.h" static bool sec_bin_init(sec_bin_t *bin) { diff --git a/src/stats.c b/src/stats.c index 5fa37529..930422a2 100644 --- a/src/stats.c +++ b/src/stats.c @@ -1,13 +1,17 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/background_thread.h" #include "jemalloc/internal/ctl.h" #include "jemalloc/internal/emitter.h" #include "jemalloc/internal/fxp.h" -#include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/jemalloc_internal_inlines_b.h" #include "jemalloc/internal/mutex_prof.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/prof_inlines.h" #include "jemalloc/internal/prof_stats.h" +#include "jemalloc/internal/tcache.h" static const char *const global_mutex_names[mutex_prof_num_global_mutexes] = { #define OP(mtx) #mtx, diff --git a/src/sz.c b/src/sz.c index da92f2b4..5cff6f8b 100644 --- a/src/sz.c +++ b/src/sz.c @@ -1,5 +1,5 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" + #include "jemalloc/internal/sz.h" JEMALLOC_ALIGNED(CACHELINE) diff --git a/src/tcache.c b/src/tcache.c index ff07c12f..7ce0ecae 100644 --- a/src/tcache.c +++ b/src/tcache.c @@ -1,12 +1,24 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/arena_inlines_b.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/background_thread.h" +#include "jemalloc/internal/background_thread_inlines.h" #include "jemalloc/internal/base.h" +#include "jemalloc/internal/emap.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_b.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" +#include "jemalloc/internal/large.h" #include "jemalloc/internal/mutex.h" -#include "jemalloc/internal/safety_check.h" +#include "jemalloc/internal/prof.h" #include "jemalloc/internal/san.h" #include "jemalloc/internal/sc.h" +#include "jemalloc/internal/sz.h" +#include "jemalloc/internal/tcache.h" +#include "jemalloc/internal/tcache_inlines.h" +#include "jemalloc/internal/witness.h" /******************************************************************************/ /* Data. */ diff --git a/src/thread_event.c b/src/thread_event.c index a8c5e2e1..2f2dd711 100644 --- a/src/thread_event.c +++ b/src/thread_event.c @@ -1,9 +1,12 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/peak_event.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/tcache.h" #include "jemalloc/internal/thread_event.h" #include "jemalloc/internal/thread_event_registry.h" -#include "jemalloc/internal/peak_event.h" +#include "jemalloc/internal/tsd.h" static bool te_ctx_has_active_events(te_ctx_t *ctx) { diff --git a/src/thread_event_registry.c b/src/thread_event_registry.c index 1db8fa72..a25050e8 100644 --- a/src/thread_event_registry.c +++ b/src/thread_event_registry.c @@ -1,12 +1,15 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" -#include "jemalloc/internal/thread_event.h" -#include "jemalloc/internal/thread_event_registry.h" -#include "jemalloc/internal/tcache.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/mutex.h" #include "jemalloc/internal/peak_event.h" #include "jemalloc/internal/prof.h" #include "jemalloc/internal/stats.h" +#include "jemalloc/internal/tcache.h" +#include "jemalloc/internal/thread_event.h" +#include "jemalloc/internal/thread_event_registry.h" +#include "jemalloc/internal/tsd.h" +#include "jemalloc/internal/witness.h" static malloc_mutex_t uevents_mu; diff --git a/src/ticker.c b/src/ticker.c index 1fd6ac96..b3cac9d1 100644 --- a/src/ticker.c +++ b/src/ticker.c @@ -1,5 +1,6 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" + +#include "jemalloc/internal/ticker.h" /* * To avoid using floating point math down core paths (still necessary because diff --git a/src/tsd.c b/src/tsd.c index 67200f50..33023af5 100644 --- a/src/tsd.c +++ b/src/tsd.c @@ -1,10 +1,18 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arenas_management.h" #include "jemalloc/internal/assert.h" -#include "jemalloc/internal/san.h" +#include "jemalloc/internal/background_thread.h" +#include "jemalloc/internal/ckh.h" +#include "jemalloc/internal/jemalloc_internal_inlines_b.h" #include "jemalloc/internal/mutex.h" +#include "jemalloc/internal/prof.h" #include "jemalloc/internal/rtree.h" +#include "jemalloc/internal/san.h" +#include "jemalloc/internal/tcache.h" +#include "jemalloc/internal/thread_event.h" +#include "jemalloc/internal/tsd.h" +#include "jemalloc/internal/witness.h" /******************************************************************************/ /* Data. */ diff --git a/src/util.c b/src/util.c index 1bcf4fee..a23a5c8c 100644 --- a/src/util.c +++ b/src/util.c @@ -1,6 +1,6 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/malloc_io.h" #include "jemalloc/internal/util.h" /* Reads the next size pair in a multi-sized option. */ diff --git a/src/witness.c b/src/witness.c index 940b1eae..6f1a17e7 100644 --- a/src/witness.c +++ b/src/witness.c @@ -1,8 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/malloc_io.h" +#include "jemalloc/internal/witness.h" void witness_init(witness_t *witness, const char *name, witness_rank_t rank, diff --git a/src/zone.c b/src/zone.c index 62d2eabb..62957f17 100644 --- a/src/zone.c +++ b/src/zone.c @@ -1,8 +1,12 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/arena.h" +#include "jemalloc/internal/arenas_management.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/jemalloc_fork.h" +#include "jemalloc/internal/jemalloc_init.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" #ifndef JEMALLOC_ZONE # error "This source file is for zones on Darwin (OS X)." diff --git a/test/include/test/jemalloc_test.h.in b/test/include/test/jemalloc_test.h.in index 8b139db1..e0df5523 100644 --- a/test/include/test/jemalloc_test.h.in +++ b/test/include/test/jemalloc_test.h.in @@ -47,7 +47,21 @@ extern "C" { # define JEMALLOC_JET # define JEMALLOC_MANGLE # include "jemalloc/internal/jemalloc_preamble.h" -# include "jemalloc/internal/jemalloc_internal_includes.h" +# include "jemalloc/internal/arena.h" +# include "jemalloc/internal/jemalloc_internal_externs.h" +# include "jemalloc/internal/large.h" +# include "jemalloc/internal/tcache.h" +# include "jemalloc/internal/prof.h" +# include "jemalloc/internal/background_thread.h" +# include "jemalloc/internal/jemalloc_internal_inlines_a.h" +# include "jemalloc/internal/arena_inlines_a.h" +# include "jemalloc/internal/jemalloc_internal_inlines_b.h" +# include "jemalloc/internal/bin_inlines.h" +# include "jemalloc/internal/tcache_inlines.h" +# include "jemalloc/internal/arena_inlines_b.h" +# include "jemalloc/internal/jemalloc_internal_inlines_c.h" +# include "jemalloc/internal/prof_inlines.h" +# include "jemalloc/internal/background_thread_inlines.h" /******************************************************************************/ /* @@ -92,7 +106,21 @@ extern "C" { # define JEMALLOC_JET # include "jemalloc/internal/jemalloc_preamble.h" -# include "jemalloc/internal/jemalloc_internal_includes.h" +# include "jemalloc/internal/arena.h" +# include "jemalloc/internal/jemalloc_internal_externs.h" +# include "jemalloc/internal/large.h" +# include "jemalloc/internal/tcache.h" +# include "jemalloc/internal/prof.h" +# include "jemalloc/internal/background_thread.h" +# include "jemalloc/internal/jemalloc_internal_inlines_a.h" +# include "jemalloc/internal/arena_inlines_a.h" +# include "jemalloc/internal/jemalloc_internal_inlines_b.h" +# include "jemalloc/internal/bin_inlines.h" +# include "jemalloc/internal/tcache_inlines.h" +# include "jemalloc/internal/arena_inlines_b.h" +# include "jemalloc/internal/jemalloc_internal_inlines_c.h" +# include "jemalloc/internal/prof_inlines.h" +# include "jemalloc/internal/background_thread_inlines.h" # include "jemalloc/internal/public_unnamespace.h" # undef JEMALLOC_JET