Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: third_party/tcmalloc/chromium/src/stacktrace_powerpc-inl.h

Issue 9666033: Experiment for updating the tcmalloc chromium branch to r144 (gperftools 2.0). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/tcmalloc/chromium/src/stacktrace_powerpc-inl.h
diff --git a/third_party/tcmalloc/chromium/src/stacktrace_powerpc-inl.h b/third_party/tcmalloc/chromium/src/stacktrace_powerpc-inl.h
index 9a07eeaf8a58771eef02af1e585f5616b6e7598f..acf2884e323d3b086f20e12c7edc56cf354241ab 100644
--- a/third_party/tcmalloc/chromium/src/stacktrace_powerpc-inl.h
+++ b/third_party/tcmalloc/chromium/src/stacktrace_powerpc-inl.h
@@ -43,7 +43,7 @@
#include <stdint.h> // for uintptr_t
#include <stdlib.h> // for NULL
-#include <google/stacktrace.h>
+#include <gperftools/stacktrace.h>
// Given a pointer to a stack frame, locate and return the calling
// stackframe, or return NULL if no stackframe can be found. Perform sanity
@@ -126,16 +126,12 @@ int GET_STACK_TRACE_OR_FRAMES {
int n = 0;
while (sp && n < max_depth) {
-#if IS_STACK_FRAMES
// The GetStackFrames routine is called when we are in some
// informational context (the failure signal handler for example).
// Use the non-strict unwinding rules to produce a stack trace
- // that is as complete as possible (even if it contains a few bogus
- // entries in some rare cases).
- void **next_sp = NextStackFrame<false>(sp);
-#else
- void **next_sp = NextStackFrame<true>(sp);
-#endif
+ // that is as complete as possible (even if it contains a few
+ // bogus entries in some rare cases).
+ void **next_sp = NextStackFrame<!IS_STACK_FRAMES>(sp);
if (skip_count > 0) {
skip_count--;
@@ -145,20 +141,20 @@ int GET_STACK_TRACE_OR_FRAMES {
// linux ppc64), it's in sp[2]. For SYSV (used by linux ppc),
// it's in sp[1].
#if defined(_CALL_AIX) || defined(_CALL_DARWIN)
- result[n++] = *(sp+2);
+ result[n] = *(sp+2);
#elif defined(_CALL_SYSV)
- result[n++] = *(sp+1);
+ result[n] = *(sp+1);
#elif defined(__APPLE__) || (defined(__linux) && defined(__PPC64__))
// This check is in case the compiler doesn't define _CALL_AIX/etc.
- result[n++] = *(sp+2);
+ result[n] = *(sp+2);
#elif defined(__linux)
// This check is in case the compiler doesn't define _CALL_SYSV.
- result[n++] = *(sp+1);
+ result[n] = *(sp+1);
#else
#error Need to specify the PPC ABI for your archiecture.
#endif
-#if IS_STACK_FRAME
+#if IS_STACK_FRAMES
if (next_sp > sp) {
sizes[n] = (uintptr_t)next_sp - (uintptr_t)sp;
} else {
@@ -166,6 +162,7 @@ int GET_STACK_TRACE_OR_FRAMES {
sizes[n] = 0;
}
#endif
+ n++;
}
sp = next_sp;
}
« no previous file with comments | « third_party/tcmalloc/chromium/src/stacktrace_libunwind-inl.h ('k') | third_party/tcmalloc/chromium/src/stacktrace_win32-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698