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

Side by Side Diff: base/tracked_objects.h

Issue 11293086: base: Constantify thread_name() getter accessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « base/threading/thread.h ('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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 const TrackedTime& start_of_run, 414 const TrackedTime& start_of_run,
415 const TrackedTime& end_of_run); 415 const TrackedTime& end_of_run);
416 416
417 // Record the end of execution in region, generally corresponding to a scope 417 // Record the end of execution in region, generally corresponding to a scope
418 // being exited. 418 // being exited.
419 static void TallyRunInAScopedRegionIfTracking( 419 static void TallyRunInAScopedRegionIfTracking(
420 const Births* birth, 420 const Births* birth,
421 const TrackedTime& start_of_run, 421 const TrackedTime& start_of_run,
422 const TrackedTime& end_of_run); 422 const TrackedTime& end_of_run);
423 423
424 const std::string thread_name() const; 424 const std::string& thread_name() const { return thread_name_; }
425 425
426 // Hack: asynchronously clear all birth counts and death tallies data values 426 // Hack: asynchronously clear all birth counts and death tallies data values
427 // in all ThreadData instances. The numerical (zeroing) part is done without 427 // in all ThreadData instances. The numerical (zeroing) part is done without
428 // use of a locks or atomics exchanges, and may (for int64 values) produce 428 // use of a locks or atomics exchanges, and may (for int64 values) produce
429 // bogus counts VERY rarely. 429 // bogus counts VERY rarely.
430 static void ResetAllThreadData(); 430 static void ResetAllThreadData();
431 431
432 // Initializes all statics if needed (this initialization call should be made 432 // Initializes all statics if needed (this initialization call should be made
433 // while we are single threaded). Returns false if unable to initialize. 433 // while we are single threaded). Returns false if unable to initialize.
434 static bool Initialize(); 434 static bool Initialize();
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 ~ProcessDataSnapshot(); 708 ~ProcessDataSnapshot();
709 709
710 std::vector<TaskSnapshot> tasks; 710 std::vector<TaskSnapshot> tasks;
711 std::vector<ParentChildPairSnapshot> descendants; 711 std::vector<ParentChildPairSnapshot> descendants;
712 int process_id; 712 int process_id;
713 }; 713 };
714 714
715 } // namespace tracked_objects 715 } // namespace tracked_objects
716 716
717 #endif // BASE_TRACKED_OBJECTS_H_ 717 #endif // BASE_TRACKED_OBJECTS_H_
OLDNEW
« no previous file with comments | « base/threading/thread.h ('k') | base/tracked_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698