Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Side by Side Diff: base/debug/activity_analyzer.h

Issue 2544853003: Store log messages in global activity tracker. (Closed)
Patch Set: added comment about NUL terminator Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/debug/activity_analyzer.cc » ('j') | base/debug/activity_tracker.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Iterates over all known valid analyzers or returns null if there are no 125 // Iterates over all known valid analyzers or returns null if there are no
126 // more. Ownership stays with the global analyzer object and all existing 126 // more. Ownership stays with the global analyzer object and all existing
127 // analyzer pointers are invalidated when GetFirstAnalyzer() is called. 127 // analyzer pointers are invalidated when GetFirstAnalyzer() is called.
128 ThreadActivityAnalyzer* GetFirstAnalyzer(); 128 ThreadActivityAnalyzer* GetFirstAnalyzer();
129 ThreadActivityAnalyzer* GetNextAnalyzer(); 129 ThreadActivityAnalyzer* GetNextAnalyzer();
130 130
131 // Gets the analyzer for a specific thread or null if there is none. 131 // Gets the analyzer for a specific thread or null if there is none.
132 // Ownership stays with the global analyzer object. 132 // Ownership stays with the global analyzer object.
133 ThreadActivityAnalyzer* GetAnalyzerForThread(const ThreadKey& key); 133 ThreadActivityAnalyzer* GetAnalyzerForThread(const ThreadKey& key);
134 134
135 // Gets all log messages stored within.
136 std::vector<std::string> GetLogMessages();
137
135 // Gets the corresponding "program location" for a given "program counter". 138 // Gets the corresponding "program location" for a given "program counter".
136 // This will return {0,0} if no mapping could be found. 139 // This will return {0,0} if no mapping could be found.
137 ProgramLocation GetProgramLocationFromAddress(uint64_t address); 140 ProgramLocation GetProgramLocationFromAddress(uint64_t address);
138 141
139 private: 142 private:
140 using AnalyzerMap = 143 using AnalyzerMap =
141 std::map<ThreadKey, std::unique_ptr<ThreadActivityAnalyzer>>; 144 std::map<ThreadKey, std::unique_ptr<ThreadActivityAnalyzer>>;
142 145
143 // Finds, creates, and indexes analyzers for all known processes and threads. 146 // Finds, creates, and indexes analyzers for all known processes and threads.
144 void PrepareAllAnalyzers(); 147 void PrepareAllAnalyzers();
(...skipping 14 matching lines...) Expand all
159 // first/next iteration. 162 // first/next iteration.
160 AnalyzerMap::iterator analyzers_iterator_; 163 AnalyzerMap::iterator analyzers_iterator_;
161 164
162 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); 165 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer);
163 }; 166 };
164 167
165 } // namespace debug 168 } // namespace debug
166 } // namespace base 169 } // namespace base
167 170
168 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ 171 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_
OLDNEW
« no previous file with comments | « no previous file | base/debug/activity_analyzer.cc » ('j') | base/debug/activity_tracker.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698