Merge branch 'slab/for-7.2/tools' into slab/for-next

Merge series "Cleanup and fix tools/mm/slabinfo utility" from Xuewen
Wang.

This series fixes one bug and cleans up two code quality issues in
tools/mm/slabinfo.

Additionally, add this tool and other related scripts and tools to the
SLAB ALLOCATOR of MAINTAINERS.

Link: https://lore.kernel.org/all/20260518062159.80664-1-wangxuewen@kylinos.cn/
This commit is contained in:
Vlastimil Babka (SUSE) 2026-06-11 12:18:06 +02:00
commit d196ea36a2
2 changed files with 9 additions and 5 deletions

View File

@ -24612,6 +24612,12 @@ F: mm/mempool.c
F: mm/slab.h
F: mm/slab_common.c
F: mm/slub.c
F: scripts/gdb/linux/slab.py
F: tools/cgroup/memcg_slabinfo.py
F: tools/include/linux/slab.h
F: tools/lib/slab.c
F: tools/mm/slabinfo-gnuplot.sh
F: tools/mm/slabinfo.c
SLCAN CAN NETWORK DRIVER
M: Dario Binacchi <dario.binacchi@amarulasolutions.com>

View File

@ -193,10 +193,9 @@ static unsigned long get_obj_and_str(const char *name, char **x)
*x = NULL;
if (!read_obj(name)) {
x = NULL;
if (!read_obj(name))
return 0;
}
result = strtoul(buffer, &p, 10);
while (*p == ' ')
p++;
@ -798,7 +797,7 @@ static void slab_debug(struct slabinfo *s)
fprintf(stderr, "%s can only enable trace for one slab at a time\n", s->name);
}
if (!tracing && s->trace)
set_obj(s, "trace", 1);
set_obj(s, "trace", 0);
}
static void totals(void)
@ -1266,7 +1265,6 @@ static void read_slab_dir(void)
slab->objects_total = get_obj("objects_total");
slab->objs_per_slab = get_obj("objs_per_slab");
slab->order = get_obj("order");
slab->partial = get_obj("partial");
slab->partial = get_obj_and_str("partial", &t);
decode_numa_list(slab->numa_partial, t);
free(t);