diff options
| author | Hao Li <hao.li@linux.dev> | 2026-08-14 15:17:02 +0800 |
|---|---|---|
| committer | Vlastimil Babka (SUSE) <vbabka@kernel.org> | 2026-09-07 17:00:08 +0200 |
| commit | 0710b29e51efbc7ad2567df429492f86349dd4d8 (patch) | |
| tree | 61dfae980a76b8e890d7082a64c99ee7889157c3 /tools/lib/python/kdoc/parse_data_structs.py | |
| parent | 208854282dab2100a33c5eb8859407b5d36b7723 (diff) | |
| download | linux-next-0710b29e51efbc7ad2567df429492f86349dd4d8.tar.gz linux-next-0710b29e51efbc7ad2567df429492f86349dd4d8.zip | |
mm/slub: unify slub stat definitions to simplify metric additions
Currently, adding a new slub stat requires modifying three separate
locations: stat_item, STAT_ATTR, and slab_attrs. This is inconvenient,
especially when temporarily adding metrics for debugging during
development.
This patch borrows the approach from SCHED_FEAT by introducing an ITEM_EXP
X-macro, which is then temporarily defined as different operations at the
three locations (stat_item, STAT_ATTR, and slab_attrs) to perform distinct
macro expansions.
Going forward, adding a new metric only requires adding a single line:
ITEM_EXP(XXX, xxx)
Signed-off-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Harry Yoo (Meta) <harry@kernel.org>
Link: https://patch.msgid.link/20260814071848.46922-1-hao.li@linux.dev
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions
