This patch will hide timer data of offline cpus.
The original output is like below:
<cut>
crash> timer
...
4310933504 ffffffffa0311750 ffffffff8154f790 <inet_frag_secret_rebuild>
4380688384 ffff880036dae568 ffffffff8157ed30 <ipv6_regen_rndid>
TVEC_BASES[2]: ffff88003db20000
JIFFIES
4310640297
EXPIRES TIMER_LIST FUNCTION
TVEC_BASES[3]: ffff88003db44000
JIFFIES
4310640297
...
<cut>
With data of offline cpu(cpu #2) hiden, the output is like below:
<cut>
crash> timer
...
4310933504 ffffffffa0311750 ffffffff8154f790 <inet_frag_secret_rebuild>
4380688384 ffff880036dae568 ffffffff8157ed30 <ipv6_regen_rndid>
TVEC_BASES[2]: <OFFLINE>
TVEC_BASES[3]: ffff88003db44000
JIFFIES
4310640297
...
<cut>
Signed-off-by: Qiao Nuohan <qiaonuohan(a)cn.fujitsu.com>
---
kernel.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/kernel.c b/kernel.c
index 0665ada..6da669e 100755
--- a/kernel.c
+++ b/kernel.c
@@ -7435,6 +7435,16 @@ dump_timer_data_tvec_bases_v2(void)
cpu = 0;
next_cpu:
+ /*
+ * hide data of offline cpu and goto next cpu
+ */
+
+ if (hide_offline_cpu(cpu)) {
+ fprintf(fp, "TVEC_BASES[%d]: <OFFLINE>\n", cpu);
+ if (++cpu < kt->cpus)
+ goto next_cpu;
+ }
+
count = 0;
td = (struct timer_data *)NULL;
--
1.8.5.3