Chromium Code Reviews| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | |
| 12 | 13 |
| 13 #include "base/base_export.h" | 14 #include "base/base_export.h" |
| 14 #include "base/debug/activity_tracker.h" | 15 #include "base/debug/activity_tracker.h" |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 namespace debug { | 18 namespace debug { |
| 18 | 19 |
| 19 class GlobalActivityAnalyzer; | 20 class GlobalActivityAnalyzer; |
| 20 | 21 |
| 21 // This class provides analysis of data captured from a ThreadActivityTracker. | 22 // This class provides analysis of data captured from a ThreadActivityTracker. |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 // Gets all log messages stored within. | 156 // Gets all log messages stored within. |
| 156 std::vector<std::string> GetLogMessages(); | 157 std::vector<std::string> GetLogMessages(); |
| 157 | 158 |
| 158 // Gets all the known modules. | 159 // Gets all the known modules. |
| 159 std::vector<GlobalActivityTracker::ModuleInfo> GetModules(); | 160 std::vector<GlobalActivityTracker::ModuleInfo> GetModules(); |
| 160 | 161 |
| 161 // Gets the corresponding "program location" for a given "program counter". | 162 // Gets the corresponding "program location" for a given "program counter". |
| 162 // This will return {0,0} if no mapping could be found. | 163 // This will return {0,0} if no mapping could be found. |
| 163 ProgramLocation GetProgramLocationFromAddress(uint64_t address); | 164 ProgramLocation GetProgramLocationFromAddress(uint64_t address); |
| 164 | 165 |
| 166 const PersistentMemoryAllocator& allocator() { return *allocator_; } | |
|
bcwhite
2017/03/23 11:32:44
For various historical reasons, allocators are alw
manzagop (departed)
2017/03/23 19:18:54
Removing this, as per your other comments.
| |
| 167 | |
| 165 private: | 168 private: |
| 166 using AnalyzerMap = | 169 using AnalyzerMap = |
| 167 std::map<ThreadKey, std::unique_ptr<ThreadActivityAnalyzer>>; | 170 std::map<ThreadKey, std::unique_ptr<ThreadActivityAnalyzer>>; |
| 168 | 171 |
| 169 // Finds, creates, and indexes analyzers for all known processes and threads. | 172 // Finds, creates, and indexes analyzers for all known processes and threads. |
| 170 void PrepareAllAnalyzers(); | 173 void PrepareAllAnalyzers(); |
| 171 | 174 |
| 172 // The persistent memory allocator holding all tracking data. | 175 // The persistent memory allocator holding all tracking data. |
| 173 std::unique_ptr<PersistentMemoryAllocator> allocator_; | 176 std::unique_ptr<PersistentMemoryAllocator> allocator_; |
| 174 | 177 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 185 // first/next iteration. | 188 // first/next iteration. |
| 186 AnalyzerMap::iterator analyzers_iterator_; | 189 AnalyzerMap::iterator analyzers_iterator_; |
| 187 | 190 |
| 188 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); | 191 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); |
| 189 }; | 192 }; |
| 190 | 193 |
| 191 } // namespace debug | 194 } // namespace debug |
| 192 } // namespace base | 195 } // namespace base |
| 193 | 196 |
| 194 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ | 197 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ |
| OLD | NEW |