From 568361d6f8e1b69fa908b966426ba77f8d88cbfc Mon Sep 17 00:00:00 2001 From: Qiao Nuohan Date: Sat, 23 Aug 2014 17:02:07 +0800 Subject: [PATCH 17/23] x86_64: modify kmem -o only to display online cpus' data kmem -o is used to display each cpu's offset value that is added to per-cpu symbol values to translate them into kernel virtual addresses. This patch will skip offline cpus. Signed-off-by: Qiao Nuohan --- memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/memory.c b/memory.c index 01f0839..65447c9 100755 --- a/memory.c +++ b/memory.c @@ -16936,6 +16936,9 @@ dump_per_cpu_offsets(void) fprintf(fp, "PER-CPU OFFSET VALUES:\n"); for (c = 0; c < kt->cpus; c++) { + if (check_offline_cpu(c)) + continue; + sprintf(buf, "CPU %d", c); fprintf(fp, "%7s: %lx\n", buf, kt->__per_cpu_offset[c]); } -- 1.8.5.3