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

Unified Diff: content/child/child_thread_impl.cc

Issue 2386123003: Add heap allocator usage to task profiler. (Closed)
Patch Set: Figure out where the @#$%! corruption is coming from. Move heap tracking to TaskStopwatch." Created 4 years, 2 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: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 43fb48e0f81bdd9b93c83582693ac5772915217e..6d987cedce7343b0b6e9b3cae2bc3a556e3790ec 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -13,6 +13,7 @@
#include "base/debug/alias.h"
#include "base/debug/leak_annotations.h"
#include "base/debug/profiler.h"
+#include "base/debug/scoped_thread_heap_usage.h"
#include "base/lazy_instance.h"
#include "base/location.h"
#include "base/logging.h"
@@ -794,6 +795,10 @@ void ChildThreadImpl::OnSetIPCLoggingEnabled(bool enable) {
#endif // IPC_MESSAGE_LOG_ENABLED
void ChildThreadImpl::OnSetProfilerStatus(ThreadData::Status status) {
+ if (status == ThreadData::PROFILING_ACTIVE &&
+ !base::debug::HeapUsageTracker::IsHeapTrackingEnabled()) {
+ base::debug::HeapUsageTracker::EnableHeapTracking();
+ }
ThreadData::InitializeAndSetTrackingStatus(status);
}
« base/tracked_objects.cc ('K') | « chrome/browser/task_profiler/task_profiler_data_serializer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698