Skip to content

Commit 228e25e

Browse files
iostapyshynakpm00
authored andcommitted
scripts/gdb: slab: update field names of struct kmem_cache
The commit 5ba6bc2 ("slab: decouple pointer to barn from kmem_cache_node") reorganized the struct kmem_cache to factor out the per-node fields to the new struct kmem_cache_per_node_ptrs. This causes the gdb scripts for lx-slabinfo and lx-slabtrace fail as they still reference the old structure. Adjust the gdb scripts to match the current state of struct kmem_cache. Link: https://lore.kernel.org/20260427142448.666117-3-illia@yshyn.com Fixes: 5ba6bc2 ("slab: decouple pointer to barn from kmem_cache_node") Signed-off-by: Illia Ostapyshyn <illia@yshyn.com> Acked-by: Harry Yoo (Oracle) <harry@kernel.org> Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Cc: Florian Fainelli <florian.fainelli@broadcom.com> Cc: Hao Li <hao.li@linux.dev> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Seongjun Hong <hsj0512@snu.ac.kr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent c416aee commit 228e25e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/gdb/linux/slab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def process_slab(loc_track, slab_list, alloc, cache):
196196

197197
if target_cache['flags'] & SLAB_STORE_USER:
198198
for i in range(0, nr_node_ids):
199-
cache_node = target_cache['node'][i]
199+
cache_node = target_cache['per_node']['node'][i]
200200
if cache_node['nr_slabs']['counter'] == 0:
201201
continue
202202
process_slab(loc_track, cache_node['partial'], alloc, target_cache)
@@ -300,7 +300,7 @@ def count_free(slab):
300300
nr_free = 0
301301
nr_slabs = 0
302302
for i in range(0, nr_node_ids):
303-
cache_node = cache['node'][i]
303+
cache_node = cache['per_node']['node'][i]
304304
try:
305305
nr_slabs += cache_node['nr_slabs']['counter']
306306
nr_objs = int(cache_node['total_objects']['counter'])

0 commit comments

Comments
 (0)