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

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

Issue 9667026: Revert 126020 - 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
===================================================================
--- third_party/tcmalloc/chromium/src/stacktrace_powerpc-inl.h (revision 126022)
+++ third_party/tcmalloc/chromium/src/stacktrace_powerpc-inl.h (working copy)
@@ -43,7 +43,7 @@
#include <stdint.h> // for uintptr_t
#include <stdlib.h> // for NULL
-#include <gperftools/stacktrace.h>
+#include <google/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,12 +126,16 @@
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<!IS_STACK_FRAMES>(sp);
+ // 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
if (skip_count > 0) {
skip_count--;
@@ -141,20 +145,20 @@
// 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_FRAMES
+#if IS_STACK_FRAME
if (next_sp > sp) {
sizes[n] = (uintptr_t)next_sp - (uintptr_t)sp;
} else {
@@ -162,7 +166,6 @@
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