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

Unified Diff: content/browser/memory/memory_coordinator_impl.cc

Issue 2466773002: memory coordinator: Add trace macros to track state changes (Closed)
Patch Set: comment Created 4 years, 1 month 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/memory/memory_coordinator_client.cc ('k') | content/child/memory/child_memory_coordinator_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/memory/memory_coordinator_impl.cc
diff --git a/content/browser/memory/memory_coordinator_impl.cc b/content/browser/memory/memory_coordinator_impl.cc
index 5fa4ea4b3b0ed221efb56ecd509975750888fd47..776ce283100a477c4979ead20a61df487522134a 100644
--- a/content/browser/memory/memory_coordinator_impl.cc
+++ b/content/browser/memory/memory_coordinator_impl.cc
@@ -5,6 +5,7 @@
#include "content/browser/memory/memory_coordinator_impl.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "base/trace_event/trace_event.h"
#include "content/browser/memory/memory_monitor.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
@@ -196,6 +197,10 @@ void MemoryCoordinatorImpl::UpdateState() {
}
if (next_state != prev_state) {
+ TRACE_EVENT2("memory-infra", "MemoryCoordinatorImpl::UpdateState",
+ "prev", MemoryStateToString(prev_state),
+ "next", MemoryStateToString(next_state));
+
NotifyStateToClients();
NotifyStateToChildren();
ScheduleUpdateState(minimum_transition_period_);
« no previous file with comments | « base/memory/memory_coordinator_client.cc ('k') | content/child/memory/child_memory_coordinator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698