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

Side by Side Diff: base/tracked_objects.h

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « base/timer/timer_unittest.cc ('k') | base/tracked_objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef BASE_TRACKED_OBJECTS_H_ 5 #ifndef BASE_TRACKED_OBJECTS_H_
6 #define BASE_TRACKED_OBJECTS_H_ 6 #define BASE_TRACKED_OBJECTS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <stack> 10 #include <stack>
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 // on. This is currently a compiled option, atop TrackingStatus(). 459 // on. This is currently a compiled option, atop TrackingStatus().
460 static bool TrackingParentChildStatus(); 460 static bool TrackingParentChildStatus();
461 461
462 // Marks a start of a tracked run. It's super fast when tracking is disabled, 462 // Marks a start of a tracked run. It's super fast when tracking is disabled,
463 // and has some internal side effects when we are tracking, so that we can 463 // and has some internal side effects when we are tracking, so that we can
464 // deduce the amount of time accumulated outside of execution of tracked runs. 464 // deduce the amount of time accumulated outside of execution of tracked runs.
465 // The task that will be tracked is passed in as |parent| so that parent-child 465 // The task that will be tracked is passed in as |parent| so that parent-child
466 // relationships can be (optionally) calculated. 466 // relationships can be (optionally) calculated.
467 static void PrepareForStartOfRun(const Births* parent); 467 static void PrepareForStartOfRun(const Births* parent);
468 468
469 // Enables profiler timing.
470 static void EnableProfilerTiming();
471
469 // Provide a time function that does nothing (runs fast) when we don't have 472 // Provide a time function that does nothing (runs fast) when we don't have
470 // the profiler enabled. It will generally be optimized away when it is 473 // the profiler enabled. It will generally be optimized away when it is
471 // ifdef'ed to be small enough (allowing the profiler to be "compiled out" of 474 // ifdef'ed to be small enough (allowing the profiler to be "compiled out" of
472 // the code). 475 // the code).
473 static TrackedTime Now(); 476 static TrackedTime Now();
474 477
475 // Use the function |now| to provide current times, instead of calling the 478 // Use the function |now| to provide current times, instead of calling the
476 // TrackedTime::Now() function. Since this alternate function is being used, 479 // TrackedTime::Now() function. Since this alternate function is being used,
477 // the other time arguments (used for calculating queueing delay) will be 480 // the other time arguments (used for calculating queueing delay) will be
478 // ignored. 481 // ignored.
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 ~ProcessDataSnapshot(); 784 ~ProcessDataSnapshot();
782 785
783 std::vector<TaskSnapshot> tasks; 786 std::vector<TaskSnapshot> tasks;
784 std::vector<ParentChildPairSnapshot> descendants; 787 std::vector<ParentChildPairSnapshot> descendants;
785 int process_id; 788 int process_id;
786 }; 789 };
787 790
788 } // namespace tracked_objects 791 } // namespace tracked_objects
789 792
790 #endif // BASE_TRACKED_OBJECTS_H_ 793 #endif // BASE_TRACKED_OBJECTS_H_
OLDNEW
« no previous file with comments | « base/timer/timer_unittest.cc ('k') | base/tracked_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698