summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorVlastimil Babka (SUSE) <vbabka@kernel.org>2026-07-27 14:54:03 +0200
committerVlastimil Babka (SUSE) <vbabka@kernel.org>2026-08-04 09:52:18 +0200
commit580258a19284fce98de9013baa81633ab9d93515 (patch)
tree4676c41ca23162f268b2735642a24f04d864a49f /scripts/stackusage
parentf901ed647994859884c89620c26c8092d538af01 (diff)
downloadlinux-next-580258a19284fce98de9013baa81633ab9d93515.tar.gz
linux-next-580258a19284fce98de9013baa81633ab9d93515.zip
mm/slab: introduce slab_obj_ext_has_codetag()
mem_alloc_profiling_enabled() allows evaluating (with a static key) if memory profiling is currently enabled. mem_profiling_support is a variable where false means it's not possible to enable it anymore, because the system was booted with "never" or it was later shut down. This is possible to query by mem_alloc_profiling_permanently_disabled(). To make slabobj_ext array size handling dynamic, we need a snapshot of mem_alloc_profiling_permanently_disabled() early in boot, so that's not affected by a later shutdown. We also need it to be static key based for performance. Neither mem_alloc_profiling_enabled() nor mem_alloc_profiling_permanently_disabled() satisfy this. Therefore introduce slab_obj_ext_has_codetag() with an underlying static key for that use case. Its state is made to reflect the result of mem_alloc_profiling_permanently_disabled() during kmem_cache_init(), which does happen after setup_early_mem_profiling(). Reviewed-by: Suren Baghdasaryan <surenb@google.com> Link: https://patch.msgid.link/20260727-b4-objext_split-v3-9-c29ef0f1f257@kernel.org Reviewed-by: Hao Li <hao.li@linux.dev> Reviewed-by: Harry Yoo <harry@kernel.org> Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions