Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   Enable stack trace analysis for compressed Kdump (http://www.linux-archive.org/crash-utility/627589-enable-stack-trace-analysis-compressed-kdump.html)

"Suzuki K. Poulose" 02-01-2012 05:15 AM

Enable stack trace analysis for compressed Kdump
 
In both Kdump and Compressed Kdump cores, we have the NT_PRSTATUS
notes available for the active tasks and we use them for getting the
stack trace. So reuse the function for compressed Kdump.

Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
---

ppc.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ppc.c b/ppc.c
index 78c9178..9e704d0 100755
--- a/ppc.c
+++ b/ppc.c
@@ -1193,8 +1193,11 @@ ppc_dumpfile_stack_frame(struct bt_info *bt, ulong *getpc, ulong *getsp)
{
struct syment *sp;

- /* For KDUMP get the SP, PC from pt_regs stored in the core */
- if (pc->flags & KDUMP) {
+ /*
+ * For KDUMP and compressed KDUMP get the SP, PC from pt_regs
+ * read from the Elf Note.
+ */
+ if (ELF_NOTES_VALID()) {
ppc_kdump_stack_frame(bt, getpc, getsp);
return;
}

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

"Suzuki K. Poulose" 02-02-2012 06:44 AM

Enable stack trace analysis for compressed Kdump
 
Dave,

I have updated the patch below as per your suggestion.

---
In both Kdump and Compressed Kdump cores, we have the NT_PRSTATUS
notes available for the active tasks and we use them for getting the
stack trace. So reuse the function for compressed Kdump.

Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
---

netdump.c | 5 +++++
ppc.c | 7 +++++--
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/netdump.c b/netdump.c
index d23e45c..fe09734 100644
--- a/netdump.c
+++ b/netdump.c
@@ -1696,6 +1696,11 @@ dump_Elf32_Nhdr(Elf32_Off offset, int store)
}
}
}
+#ifdef PPC
+ /* Set the flags to indicate that we have NT_PRSTATUS notes */
+ if (nd->num_prstatus_notes > 0)
+ pc->flags2 |= ELF_NOTES;
+#endif
break;
case NT_PRPSINFO:
netdump_print("(NT_PRPSINFO)
");
diff --git a/ppc.c b/ppc.c
index 78c9178..9e704d0 100755
--- a/ppc.c
+++ b/ppc.c
@@ -1193,8 +1193,11 @@ ppc_dumpfile_stack_frame(struct bt_info *bt, ulong *getpc, ulong *getsp)
{
struct syment *sp;

- /* For KDUMP get the SP, PC from pt_regs stored in the core */
- if (pc->flags & KDUMP) {
+ /*
+ * For KDUMP and compressed KDUMP get the SP, PC from pt_regs
+ * read from the Elf Note.
+ */
+ if (ELF_NOTES_VALID()) {
ppc_kdump_stack_frame(bt, getpc, getsp);
return;
}

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility


All times are GMT. The time now is 05:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.