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

Unified Diff: third_party/tcmalloc/chromium/src/profiler.cc

Issue 816933002: Fix to use ucontext_t in unwind.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « third_party/tcmalloc/chromium/src/getpc.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/tcmalloc/chromium/src/getpc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698