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

Unified Diff: base/trace_event/heap_profiler_scoped_ignore.cc

Issue 1900223003: [tracing] Ignore tracing allocations in heap profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes. 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
Index: base/trace_event/heap_profiler_scoped_ignore.cc
diff --git a/base/trace_event/heap_profiler_scoped_ignore.cc b/base/trace_event/heap_profiler_scoped_ignore.cc
new file mode 100644
index 0000000000000000000000000000000000000000..241f8470430f42092e480713e32406f5c662ae1b
--- /dev/null
+++ b/base/trace_event/heap_profiler_scoped_ignore.cc
@@ -0,0 +1,19 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/trace_event/heap_profiler_scoped_ignore.h"
+
+namespace base {
+namespace trace_event {
+
+HeapProfilerScopedIgnore::HeapProfilerScopedIgnore() {}
+
+HeapProfilerScopedIgnore::~HeapProfilerScopedIgnore() {
Primiano Tucci (use gerrit) 2016/04/21 19:47:32 I'd just add a comment saying: The corresponding
ssid 2016/04/22 04:57:12 Done.
+ if (UNLIKELY(AllocationContextTracker::capture_enabled())) {
+ AllocationContextTracker::GetInstanceForCurrentThread()->end_ignore_scope();
+ }
+}
+
+} // namespace trace_event
+} // namespace base

Powered by Google App Engine
This is Rietveld 408576698