| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_DEBUG_ACTIVITY_ANALYZER_H_ | 5 #ifndef BASE_DEBUG_ACTIVITY_ANALYZER_H_ |
| 6 #define BASE_DEBUG_ACTIVITY_ANALYZER_H_ | 6 #define BASE_DEBUG_ACTIVITY_ANALYZER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 // Creates a global analyzer from a persistent memory allocator. | 107 // Creates a global analyzer from a persistent memory allocator. |
| 108 explicit GlobalActivityAnalyzer( | 108 explicit GlobalActivityAnalyzer( |
| 109 std::unique_ptr<PersistentMemoryAllocator> allocator); | 109 std::unique_ptr<PersistentMemoryAllocator> allocator); |
| 110 | 110 |
| 111 ~GlobalActivityAnalyzer(); | 111 ~GlobalActivityAnalyzer(); |
| 112 | 112 |
| 113 #if !defined(OS_NACL) | 113 #if !defined(OS_NACL) |
| 114 // Creates a global analyzer using the contents of a file given in | 114 // Creates a global analyzer using the contents of a file given in |
| 115 // |file_path|. | 115 // |file_path|. |
| 116 std::unique_ptr<GlobalActivityAnalyzer> CreateWithFile( | 116 static std::unique_ptr<GlobalActivityAnalyzer> CreateWithFile( |
| 117 const FilePath& file_path); | 117 const FilePath& file_path); |
| 118 #endif // !defined(OS_NACL) | 118 #endif // !defined(OS_NACL) |
| 119 | 119 |
| 120 // Iterates over all known analyzers or returns null if there are no more. | 120 // Iterates over all known analyzers or returns null if there are no more. |
| 121 // Ownership stays with the global analyzer object and all existing analyzer | 121 // Ownership stays with the global analyzer object and all existing analyzer |
| 122 // pointers are invalidated when GetFirstAnalyzer() is called. | 122 // pointers are invalidated when GetFirstAnalyzer() is called. |
| 123 ThreadActivityAnalyzer* GetFirstAnalyzer(); | 123 ThreadActivityAnalyzer* GetFirstAnalyzer(); |
| 124 ThreadActivityAnalyzer* GetNextAnalyzer(); | 124 ThreadActivityAnalyzer* GetNextAnalyzer(); |
| 125 | 125 |
| 126 // Gets the analyzer for a specific thread or null if there is none. | 126 // Gets the analyzer for a specific thread or null if there is none. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 150 // first/next iteration. | 150 // first/next iteration. |
| 151 AnalyzerMap::iterator analyzers_iterator_; | 151 AnalyzerMap::iterator analyzers_iterator_; |
| 152 | 152 |
| 153 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); | 153 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace debug | 156 } // namespace debug |
| 157 } // namespace base | 157 } // namespace base |
| 158 | 158 |
| 159 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ | 159 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ |
| OLD | NEW |