Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
[pandora-kernel.git] / arch / x86 / kernel / dumpstack.c
index dd2130b..95ea5fa 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/bug.h>
 #include <linux/nmi.h>
 #include <linux/sysfs.h>
+#include <linux/ftrace.h>
 
 #include <asm/stacktrace.h>
 
@@ -196,6 +197,11 @@ unsigned __kprobes long oops_begin(void)
        int cpu;
        unsigned long flags;
 
+       /* notify the hw-branch tracer so it may disable tracing and
+          add the last trace to the trace buffer -
+          the earlier this happens, the more useful the trace. */
+       trace_hw_branch_oops();
+
        oops_enter();
 
        /* racy, but better than risking deadlock. */