| OLD | NEW |
| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 | 507 |
| 508 // Record the end of execution in region, generally corresponding to a scope | 508 // Record the end of execution in region, generally corresponding to a scope |
| 509 // being exited. | 509 // being exited. |
| 510 static void TallyRunInAScopedRegionIfTracking(const Births* births, | 510 static void TallyRunInAScopedRegionIfTracking(const Births* births, |
| 511 const TaskStopwatch& stopwatch); | 511 const TaskStopwatch& stopwatch); |
| 512 | 512 |
| 513 const std::string& thread_name() const { return thread_name_; } | 513 const std::string& thread_name() const { return thread_name_; } |
| 514 | 514 |
| 515 // Initializes all statics if needed (this initialization call should be made | 515 // Initializes all statics if needed (this initialization call should be made |
| 516 // while we are single threaded). | 516 // while we are single threaded). |
| 517 static void Initialize(); | 517 static void EnsureTlsInitialization(); |
| 518 | 518 |
| 519 // Sets internal status_. | 519 // Sets internal status_. |
| 520 // If |status| is false, then status_ is set to DEACTIVATED. | 520 // If |status| is false, then status_ is set to DEACTIVATED. |
| 521 // If |status| is true, then status_ is set to PROFILING_ACTIVE. | 521 // If |status| is true, then status_ is set to PROFILING_ACTIVE. |
| 522 static void InitializeAndSetTrackingStatus(Status status); | 522 static void InitializeAndSetTrackingStatus(Status status); |
| 523 | 523 |
| 524 static Status status(); | 524 static Status status(); |
| 525 | 525 |
| 526 // Indicate if any sort of profiling is being done (i.e., we are more than | 526 // Indicate if any sort of profiling is being done (i.e., we are more than |
| 527 // DEACTIVATED). | 527 // DEACTIVATED). |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 ProcessDataSnapshot(const ProcessDataSnapshot& other); | 811 ProcessDataSnapshot(const ProcessDataSnapshot& other); |
| 812 ~ProcessDataSnapshot(); | 812 ~ProcessDataSnapshot(); |
| 813 | 813 |
| 814 PhasedProcessDataSnapshotMap phased_snapshots; | 814 PhasedProcessDataSnapshotMap phased_snapshots; |
| 815 base::ProcessId process_id; | 815 base::ProcessId process_id; |
| 816 }; | 816 }; |
| 817 | 817 |
| 818 } // namespace tracked_objects | 818 } // namespace tracked_objects |
| 819 | 819 |
| 820 #endif // BASE_TRACKED_OBJECTS_H_ | 820 #endif // BASE_TRACKED_OBJECTS_H_ |
| OLD | NEW |