Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts/gdb: fix timerlist parsing issue

Patch series "Fix some GDB command error and add some GDB commands", v3.

Fix some GDB command errors and add some useful GDB commands.


This patch (of 5):

Commit 7988e5ae2be7 ("tick: Split nohz and highres features from
nohz_mode") and commit 7988e5ae2be7 ("tick: Split nohz and highres
features from nohz_mode") move 'tick_stopped' and 'nohz_mode' to flags
field which will break the gdb lx-mounts command:

(gdb) lx-timerlist
Python Exception <class 'gdb.error'>: There is no member named nohz_mode.
Error occurred in Python: There is no member named nohz_mode.

(gdb) lx-timerlist
Python Exception <class 'gdb.error'>: There is no member named tick_stopped.
Error occurred in Python: There is no member named tick_stopped.

We move 'tick_stopped' and 'nohz_mode' to flags field instead.

Link: https://lkml.kernel.org/r/20240723064902.124154-1-kuan-ying.lee@canonical.com
Link: https://lkml.kernel.org/r/20240723064902.124154-2-kuan-ying.lee@canonical.com
Fixes: a478ffb2ae23 ("tick: Move individual bit features to debuggable mask accesses")
Fixes: 7988e5ae2be7 ("tick: Split nohz and highres features from nohz_mode")
Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Kuan-Ying Lee and committed by
Andrew Morton
a633a4b8 d1c7848b

+16 -15
+16 -15
scripts/gdb/linux/timerlist.py
··· 87 87 text += "\n" 88 88 89 89 if constants.LX_CONFIG_TICK_ONESHOT: 90 - fmts = [(" .{} : {}", 'nohz_mode'), 91 - (" .{} : {} nsecs", 'last_tick'), 92 - (" .{} : {}", 'tick_stopped'), 93 - (" .{} : {}", 'idle_jiffies'), 94 - (" .{} : {}", 'idle_calls'), 95 - (" .{} : {}", 'idle_sleeps'), 96 - (" .{} : {} nsecs", 'idle_entrytime'), 97 - (" .{} : {} nsecs", 'idle_waketime'), 98 - (" .{} : {} nsecs", 'idle_exittime'), 99 - (" .{} : {} nsecs", 'idle_sleeptime'), 100 - (" .{}: {} nsecs", 'iowait_sleeptime'), 101 - (" .{} : {}", 'last_jiffies'), 102 - (" .{} : {}", 'next_timer'), 103 - (" .{} : {} nsecs", 'idle_expires')] 104 - text += "\n".join([s.format(f, ts[f]) for s, f in fmts]) 90 + TS_FLAG_STOPPED = 1 << 1 91 + TS_FLAG_NOHZ = 1 << 4 92 + text += f" .{'nohz':15s}: {int(bool(ts['flags'] & TS_FLAG_NOHZ))}\n" 93 + text += f" .{'last_tick':15s}: {ts['last_tick']}\n" 94 + text += f" .{'tick_stopped':15s}: {int(bool(ts['flags'] & TS_FLAG_STOPPED))}\n" 95 + text += f" .{'idle_jiffies':15s}: {ts['idle_jiffies']}\n" 96 + text += f" .{'idle_calls':15s}: {ts['idle_calls']}\n" 97 + text += f" .{'idle_sleeps':15s}: {ts['idle_sleeps']}\n" 98 + text += f" .{'idle_entrytime':15s}: {ts['idle_entrytime']} nsecs\n" 99 + text += f" .{'idle_waketime':15s}: {ts['idle_waketime']} nsecs\n" 100 + text += f" .{'idle_exittime':15s}: {ts['idle_exittime']} nsecs\n" 101 + text += f" .{'idle_sleeptime':15s}: {ts['idle_sleeptime']} nsecs\n" 102 + text += f" .{'iowait_sleeptime':15s}: {ts['iowait_sleeptime']} nsecs\n" 103 + text += f" .{'last_jiffies':15s}: {ts['last_jiffies']}\n" 104 + text += f" .{'next_timer':15s}: {ts['next_timer']}\n" 105 + text += f" .{'idle_expires':15s}: {ts['idle_expires']} nsecs\n" 105 106 text += "\njiffies: {}\n".format(jiffies) 106 107 107 108 text += "\n"