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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 // Extract user data based on a reference and its identifier. | 170 // Extract user data based on a reference and its identifier. |
171 ActivityUserData::Snapshot GetUserDataSnapshot(int64_t pid, | 171 ActivityUserData::Snapshot GetUserDataSnapshot(int64_t pid, |
172 uint32_t ref, | 172 uint32_t ref, |
173 uint32_t id); | 173 uint32_t id); |
174 | 174 |
175 // Extract the data for a specific process. An empty snapshot will be | 175 // Extract the data for a specific process. An empty snapshot will be |
176 // returned if the process is not known. | 176 // returned if the process is not known. |
177 const ActivityUserData::Snapshot& GetProcessDataSnapshot(int64_t pid); | 177 const ActivityUserData::Snapshot& GetProcessDataSnapshot(int64_t pid); |
178 | 178 |
179 // Extract the global data. | |
180 const ActivityUserData::Snapshot& GetGlobalDataSnapshot(); | |
181 | |
182 // Gets all log messages stored within. | 179 // Gets all log messages stored within. |
183 std::vector<std::string> GetLogMessages(); | 180 std::vector<std::string> GetLogMessages(); |
184 | 181 |
185 // Gets all the known modules. | 182 // Gets all the known modules. |
186 std::vector<GlobalActivityTracker::ModuleInfo> GetModules(); | 183 std::vector<GlobalActivityTracker::ModuleInfo> GetModules(); |
187 | 184 |
188 // Gets the corresponding "program location" for a given "program counter". | 185 // Gets the corresponding "program location" for a given "program counter". |
189 // This will return {0,0} if no mapping could be found. | 186 // This will return {0,0} if no mapping could be found. |
190 ProgramLocation GetProgramLocationFromAddress(uint64_t address); | 187 ProgramLocation GetProgramLocationFromAddress(uint64_t address); |
191 | 188 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 std::vector<int64_t> process_ids_; | 226 std::vector<int64_t> process_ids_; |
230 | 227 |
231 // A map, keyed by ThreadKey, of all valid activity analyzers. | 228 // A map, keyed by ThreadKey, of all valid activity analyzers. |
232 AnalyzerMap analyzers_; | 229 AnalyzerMap analyzers_; |
233 | 230 |
234 // The iterator within the analyzers_ map for returning analyzers through | 231 // The iterator within the analyzers_ map for returning analyzers through |
235 // first/next iteration. | 232 // first/next iteration. |
236 AnalyzerMap::iterator analyzers_iterator_; | 233 AnalyzerMap::iterator analyzers_iterator_; |
237 int64_t analyzers_iterator_pid_; | 234 int64_t analyzers_iterator_pid_; |
238 | 235 |
239 // Snapshot of the global data. | |
240 ActivityUserData::Snapshot global_data_snapshot_; | |
241 | |
242 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); | 236 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); |
243 }; | 237 }; |
244 | 238 |
245 } // namespace debug | 239 } // namespace debug |
246 } // namespace base | 240 } // namespace base |
247 | 241 |
248 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ | 242 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ |
OLD | NEW |