Index: third_party/tcmalloc/chromium/src/profiler.cc |
diff --git a/third_party/tcmalloc/chromium/src/profiler.cc b/third_party/tcmalloc/chromium/src/profiler.cc |
index eb6dc4281a5ec80b6e85cb0fcb63aef751c6429a..699a4a49d8810984c7e99cd0d849193ca83056b7 100644 |
--- a/third_party/tcmalloc/chromium/src/profiler.cc |
+++ b/third_party/tcmalloc/chromium/src/profiler.cc |
@@ -270,7 +270,11 @@ void CpuProfiler::prof_handler(int sig, siginfo_t*, void* signal_ucontext, |
// The top-most active routine doesn't show up as a normal |
// frame, but as the "pc" value in the signal handler context. |
+#if defined(__ANDROID__) |
+ stack[0] = GetPC(*reinterpret_cast<tcmalloc::ucontext_t*>(signal_ucontext)); |
+#else |
stack[0] = GetPC(*reinterpret_cast<ucontext_t*>(signal_ucontext)); |
+#endif |
// We skip the top two stack trace entries (this function and one |
// signal handler frame) since they are artifacts of profiling and |