| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 // Extract user data based on a reference and its identifier. | 149 // Extract user data based on a reference and its identifier. |
| 150 ActivityUserData::Snapshot GetUserDataSnapshot(uint32_t ref, uint32_t id); | 150 ActivityUserData::Snapshot GetUserDataSnapshot(uint32_t ref, uint32_t id); |
| 151 | 151 |
| 152 // Extract the global user data. | 152 // Extract the global user data. |
| 153 ActivityUserData::Snapshot GetGlobalUserDataSnapshot(); | 153 ActivityUserData::Snapshot GetGlobalUserDataSnapshot(); |
| 154 | 154 |
| 155 // Gets all log messages stored within. | 155 // Gets all log messages stored within. |
| 156 std::vector<std::string> GetLogMessages(); | 156 std::vector<std::string> GetLogMessages(); |
| 157 | 157 |
| 158 // Gets all the known modules. |
| 159 std::vector<GlobalActivityTracker::ModuleInfo> GetModules(); |
| 160 |
| 158 // Gets the corresponding "program location" for a given "program counter". | 161 // Gets the corresponding "program location" for a given "program counter". |
| 159 // This will return {0,0} if no mapping could be found. | 162 // This will return {0,0} if no mapping could be found. |
| 160 ProgramLocation GetProgramLocationFromAddress(uint64_t address); | 163 ProgramLocation GetProgramLocationFromAddress(uint64_t address); |
| 161 | 164 |
| 162 private: | 165 private: |
| 163 using AnalyzerMap = | 166 using AnalyzerMap = |
| 164 std::map<ThreadKey, std::unique_ptr<ThreadActivityAnalyzer>>; | 167 std::map<ThreadKey, std::unique_ptr<ThreadActivityAnalyzer>>; |
| 165 | 168 |
| 166 // Finds, creates, and indexes analyzers for all known processes and threads. | 169 // Finds, creates, and indexes analyzers for all known processes and threads. |
| 167 void PrepareAllAnalyzers(); | 170 void PrepareAllAnalyzers(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 182 // first/next iteration. | 185 // first/next iteration. |
| 183 AnalyzerMap::iterator analyzers_iterator_; | 186 AnalyzerMap::iterator analyzers_iterator_; |
| 184 | 187 |
| 185 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); | 188 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); |
| 186 }; | 189 }; |
| 187 | 190 |
| 188 } // namespace debug | 191 } // namespace debug |
| 189 } // namespace base | 192 } // namespace base |
| 190 | 193 |
| 191 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ | 194 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ |
| OLD | NEW |