Skip to contentSkip to conversation

Add trec_snapshot and trec_print_snapshot to die()

PATCH In review Wink Saville 1 participant 1 message Mar 21, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 5/7 Add trec_snapshot and trec_print_snapshot to die()

---
arch/x86_64/kernel/traps.c | 12 ++++++++++++

1 files changed, 12 insertions(+), 0 deletions(-)
arch/x86_64/kernel/traps.c +0 -0
index 09d2e8a..c730176 100644
@@ -33,6 +33,10 @@

#include <linux/uaccess.h>
#include <linux/bug.h>

+#ifdef CONFIG_TREC
+#include <linux/trec.h>
+#endif
+
#include <asm/system.h>
#include <asm/io.h>
#include <asm/atomic.h>
@@ -547,9 +551,17 @@ void die(const char * str, struct pt_regs * regs, long err)

{
	unsigned long flags = oops_begin();

+#ifdef CONFIG_TREC
+ trec_snapshot();
+#endif
+

	if (!user_mode(regs))
		report_bug(regs->rip);

+#ifdef CONFIG_TREC
+ trec_print_snapshot();
+#endif
+

	__die(str, regs, err);
	oops_end(flags);
	do_exit(SIGSEGV);
Signature · 1 line
1.5.0.rc2