Chromium Code Reviews| Index: base/message_loop.cc |
| diff --git a/base/message_loop.cc b/base/message_loop.cc |
| index 19ce904120de6549656a923a422915dd77ae3c73..d5a08da113d50eb22b23ecf1f5385827b8e3cb1d 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) { |
| + TRACE_EVENT2("base", "MessageLoop::RunTask", |
|
darin (slow to review)
2011/08/31 21:40:55
does this cause the FROM_HERE strings to start get
|
| + "source", pending_task.birth_location.file_line(), |
| + "function", pending_task.birth_location.function_name().data()); |
| 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.birth_location.program_counter(); |
|
darin (slow to review)
2011/08/31 21:40:55
nit: 4 space indent for line continuation
jbates
2011/09/01 23:01:52
Done.
|
| 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), |
| + birth_location(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) |