[Crash-utility] [PATCH] Use only tasks on online CPUs for bt -a
Michael Holzheu
holzheu at linux.vnet.ibm.com
Mon Apr 26 17:28:29 UTC 2010
Hi Dave,
On Mon, 2010-04-26 at 11:56 -0400, Dave Anderson wrote:
> Sorry -- I take it back. Running a test shows that it breaks "bt -a"
> on Xen dumpfiles where the cpus are marked offline prior to dumping
> the kernel memory.
>
> I think this should be moved to the processor-specific backtrace functions,
> which can just display "OFFLINE" or something to that effect.
Ok, fine. What about the following...
---
s390.c | 5 +++++
s390x.c | 5 +++++
2 files changed, 10 insertions(+)
--- a/s390.c
+++ b/s390.c
@@ -603,11 +603,16 @@ s390_back_trace_cmd(struct bt_info *bt)
unsigned long async_start = 0, async_end = 0;
unsigned long panic_start = 0, panic_end = 0;
unsigned long stack_end, stack_start, stack_base;
+ int cpu = bt->tc->processor;
if (bt->hp && bt->hp->eip) {
error(WARNING,
"instruction pointer argument ignored on this architecture!\n");
}
+ if (is_task_active(bt->task) && (!(kt->cpu_flags[cpu] & ONLINE))) {
+ fprintf(fp, " CPU offline\n");
+ return;
+ }
ksp = bt->stkptr;
/* print lowcore and get async stack when task has cpu */
--- a/s390x.c
+++ b/s390x.c
@@ -836,11 +836,16 @@ s390x_back_trace_cmd(struct bt_info *bt)
unsigned long panic_start = 0, panic_end = 0;
unsigned long stack_end, stack_start, stack_base;
unsigned long r14;
+ int cpu = bt->tc->processor;
if (bt->hp && bt->hp->eip) {
error(WARNING,
"instruction pointer argument ignored on this architecture!\n");
}
+ if (is_task_active(bt->task) && (!(kt->cpu_flags[cpu] & ONLINE))) {
+ fprintf(fp, " CPU offline\n");
+ return;
+ }
ksp = bt->stkptr;
/* print lowcore and get async stack when task has cpu */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crash-5.0.3-s390-bt-a-online.patch
Type: text/x-patch
Size: 1249 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20100426/e29f7d87/attachment.bin>
More information about the Crash-utility
mailing list