summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-24 20:06:24 -0700
committerDavid S. Miller <davem@davemloft.net>2008-03-24 20:06:24 -0700
commit85a793533524f333e8d630dc22450e574b7e08d2 (patch)
treef535f7721bea10ea1ddd79e83159350b457de72b /include
parent6d008153234c4cccae7bb0170defeea18258db4a (diff)
downloadlinux-85a793533524f333e8d630dc22450e574b7e08d2.tar.gz
linux-85a793533524f333e8d630dc22450e574b7e08d2.tar.bz2
linux-85a793533524f333e8d630dc22450e574b7e08d2.zip
[SPARC64]: Make save_stack_trace() more efficient.
Doing a 'flushw' every stack trace capture creates so much overhead that it makes lockdep next to unusable. We only care about the frame pointer chain and the function caller program counters, so flush those by hand to the stack frame. This is significantly more efficient than a 'flushw' because: 1) We only save 16 bytes per active register window to the stack. 2) This doesn't push the entire register window context of the current call chain out of the cpu, forcing register window fill traps as we return back down. Note that we can't use 'restore' and 'save' instructions to move around the register windows because that wouldn't work on Niagara processors. They optimize 'save' into a new register window by simply clearing out the registers instead of pulling them in from the on-chip register window backing store. Based upon a report by Tom Callaway. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/asm-sparc64/stacktrace.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-sparc64/stacktrace.h b/include/asm-sparc64/stacktrace.h
new file mode 100644
index 000000000000..6cee39adf6d6
--- /dev/null
+++ b/include/asm-sparc64/stacktrace.h
@@ -0,0 +1,6 @@
+#ifndef _SPARC64_STACKTRACE_H
+#define _SPARC64_STACKTRACE_H
+
+extern void stack_trace_flush(void);
+
+#endif /* _SPARC64_STACKTRACE_H */