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

Side by Side Diff: base/message_loop.cc

Issue 8894022: Detect child tasks born during a profiled tasks (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/profiler/scoped_profile.cc » ('j') | base/tracked_objects.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 // crashes. Be careful not to assume that the variable itself will have the 486 // crashes. Be careful not to assume that the variable itself will have the
487 // expected value when displayed by the optimizer in an optimized build. 487 // expected value when displayed by the optimizer in an optimized build.
488 // Look at a memory dump of the stack. 488 // Look at a memory dump of the stack.
489 const void* program_counter = 489 const void* program_counter =
490 pending_task.posted_from.program_counter(); 490 pending_task.posted_from.program_counter();
491 base::debug::Alias(&program_counter); 491 base::debug::Alias(&program_counter);
492 492
493 HistogramEvent(kTaskRunEvent); 493 HistogramEvent(kTaskRunEvent);
494 494
495 tracked_objects::TrackedTime start_time = 495 tracked_objects::TrackedTime start_time =
496 tracked_objects::ThreadData::NowForStartOfRun(); 496 tracked_objects::ThreadData::NowForStartOfRun(pending_task.birth_tally);
497 497
498 FOR_EACH_OBSERVER(TaskObserver, task_observers_, 498 FOR_EACH_OBSERVER(TaskObserver, task_observers_,
499 WillProcessTask(pending_task.time_posted)); 499 WillProcessTask(pending_task.time_posted));
500 pending_task.task.Run(); 500 pending_task.task.Run();
501 FOR_EACH_OBSERVER(TaskObserver, task_observers_, 501 FOR_EACH_OBSERVER(TaskObserver, task_observers_,
502 DidProcessTask(pending_task.time_posted)); 502 DidProcessTask(pending_task.time_posted));
503 503
504 tracked_objects::ThreadData::TallyRunOnNamedThreadIfTracking(pending_task, 504 tracked_objects::ThreadData::TallyRunOnNamedThreadIfTracking(pending_task,
505 start_time, tracked_objects::ThreadData::NowForEndOfRun()); 505 start_time, tracked_objects::ThreadData::NowForEndOfRun());
506 506
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 Watcher *delegate) { 836 Watcher *delegate) {
837 return pump_libevent()->WatchFileDescriptor( 837 return pump_libevent()->WatchFileDescriptor(
838 fd, 838 fd,
839 persistent, 839 persistent,
840 static_cast<base::MessagePumpLibevent::Mode>(mode), 840 static_cast<base::MessagePumpLibevent::Mode>(mode),
841 controller, 841 controller,
842 delegate); 842 delegate);
843 } 843 }
844 844
845 #endif 845 #endif
OLDNEW
« no previous file with comments | « no previous file | base/profiler/scoped_profile.cc » ('j') | base/tracked_objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698