aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/slab.py
diff options
context:
space:
mode:
authorKuan-Ying Lee <[email protected]>2023-11-27 15:04:03 +0800
committerAndrew Morton <[email protected]>2023-12-10 17:21:49 -0800
commite52ec6a2db2e01e6a8cdfbe4fee1f89f57cdf723 (patch)
tree1ca50bc865999f32cd627121d3c8b419bd7279b6 /scripts/gdb/linux/slab.py
parent125e9987a2d9016f78d0a020cec7d55fd0f29501 (diff)
scripts/gdb: remove exception handling and refine print format
1. When we crash on a page, we want to check what happened on this page instead of skipping this page by try-except block. Thus, removing the try-except block. 2. Remove redundant comma and print the task name properly. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kuan-Ying Lee <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: AngeloGioacchino Del Regno <[email protected]> Cc: Chinwen Chang <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Qun-Wei Lin <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/slab.py')
-rw-r--r--scripts/gdb/linux/slab.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/gdb/linux/slab.py b/scripts/gdb/linux/slab.py
index f012ba38c7d9..0e2d93867fe2 100644
--- a/scripts/gdb/linux/slab.py
+++ b/scripts/gdb/linux/slab.py
@@ -228,8 +228,7 @@ def slabtrace(alloc, cache_name):
nr_cpu = gdb.parse_and_eval('__num_online_cpus')['counter']
if nr_cpu > 1:
gdb.write(" cpus=")
- for i in loc['cpus']:
- gdb.write("%d," % i)
+ gdb.write(','.join(str(cpu) for cpu in loc['cpus']))
gdb.write("\n")
if constants.LX_CONFIG_STACKDEPOT:
if loc['handle']: