From c5288f1a1a21f0208c44c7d78dc340120a83b184 Mon Sep 17 00:00:00 2001 From: Qiao Nuohan Date: Sat, 23 Aug 2014 11:12:02 +0800 Subject: [PATCH 07/23] x86_64: modify bt -c only to display online cpu's registers bt -c will display the stack trace of the active task on specified cpus. This patch will skip offline cpus and print a message like below to indicate the skip(xx is the id of the offline cpu). bt: CPU xx is offline. Signed-off-by: Qiao Nuohan --- kernel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel.c b/kernel.c index 736ede0..6f675c2 100755 --- a/kernel.c +++ b/kernel.c @@ -2259,6 +2259,11 @@ cmd_bt(void) for (i = 0; i < kt->cpus; i++) { if (NUM_IN_BITMAP(cpus, i)) { + if (check_offline_cpu(i)) { + error(INFO, "\nCPU %d is offline.\n", i); + continue; + } + if ((task = get_active_task(i))) tc = task_to_context(task); else -- 1.8.5.3