Index: base/message_loop.cc |
diff --git a/base/message_loop.cc b/base/message_loop.cc |
index d96b57d0f9e859c1eea74a46c96752097d2e92c0..b4af87d520ebc1a6ff7e9755af7c07a549542465 100644 |
--- a/base/message_loop.cc |
+++ b/base/message_loop.cc |
@@ -9,6 +9,7 @@ |
#include "base/bind.h" |
#include "base/compiler_specific.h" |
#include "base/debug/alias.h" |
+#include "base/debug/trace_event.h" |
#include "base/lazy_instance.h" |
#include "base/logging.h" |
#include "base/memory/scoped_ptr.h" |
@@ -458,6 +459,9 @@ bool MessageLoop::ProcessNextDelayedNonNestableTask() { |
} |
void MessageLoop::RunTask(const PendingTask& pending_task) { |
+ UNSHIPPED_TRACE_EVENT2("task", "MessageLoop::RunTask", |
+ "src_file", pending_task.posted_from.file_name(), |
+ "src_func", pending_task.posted_from.function_name()); |
DCHECK(nestable_tasks_allowed_); |
// Execute the task and assume the worst: It is probably not reentrant. |
nestable_tasks_allowed_ = false; |
@@ -467,7 +471,8 @@ void MessageLoop::RunTask(const PendingTask& pending_task) { |
// crashes. Be careful not to assume that the variable itself will have the |
// expected value when displayed by the optimizer in an optimized build. |
// Look at a memory dump of the stack. |
- const void* program_counter = pending_task.birth_program_counter; |
+ const void* program_counter = |
+ pending_task.posted_from.program_counter(); |
base::debug::Alias(&program_counter); |
HistogramEvent(kTaskRunEvent); |
@@ -765,9 +770,9 @@ MessageLoop::PendingTask::PendingTask( |
: task(task), |
time_posted(TimeTicks::Now()), |
delayed_run_time(delayed_run_time), |
+ posted_from(posted_from), |
sequence_num(0), |
- nestable(nestable), |
- birth_program_counter(posted_from.program_counter()) { |
+ nestable(nestable) { |
#if defined(TRACK_ALL_TASK_OBJECTS) |
post_births = tracked_objects::ThreadData::TallyABirthIfActive(posted_from); |
#endif // defined(TRACK_ALL_TASK_OBJECTS) |