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

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: Use ConvertableToTraceFormat Created 7 years, 6 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..8e68a4b99d39a057315fb1d4117753b44c55fe29 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -459,8 +459,10 @@ 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.DurationSinceExpectedRunTime().InMilliseconds());
jar (doing other things) 2013/07/08 17:08:33 Possibly not a big deal... I'm always wary of the
Xianzhu 2013/07/08 18:51:39 Changed DurationSinceExpectedRunTime() to return t
+
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