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

Unified Diff: base/trace_event/heap_profiler.h

Issue 1839503002: [tracing] Add native allocation tracing mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Increase Backtrace frames, request even more frames Created 4 years, 8 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 | « base/base_switches.cc ('k') | base/trace_event/heap_profiler_allocation_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/heap_profiler.h
diff --git a/base/trace_event/heap_profiler.h b/base/trace_event/heap_profiler.h
index dd587e5e4c72ea40fbfb2bb353dd0052b8688b34..3ac16cd53b0d5ae2270aa5d1cb41152842bd58a9 100644
--- a/base/trace_event/heap_profiler.h
+++ b/base/trace_event/heap_profiler.h
@@ -33,16 +33,20 @@ namespace trace_event_internal {
class BASE_EXPORT HeapProfilerScopedIgnore {
public:
inline HeapProfilerScopedIgnore() {
+ using base::trace_event::AllocationContextTracker;
if (UNLIKELY(
- base::trace_event::AllocationContextTracker::capture_enabled())) {
- base::trace_event::AllocationContextTracker::GetInstanceForCurrentThread()
+ AllocationContextTracker::capture_mode() !=
+ AllocationContextTracker::CaptureMode::DISABLED)) {
+ AllocationContextTracker::GetInstanceForCurrentThread()
->begin_ignore_scope();
}
}
inline ~HeapProfilerScopedIgnore() {
+ using base::trace_event::AllocationContextTracker;
if (UNLIKELY(
- base::trace_event::AllocationContextTracker::capture_enabled())) {
- base::trace_event::AllocationContextTracker::GetInstanceForCurrentThread()
+ AllocationContextTracker::capture_mode() !=
+ AllocationContextTracker::CaptureMode::DISABLED)) {
+ AllocationContextTracker::GetInstanceForCurrentThread()
->end_ignore_scope();
}
}
« no previous file with comments | « base/base_switches.cc ('k') | base/trace_event/heap_profiler_allocation_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698