OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/lock.h" | 13 #include "base/lock.h" |
14 #include "base/task.h" | |
15 #include "base/thread_local_storage.h" | 14 #include "base/thread_local_storage.h" |
16 #include "base/tracked.h" | 15 #include "base/tracked.h" |
17 | 16 |
18 // TrackedObjects provides a database of stats about objects (generally Tasks) | 17 // TrackedObjects provides a database of stats about objects (generally Tasks) |
19 // that are tracked. Tracking means their birth, death, duration, birth thread, | 18 // that are tracked. Tracking means their birth, death, duration, birth thread, |
20 // death thread, and birth place are recorded. This data is carefully spread | 19 // death thread, and birth place are recorded. This data is carefully spread |
21 // across a series of objects so that the counts and times can be rapidly | 20 // across a series of objects so that the counts and times can be rapidly |
22 // updated without (usually) having to lock the data, and hence there is usually | 21 // updated without (usually) having to lock the data, and hence there is usually |
23 // very little contention caused by the tracking. The data can be viewed via | 22 // very little contention caused by the tracking. The data can be viewed via |
24 // the about:tasks URL, with a variety of sorting and filtering choices. | 23 // the about:tasks URL, with a variety of sorting and filtering choices. |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 }; | 660 }; |
662 static State state_; | 661 static State state_; |
663 | 662 |
664 DISALLOW_COPY_AND_ASSIGN(AutoTracking); | 663 DISALLOW_COPY_AND_ASSIGN(AutoTracking); |
665 }; | 664 }; |
666 | 665 |
667 | 666 |
668 } // namespace tracked_objects | 667 } // namespace tracked_objects |
669 | 668 |
670 #endif // BASE_TRACKED_OBJECTS_H_ | 669 #endif // BASE_TRACKED_OBJECTS_H_ |
OLD | NEW |