Index: base/threading/worker_pool_posix.cc |
diff --git a/base/threading/worker_pool_posix.cc b/base/threading/worker_pool_posix.cc |
index c3a382cd1c07fbbdfa288cebe79fb3d89adc8397..3a4408cab86ad32b3e4001088bb040e1550ffe66 100644 |
--- a/base/threading/worker_pool_posix.cc |
+++ b/base/threading/worker_pool_posix.cc |
@@ -5,6 +5,7 @@ |
#include "base/threading/worker_pool_posix.h" |
#include "base/bind.h" |
+#include "base/debug/trace_event.h" |
#include "base/lazy_instance.h" |
#include "base/logging.h" |
#include "base/memory/ref_counted.h" |
@@ -83,6 +84,9 @@ void WorkerThread::ThreadMain() { |
PosixDynamicThreadPool::PendingTask pending_task = pool_->WaitForTask(); |
if (pending_task.task.is_null()) |
break; |
+ UNSHIPPED_TRACE_EVENT2("task", "WorkerThread::ThreadMain::Run", |
+ "src_file", pending_task.posted_from.file_name(), |
+ "src_func", pending_task.posted_from.function_name()); |
pending_task.task.Run(); |
} |
@@ -107,7 +111,8 @@ bool WorkerPool::PostTask(const tracked_objects::Location& from_here, |
PosixDynamicThreadPool::PendingTask::PendingTask( |
const tracked_objects::Location& posted_from, |
const base::Closure& task) |
- : task(task) { |
+ : posted_from(posted_from), |
+ task(task) { |
} |
PosixDynamicThreadPool::PendingTask::~PendingTask() { |