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

Unified Diff: base/tracked_objects.cc

Issue 2695013005: Only enable heap tracking under --enable-heap-profiling=task-profiler. (Closed)
Patch Set: Address Gab's nit. Created 3 years, 10 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/trace_event/memory_dump_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tracked_objects.cc
diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc
index 158fb94cc881b6f5605d3ca5c9dcdd6e8e62ed49..1507c0986c23c2d4d5e82503023caac68e043ffe 100644
--- a/base/tracked_objects.cc
+++ b/base/tracked_objects.cc
@@ -783,14 +783,6 @@ void ThreadData::EnsureTlsInitialization() {
// we get the lock earlier in this method.
base::subtle::Release_Store(&status_, kInitialStartupState);
DCHECK(base::subtle::NoBarrier_Load(&status_) != UNINITIALIZED);
-
-#if BUILDFLAG(ENABLE_MEMORY_TASK_PROFILER)
- // Make sure heap tracking is enabled ASAP if the default state is active.
- if (kInitialStartupState == PROFILING_ACTIVE &&
- !base::debug::ThreadHeapUsageTracker::IsHeapTrackingEnabled()) {
- base::debug::ThreadHeapUsageTracker::EnableHeapTracking();
- }
-#endif // BUILDFLAG(ENABLE_MEMORY_TASK_PROFILER)
}
// static
@@ -800,14 +792,9 @@ void ThreadData::InitializeAndSetTrackingStatus(Status status) {
EnsureTlsInitialization(); // No-op if already initialized.
- if (status > DEACTIVATED) {
+ if (status > DEACTIVATED)
status = PROFILING_ACTIVE;
-#if BUILDFLAG(ENABLE_MEMORY_TASK_PROFILER)
- if (!base::debug::ThreadHeapUsageTracker::IsHeapTrackingEnabled())
- base::debug::ThreadHeapUsageTracker::EnableHeapTracking();
-#endif // BUILDFLAG(ENABLE_MEMORY_TASK_PROFILER)
- }
base::subtle::Release_Store(&status_, status);
}
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698