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

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

Issue 2466773002: memory coordinator: Add trace macros to track state changes (Closed)
Patch Set: 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.h ('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..46eda86f00e2c09a09b38f6f734385ad0e78e914 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", static_cast<int32_t>(prev_state),
+ "next", static_cast<int32_t>(next_state));
haraken 2016/11/01 03:58:06 Is there any way to pass in human-readable strings
bashi 2016/11/01 04:04:40 I'm happy to add a helper function for MemoryState
bashi 2016/11/01 04:17:27 Done.
+
NotifyStateToClients();
NotifyStateToChildren();
ScheduleUpdateState(minimum_transition_period_);
« no previous file with comments | « base/memory/memory_coordinator_client.h ('k') | content/child/memory/child_memory_coordinator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698