From e7595f7b485416721f34b7b9860983cffb4c1687 Mon Sep 17 00:00:00 2001 From: Slobodan Predolac Date: Wed, 27 May 2026 19:15:16 -0400 Subject: [PATCH] Drop umbrella include from 8 large .c files (batch 6) Converted: jemalloc_init, prof_log, base, pac, malloc_io, prof, background_thread, pages. No latent hermeticity bugs in headers this batch. All fixes are explicit includes for symbols (arena.h, background_thread.h, jemalloc_internal_externs.h, etc.) that the umbrella was supplying transitively. Step 6 (Option B) of the cyclical-dep cleanup, batch 6 of N. --- src/background_thread.c | 16 +++++++++++++++- src/base.c | 4 +++- src/jemalloc_init.c | 13 ++++++++++++- src/malloc_io.c | 1 - src/pac.c | 5 ++++- src/pages.c | 9 +++++---- src/prof.c | 13 +++++++++---- src/prof_log.c | 7 ++++++- 8 files changed, 54 insertions(+), 14 deletions(-) diff --git a/src/background_thread.c b/src/background_thread.c index 4901856a..f25dc403 100644 --- a/src/background_thread.c +++ b/src/background_thread.c @@ -1,7 +1,21 @@ #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/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/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/jemalloc_init.c b/src/jemalloc_init.c index 2500a385..b62f10a3 100644 --- a/src/jemalloc_init.c +++ b/src/jemalloc_init.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/arena_inlines_b.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/jemalloc_internal_inlines_c.h" +#include "jemalloc/internal/prof.h" +#include "jemalloc/internal/prof_inlines.h" +#include "jemalloc/internal/tcache.h" +#include "jemalloc/internal/tcache_inlines.h" +#include "jemalloc/internal/witness.h" #include "jemalloc/internal/conf.h" #include "jemalloc/internal/ctl.h" #include "jemalloc/internal/emap.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/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/prof.c b/src/prof.c index a833fed5..4fb5ba5f 100644 --- a/src/prof.c +++ b/src/prof.c @@ -1,16 +1,21 @@ #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/arena_inlines_b.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/jemalloc_internal_inlines_c.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_log.c b/src/prof_log.c index 74f1372f..a5dbe18b 100644 --- a/src/prof_log.c +++ b/src/prof_log.c @@ -1,8 +1,13 @@ #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/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"