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

Unified Diff: components/browser_watcher/postmortem_report_extractor.cc

Issue 2754483002: Add analyzer support for multiple processes. (Closed)
Patch Set: addressed review comments by manzagop Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/activity_tracker_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_watcher/postmortem_report_extractor.cc
diff --git a/components/browser_watcher/postmortem_report_extractor.cc b/components/browser_watcher/postmortem_report_extractor.cc
index bd12a9a03b4b87f9892195c6a3806bd1d6fce629..c5f2b3c42047453d0f3cfc7528a318f98393d6ac 100644
--- a/components/browser_watcher/postmortem_report_extractor.cc
+++ b/components/browser_watcher/postmortem_report_extractor.cc
@@ -216,8 +216,13 @@ CollectionStatus Extract(const base::FilePath& stability_file,
// Early exit if there is no data.
std::vector<std::string> log_messages = global_analyzer->GetLogMessages();
ActivityUserData::Snapshot global_data_snapshot =
- global_analyzer->GetGlobalUserDataSnapshot();
- ThreadActivityAnalyzer* thread_analyzer = global_analyzer->GetFirstAnalyzer();
+ global_analyzer->GetGlobalDataSnapshot();
+
+ // Extract data for only the first process.
+ // TODO(manzagop): Extend this to all processes.
+ int64_t pid = global_analyzer->GetFirstProcess();
+ ThreadActivityAnalyzer* thread_analyzer =
+ global_analyzer->GetFirstAnalyzer(pid);
if (log_messages.empty() && global_data_snapshot.empty() &&
!thread_analyzer) {
return DEBUG_FILE_NO_DATA;
« no previous file with comments | « base/debug/activity_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698