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/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
17 #include "base/lazy_instance.h" | 17 #include "base/lazy_instance.h" |
18 #include "base/location.h" | 18 #include "base/location.h" |
19 #include "base/profiler/alternate_timer.h" | 19 #include "base/profiler/alternate_timer.h" |
20 #include "base/profiler/tracked_time.h" | 20 #include "base/profiler/tracked_time.h" |
21 #include "base/time.h" | |
22 #include "base/synchronization/lock.h" | 21 #include "base/synchronization/lock.h" |
23 #include "base/threading/thread_local_storage.h" | 22 #include "base/threading/thread_local_storage.h" |
24 #include "base/tracking_info.h" | 23 #include "base/tracking_info.h" |
25 | 24 |
26 // TrackedObjects provides a database of stats about objects (generally Tasks) | 25 // TrackedObjects provides a database of stats about objects (generally Tasks) |
27 // that are tracked. Tracking means their birth, death, duration, birth thread, | 26 // that are tracked. Tracking means their birth, death, duration, birth thread, |
28 // death thread, and birth place are recorded. This data is carefully spread | 27 // death thread, and birth place are recorded. This data is carefully spread |
29 // across a series of objects so that the counts and times can be rapidly | 28 // across a series of objects so that the counts and times can be rapidly |
30 // updated without (usually) having to lock the data, and hence there is usually | 29 // updated without (usually) having to lock the data, and hence there is usually |
31 // very little contention caused by the tracking. The data can be viewed via | 30 // very little contention caused by the tracking. The data can be viewed via |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 ~ProcessDataSnapshot(); | 708 ~ProcessDataSnapshot(); |
710 | 709 |
711 std::vector<TaskSnapshot> tasks; | 710 std::vector<TaskSnapshot> tasks; |
712 std::vector<ParentChildPairSnapshot> descendants; | 711 std::vector<ParentChildPairSnapshot> descendants; |
713 int process_id; | 712 int process_id; |
714 }; | 713 }; |
715 | 714 |
716 } // namespace tracked_objects | 715 } // namespace tracked_objects |
717 | 716 |
718 #endif // BASE_TRACKED_OBJECTS_H_ | 717 #endif // BASE_TRACKED_OBJECTS_H_ |
OLD | NEW |