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

Unified Diff: base/android/jni_android.cc

Issue 2790443002: Revert of Cleaner fall-back stack capture for --enable-heap-profiling=native. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | base/debug/stack_trace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_android.cc
diff --git a/base/android/jni_android.cc b/base/android/jni_android.cc
index 960be3af8017a43a4847bae67f1d5bebd192aa17..56dc5c2ff3fe22c2e4628075beaf1097f60e2f91 100644
--- a/base/android/jni_android.cc
+++ b/base/android/jni_android.cc
@@ -11,6 +11,7 @@
#include "base/android/build_info.h"
#include "base/android/jni_string.h"
#include "base/android/jni_utils.h"
+#include "base/debug/debugging_flags.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/threading/thread_local.h"
@@ -28,7 +29,7 @@
g_class_loader = LAZY_INSTANCE_INITIALIZER;
jmethodID g_class_loader_load_class_method_id = 0;
-#if HAVE_TRACE_STACK_FRAME_POINTERS
+#if BUILDFLAG(ENABLE_PROFILING) && HAVE_TRACE_STACK_FRAME_POINTERS
base::LazyInstance<base::ThreadLocalPointer<void>>::Leaky
g_stack_frame_pointer = LAZY_INSTANCE_INITIALIZER;
#endif
@@ -288,7 +289,7 @@
return ConvertJavaStringToUTF8(exception_string);
}
-#if HAVE_TRACE_STACK_FRAME_POINTERS
+#if BUILDFLAG(ENABLE_PROFILING) && HAVE_TRACE_STACK_FRAME_POINTERS
JNIStackFrameSaver::JNIStackFrameSaver(void* current_fp) {
previous_fp_ = g_stack_frame_pointer.Pointer()->Get();
@@ -303,7 +304,7 @@
return g_stack_frame_pointer.Pointer()->Get();
}
-#endif // HAVE_TRACE_STACK_FRAME_POINTERS
+#endif // ENABLE_PROFILING && HAVE_TRACE_STACK_FRAME_POINTERS
} // namespace android
} // namespace base
« no previous file with comments | « no previous file | base/debug/stack_trace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698