| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // Gets all log messages stored within. | 179 // Gets all log messages stored within. |
| 180 std::vector<std::string> GetLogMessages(); | 180 std::vector<std::string> GetLogMessages(); |
| 181 | 181 |
| 182 // Gets all the known modules. | 182 // Gets all the known modules. |
| 183 std::vector<GlobalActivityTracker::ModuleInfo> GetModules(); | 183 std::vector<GlobalActivityTracker::ModuleInfo> GetModules(); |
| 184 | 184 |
| 185 // Gets the corresponding "program location" for a given "program counter". | 185 // Gets the corresponding "program location" for a given "program counter". |
| 186 // This will return {0,0} if no mapping could be found. | 186 // This will return {0,0} if no mapping could be found. |
| 187 ProgramLocation GetProgramLocationFromAddress(uint64_t address); | 187 ProgramLocation GetProgramLocationFromAddress(uint64_t address); |
| 188 | 188 |
| 189 // Returns whether the data is complete. Data can be incomplete if the |
| 190 // recording size quota is hit. |
| 191 bool IsDataComplete() const; |
| 192 |
| 189 private: | 193 private: |
| 190 using AnalyzerMap = | 194 using AnalyzerMap = |
| 191 std::map<ThreadKey, std::unique_ptr<ThreadActivityAnalyzer>>; | 195 std::map<ThreadKey, std::unique_ptr<ThreadActivityAnalyzer>>; |
| 192 | 196 |
| 193 struct UserDataSnapshot { | 197 struct UserDataSnapshot { |
| 194 // Complex class needs out-of-line ctor/dtor. | 198 // Complex class needs out-of-line ctor/dtor. |
| 195 UserDataSnapshot(); | 199 UserDataSnapshot(); |
| 196 UserDataSnapshot(const UserDataSnapshot& rhs); | 200 UserDataSnapshot(const UserDataSnapshot& rhs); |
| 197 UserDataSnapshot(UserDataSnapshot&& rhs); | 201 UserDataSnapshot(UserDataSnapshot&& rhs); |
| 198 ~UserDataSnapshot(); | 202 ~UserDataSnapshot(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 AnalyzerMap::iterator analyzers_iterator_; | 237 AnalyzerMap::iterator analyzers_iterator_; |
| 234 int64_t analyzers_iterator_pid_; | 238 int64_t analyzers_iterator_pid_; |
| 235 | 239 |
| 236 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); | 240 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); |
| 237 }; | 241 }; |
| 238 | 242 |
| 239 } // namespace debug | 243 } // namespace debug |
| 240 } // namespace base | 244 } // namespace base |
| 241 | 245 |
| 242 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ | 246 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ |
| OLD | NEW |