Chromium Code Reviews| 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 426 | 426 |
| 427 struct ProcessDataPhaseSnapshot; | 427 struct ProcessDataPhaseSnapshot; |
| 428 struct ProcessDataSnapshot; | 428 struct ProcessDataSnapshot; |
| 429 class BASE_EXPORT TaskStopwatch; | 429 class BASE_EXPORT TaskStopwatch; |
| 430 | 430 |
| 431 // Map from profiling phase number to the process-wide snapshotted | 431 // Map from profiling phase number to the process-wide snapshotted |
| 432 // representation of the list of ThreadData objects that died during the given | 432 // representation of the list of ThreadData objects that died during the given |
| 433 // phase. | 433 // phase. |
| 434 typedef std::map<int, ProcessDataPhaseSnapshot> PhasedProcessDataSnapshotMap; | 434 typedef std::map<int, ProcessDataPhaseSnapshot> PhasedProcessDataSnapshotMap; |
| 435 | 435 |
| 436 #ifdef Status | |
| 437 #undef Status // Xlib.h #defines this, which conflicts with enum Status below. | |
|
danakj
2016/05/02 20:12:54
Do this at the places that include Xlib.h
Mark Dittmer
2016/05/04 14:00:07
This seems less useful to me. Here, we are in the
danakj
2016/05/04 20:17:57
Conversely this code has no idea about Xlib.h so p
| |
| 438 #endif | |
| 439 | |
| 436 class BASE_EXPORT ThreadData { | 440 class BASE_EXPORT ThreadData { |
| 437 public: | 441 public: |
| 438 // Current allowable states of the tracking system. The states can vary | 442 // Current allowable states of the tracking system. The states can vary |
| 439 // between ACTIVE and DEACTIVATED, but can never go back to UNINITIALIZED. | 443 // between ACTIVE and DEACTIVATED, but can never go back to UNINITIALIZED. |
| 440 enum Status { | 444 enum Status { |
| 441 UNINITIALIZED, // Pristine, link-time state before running. | 445 UNINITIALIZED, // Pristine, link-time state before running. |
| 442 DORMANT_DURING_TESTS, // Only used during testing. | 446 DORMANT_DURING_TESTS, // Only used during testing. |
| 443 DEACTIVATED, // No longer recording profiling. | 447 DEACTIVATED, // No longer recording profiling. |
| 444 PROFILING_ACTIVE, // Recording profiles. | 448 PROFILING_ACTIVE, // Recording profiles. |
| 445 STATUS_LAST = PROFILING_ACTIVE | 449 STATUS_LAST = PROFILING_ACTIVE |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 811 ProcessDataSnapshot(const ProcessDataSnapshot& other); | 815 ProcessDataSnapshot(const ProcessDataSnapshot& other); |
| 812 ~ProcessDataSnapshot(); | 816 ~ProcessDataSnapshot(); |
| 813 | 817 |
| 814 PhasedProcessDataSnapshotMap phased_snapshots; | 818 PhasedProcessDataSnapshotMap phased_snapshots; |
| 815 base::ProcessId process_id; | 819 base::ProcessId process_id; |
| 816 }; | 820 }; |
| 817 | 821 |
| 818 } // namespace tracked_objects | 822 } // namespace tracked_objects |
| 819 | 823 |
| 820 #endif // BASE_TRACKED_OBJECTS_H_ | 824 #endif // BASE_TRACKED_OBJECTS_H_ |
| OLD | NEW |