Re: [PATCH] Use only tasks on online CPUs for bt -a

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 */

---
 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 */
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux