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

Unified Diff: base/threading/worker_pool_win.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/threading/worker_pool_win.cc
diff --git a/base/threading/worker_pool_win.cc b/base/threading/worker_pool_win.cc
index c27010fb12f5789e5582c43d86d0958b817d109d..d84776c7fb64aefebdc33090ee2c8ec7c9044a11 100644
--- a/base/threading/worker_pool_win.cc
+++ b/base/threading/worker_pool_win.cc
@@ -22,8 +22,10 @@ base::LazyInstance<ThreadLocalBoolean>::Leaky
DWORD CALLBACK WorkItemCallback(void* param) {
PendingTask* pending_task = static_cast<PendingTask*>(param);
TRACE_EVENT2("task", "WorkItemCallback::Run",
- "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());
tracked_objects::TrackedTime start_time =
tracked_objects::ThreadData::NowForStartOfRun(pending_task->birth_tally);

Powered by Google App Engine
This is Rietveld 408576698