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

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

Issue 2339193003: A collector for postmortem reports (Closed)
Patch Set: Address nits Created 4 years, 3 months 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 | components/browser_watcher/BUILD.gn » ('j') | components/browser_watcher/DEPS » ('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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 ~GlobalActivityAnalyzer(); 108 ~GlobalActivityAnalyzer();
109 109
110 #if !defined(OS_NACL) 110 #if !defined(OS_NACL)
111 // Creates a global analyzer using the contents of a file given in 111 // Creates a global analyzer using the contents of a file given in
112 // |file_path|. 112 // |file_path|.
113 static std::unique_ptr<GlobalActivityAnalyzer> CreateWithFile( 113 static std::unique_ptr<GlobalActivityAnalyzer> CreateWithFile(
114 const FilePath& file_path); 114 const FilePath& file_path);
115 #endif // !defined(OS_NACL) 115 #endif // !defined(OS_NACL)
116 116
117 // Iterates over all known analyzers or returns null if there are no more. 117 // Iterates over all known valid analyzers or returns null if there are no
118 // Ownership stays with the global analyzer object and all existing analyzer 118 // more. Ownership stays with the global analyzer object and all existing
119 // pointers are invalidated when GetFirstAnalyzer() is called. 119 // analyzer pointers are invalidated when GetFirstAnalyzer() is called.
120 ThreadActivityAnalyzer* GetFirstAnalyzer(); 120 ThreadActivityAnalyzer* GetFirstAnalyzer();
121 ThreadActivityAnalyzer* GetNextAnalyzer(); 121 ThreadActivityAnalyzer* GetNextAnalyzer();
122 122
123 // Gets the analyzer for a specific thread or null if there is none. 123 // Gets the analyzer for a specific thread or null if there is none.
124 // Ownership stays with the global analyzer object. 124 // Ownership stays with the global analyzer object.
125 ThreadActivityAnalyzer* GetAnalyzerForThread(const ThreadKey& key); 125 ThreadActivityAnalyzer* GetAnalyzerForThread(const ThreadKey& key);
126 126
127 private: 127 private:
128 using AnalyzerMap = 128 using AnalyzerMap =
129 std::map<ThreadKey, std::unique_ptr<ThreadActivityAnalyzer>>; 129 std::map<ThreadKey, std::unique_ptr<ThreadActivityAnalyzer>>;
(...skipping 17 matching lines...) Expand all
147 // first/next iteration. 147 // first/next iteration.
148 AnalyzerMap::iterator analyzers_iterator_; 148 AnalyzerMap::iterator analyzers_iterator_;
149 149
150 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer); 150 DISALLOW_COPY_AND_ASSIGN(GlobalActivityAnalyzer);
151 }; 151 };
152 152
153 } // namespace debug 153 } // namespace debug
154 } // namespace base 154 } // namespace base
155 155
156 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_ 156 #endif // BASE_DEBUG_ACTIVITY_ANALYZER_H_
OLDNEW
« no previous file with comments | « no previous file | components/browser_watcher/BUILD.gn » ('j') | components/browser_watcher/DEPS » ('J')

Powered by Google App Engine
This is Rietveld 408576698