aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/timerlist.py
diff options
context:
space:
mode:
authorPeng Liu <[email protected]>2023-03-21 14:20:04 +0800
committerAndrew Morton <[email protected]>2023-04-18 16:39:31 -0700
commit8fc2a304f57cb304231a4b0564d5995b2dd04f63 (patch)
treef36b23dc2593a4797e03f5f78bdbc69b807b7280 /scripts/gdb/linux/timerlist.py
parent7362042f3556528e9e9b1eb5ce8d7a3a6331476b (diff)
scripts/gdb: fix lx-timerlist for HRTIMER_MAX_CLOCK_BASES printing
HRTIMER_MAX_CLOCK_BASES is of enum type hrtimer_base_type. To print it as an integer, HRTIMER_MAX_CLOCK_BASES should be converted first. Link: https://lkml.kernel.org/r/TYCP286MB214640FF0E7F04AC3926A39EC6819@TYCP286MB2146.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Peng Liu <[email protected]> Reviewed-by: Jan Kiszka <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Kieran Bingham <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
-rw-r--r--scripts/gdb/linux/timerlist.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py
index 8281da068c5b..249f0e804b24 100644
--- a/scripts/gdb/linux/timerlist.py
+++ b/scripts/gdb/linux/timerlist.py
@@ -188,7 +188,8 @@ class LxTimerList(gdb.Command):
max_clock_bases = gdb.parse_and_eval("HRTIMER_MAX_CLOCK_BASES")
text = "Timer List Version: gdb scripts\n"
- text += "HRTIMER_MAX_CLOCK_BASES: {}\n".format(max_clock_bases)
+ text += "HRTIMER_MAX_CLOCK_BASES: {}\n".format(
+ max_clock_bases.type.fields()[max_clock_bases].enumval)
text += "now at {} nsecs\n".format(ktime_get())
for cpu in cpus.each_online_cpu():