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

Unified Diff: base/message_loop/message_loop.cc

Issue 18083015: Add queued_time_ms trace for events in message loop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Naming etc Created 7 years, 5 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: base/message_loop/message_loop.cc
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index 9e33a426eb9f1241be625c25aee1a1585898c6fc..d04f72aa3ff8fafdcfdd0326ead478f879fdac23 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -459,8 +459,11 @@ void MessageLoop::RunTask(const PendingTask& pending_task) {
TRACE_EVENT_FLOW_END0("task", "MessageLoop::PostTask",
TRACE_ID_MANGLE(GetTaskTraceID(pending_task, this)));
TRACE_EVENT2("task", "MessageLoop::RunTask",
- "src_file", pending_task.posted_from.file_name(),
- "src_func", pending_task.posted_from.function_name());
+ "src", pending_task.posted_from.ToTraceFormat(),
+ "queued_time_ms",
+ pending_task.DurationSinceEffectiveTimePosted()
+ .InMilliseconds());
+
DCHECK(nestable_tasks_allowed_);
// Execute the task and assume the worst: It is probably not reentrant.
nestable_tasks_allowed_ = false;

Powered by Google App Engine
This is Rietveld 408576698