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 <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <stack> | 10 #include <stack> |
11 #include <string> | 11 #include <string> |
12 #include <utility> | 12 #include <utility> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/base_export.h" | 15 #include "base/base_export.h" |
| 16 #include "base/basictypes.h" |
16 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
17 #include "base/lazy_instance.h" | 18 #include "base/lazy_instance.h" |
18 #include "base/location.h" | 19 #include "base/location.h" |
19 #include "base/profiler/alternate_timer.h" | 20 #include "base/profiler/alternate_timer.h" |
20 #include "base/profiler/tracked_time.h" | 21 #include "base/profiler/tracked_time.h" |
21 #include "base/synchronization/lock.h" | 22 #include "base/synchronization/lock.h" |
22 #include "base/threading/thread_local_storage.h" | 23 #include "base/threading/thread_local_storage.h" |
23 #include "base/tracking_info.h" | 24 |
| 25 namespace base { |
| 26 struct TrackingInfo; |
| 27 } |
24 | 28 |
25 // TrackedObjects provides a database of stats about objects (generally Tasks) | 29 // TrackedObjects provides a database of stats about objects (generally Tasks) |
26 // that are tracked. Tracking means their birth, death, duration, birth thread, | 30 // that are tracked. Tracking means their birth, death, duration, birth thread, |
27 // death thread, and birth place are recorded. This data is carefully spread | 31 // death thread, and birth place are recorded. This data is carefully spread |
28 // across a series of objects so that the counts and times can be rapidly | 32 // across a series of objects so that the counts and times can be rapidly |
29 // updated without (usually) having to lock the data, and hence there is usually | 33 // updated without (usually) having to lock the data, and hence there is usually |
30 // very little contention caused by the tracking. The data can be viewed via | 34 // very little contention caused by the tracking. The data can be viewed via |
31 // the about:profiler URL, with a variety of sorting and filtering choices. | 35 // the about:profiler URL, with a variety of sorting and filtering choices. |
32 // | 36 // |
33 // These classes serve as the basis of a profiler of sorts for the Tasks system. | 37 // These classes serve as the basis of a profiler of sorts for the Tasks system. |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 ~ProcessDataSnapshot(); | 712 ~ProcessDataSnapshot(); |
709 | 713 |
710 std::vector<TaskSnapshot> tasks; | 714 std::vector<TaskSnapshot> tasks; |
711 std::vector<ParentChildPairSnapshot> descendants; | 715 std::vector<ParentChildPairSnapshot> descendants; |
712 int process_id; | 716 int process_id; |
713 }; | 717 }; |
714 | 718 |
715 } // namespace tracked_objects | 719 } // namespace tracked_objects |
716 | 720 |
717 #endif // BASE_TRACKED_OBJECTS_H_ | 721 #endif // BASE_TRACKED_OBJECTS_H_ |
OLD | NEW |