From 20e61c23ff5671a3799a5860210732cee4fefef5 Mon Sep 17 00:00:00 2001 From: Qiao Nuohan Date: Thu, 25 Sep 2014 15:01:37 +0800 Subject: [PATCH v3 12/21] modify timer to hide offline cpus' data This patch will hide timer data of offline cpus. The original output is like below: crash> timer ... 4310933504 ffffffffa0311750 ffffffff8154f790 4380688384 ffff880036dae568 ffffffff8157ed30 TVEC_BASES[2]: ffff88003db20000 JIFFIES 4310640297 EXPIRES TIMER_LIST FUNCTION TVEC_BASES[3]: ffff88003db44000 JIFFIES 4310640297 ... With data of offline cpu(cpu #2) hiden, the output is like below: crash> timer ... 4310933504 ffffffffa0311750 ffffffff8154f790 4380688384 ffff880036dae568 ffffffff8157ed30 TVEC_BASES[2]: [OFFLINE] TVEC_BASES[3]: ffff88003db44000 JIFFIES 4310640297 ... Signed-off-by: Qiao Nuohan --- kernel.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kernel.c b/kernel.c index 377e03c..c71748d 100755 --- a/kernel.c +++ b/kernel.c @@ -7431,6 +7431,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