| Index: base/trace_event/heap_profiler.cc
|
| diff --git a/base/trace_event/heap_profiler.cc b/base/trace_event/heap_profiler.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4814c68de0b922f580e71dd7de2eac832d2d58e2
|
| --- /dev/null
|
| +++ b/base/trace_event/heap_profiler.cc
|
| @@ -0,0 +1,23 @@
|
| +// 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.h"
|
| +
|
| +#include "base/compiler_specific.h"
|
| +
|
| +namespace trace_event_internal {
|
| +
|
| +HeapProfilerScopedIgnore::HeapProfilerScopedIgnore() {}
|
| +
|
| +HeapProfilerScopedIgnore::~HeapProfilerScopedIgnore() {
|
| + if (UNLIKELY(
|
| + base::trace_event::AllocationContextTracker::capture_enabled())) {
|
| + // The corresponding begin_ignore_scope is defined in the definition of
|
| + // HEAP_PROFILER_SCOPED_IGNORE in the header.
|
| + base::trace_event::AllocationContextTracker::GetInstanceForCurrentThread()
|
| + ->end_ignore_scope();
|
| + }
|
| +}
|
| +
|
| +} // namespace trace_event_internal
|
|
|