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> |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 namespace tracked_objects { | 193 namespace tracked_objects { |
194 | 194 |
195 //------------------------------------------------------------------------------ | 195 //------------------------------------------------------------------------------ |
196 // For a specific thread, and a specific birth place, the collection of all | 196 // For a specific thread, and a specific birth place, the collection of all |
197 // death info (with tallies for each death thread, to prevent access conflicts). | 197 // death info (with tallies for each death thread, to prevent access conflicts). |
198 class ThreadData; | 198 class ThreadData; |
199 class BASE_EXPORT BirthOnThread { | 199 class BASE_EXPORT BirthOnThread { |
200 public: | 200 public: |
201 BirthOnThread(const Location& location, const ThreadData& current); | 201 BirthOnThread(const Location& location, const ThreadData& current); |
202 | 202 |
203 const Location location() const { return location_; } | 203 const Location& location() const { return location_; } |
204 const ThreadData* birth_thread() const { return birth_thread_; } | 204 const ThreadData* birth_thread() const { return birth_thread_; } |
205 | 205 |
206 private: | 206 private: |
207 // File/lineno of birth. This defines the essence of the task, as the context | 207 // File/lineno of birth. This defines the essence of the task, as the context |
208 // of the birth (construction) often tell what the item is for. This field | 208 // of the birth (construction) often tell what the item is for. This field |
209 // is const, and hence safe to access from any thread. | 209 // is const, and hence safe to access from any thread. |
210 const Location location_; | 210 const Location location_; |
211 | 211 |
212 // The thread that records births into this object. Only this thread is | 212 // The thread that records births into this object. Only this thread is |
213 // allowed to update birth_count_ (which changes over time). | 213 // allowed to update birth_count_ (which changes over time). |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 ProcessDataSnapshot(); | 804 ProcessDataSnapshot(); |
805 ~ProcessDataSnapshot(); | 805 ~ProcessDataSnapshot(); |
806 | 806 |
807 PhasedProcessDataSnapshotMap phased_snapshots; | 807 PhasedProcessDataSnapshotMap phased_snapshots; |
808 base::ProcessId process_id; | 808 base::ProcessId process_id; |
809 }; | 809 }; |
810 | 810 |
811 } // namespace tracked_objects | 811 } // namespace tracked_objects |
812 | 812 |
813 #endif // BASE_TRACKED_OBJECTS_H_ | 813 #endif // BASE_TRACKED_OBJECTS_H_ |
OLD | NEW |