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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // just adding a hack that Reset()s to zero all counts and stats. This is also | 178 // just adding a hack that Reset()s to zero all counts and stats. This is also |
179 // done in a slighly thread-unsafe fashion, as the resetting is done | 179 // done in a slighly thread-unsafe fashion, as the resetting is done |
180 // asynchronously relative to ongoing updates (but all data is 32 bit in size). | 180 // asynchronously relative to ongoing updates (but all data is 32 bit in size). |
181 // For basic profiling, this will work "most of the time," and should be | 181 // For basic profiling, this will work "most of the time," and should be |
182 // sufficient... but storing away DataCollections is the "right way" to do this. | 182 // sufficient... but storing away DataCollections is the "right way" to do this. |
183 // We'll accomplish this via JavaScript storage of snapshots, and then we'll | 183 // We'll accomplish this via JavaScript storage of snapshots, and then we'll |
184 // remove the Reset() methods. We may also need a short-term-max value in | 184 // remove the Reset() methods. We may also need a short-term-max value in |
185 // DeathData that is reset (as synchronously as possible) during each snapshot. | 185 // DeathData that is reset (as synchronously as possible) during each snapshot. |
186 // This will facilitate displaying a max value for each snapshot period. | 186 // This will facilitate displaying a max value for each snapshot period. |
187 | 187 |
188 class MessageLoop; | |
189 | |
190 namespace tracked_objects { | 188 namespace tracked_objects { |
191 | 189 |
192 //------------------------------------------------------------------------------ | 190 //------------------------------------------------------------------------------ |
193 // For a specific thread, and a specific birth place, the collection of all | 191 // For a specific thread, and a specific birth place, the collection of all |
194 // death info (with tallies for each death thread, to prevent access conflicts). | 192 // death info (with tallies for each death thread, to prevent access conflicts). |
195 class ThreadData; | 193 class ThreadData; |
196 class BASE_EXPORT BirthOnThread { | 194 class BASE_EXPORT BirthOnThread { |
197 public: | 195 public: |
198 BirthOnThread(const Location& location, const ThreadData& current); | 196 BirthOnThread(const Location& location, const ThreadData& current); |
199 | 197 |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 } | 721 } |
724 | 722 |
725 private: | 723 private: |
726 | 724 |
727 DISALLOW_COPY_AND_ASSIGN(AutoTracking); | 725 DISALLOW_COPY_AND_ASSIGN(AutoTracking); |
728 }; | 726 }; |
729 | 727 |
730 } // namespace tracked_objects | 728 } // namespace tracked_objects |
731 | 729 |
732 #endif // BASE_TRACKED_OBJECTS_H_ | 730 #endif // BASE_TRACKED_OBJECTS_H_ |
OLD | NEW |