Index: base/threading/worker_pool_win.cc |
diff --git a/base/threading/worker_pool_win.cc b/base/threading/worker_pool_win.cc |
index 2aa423f035bd46334546a0a138563f5ae6b6b637..b7eaad1b46fea6594c00c723224fdfaaefccfdb8 100644 |
--- a/base/threading/worker_pool_win.cc |
+++ b/base/threading/worker_pool_win.cc |
@@ -5,6 +5,7 @@ |
#include "base/threading/worker_pool.h" |
#include "base/bind.h" |
+#include "base/debug/trace_event.h" |
#include "base/logging.h" |
#include "base/task.h" |
#include "base/tracked_objects.h" |
@@ -17,7 +18,8 @@ struct PendingTask { |
PendingTask( |
const tracked_objects::Location& posted_from, |
const base::Closure& task) |
- : task(task) { |
+ : posted_from(posted_from), |
+ task(task) { |
#if defined(TRACK_ALL_TASK_OBJECTS) |
post_births = tracked_objects::ThreadData::TallyABirthIfActive(posted_from); |
time_posted = TimeTicks::Now(); |
@@ -32,12 +34,18 @@ struct PendingTask { |
TimeTicks time_posted; |
#endif // defined(TRACK_ALL_TASK_OBJECTS) |
+ // The site this PendingTask was posted from. |
+ tracked_objects::Location posted_from; |
+ |
// The task to run. |
base::Closure task; |
}; |
DWORD CALLBACK WorkItemCallback(void* param) { |
PendingTask* pending_task = static_cast<PendingTask*>(param); |
+ UNSHIPPED_TRACE_EVENT2("task", "WorkItemCallback::Run", |
+ "src_file", pending_task->posted_from.file_name(), |
+ "src_func", pending_task->posted_from.function_name()); |
pending_task->task.Run(); |
#if defined(TRACK_ALL_TASK_OBJECTS) |
tracked_objects::ThreadData::TallyADeathIfActive( |