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

Unified Diff: chrome/browser/metrics/metrics_service.cc

Issue 468005: Improve reporting of subprocess crashes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/metrics/metrics_service.cc
===================================================================
--- chrome/browser/metrics/metrics_service.cc (revision 33701)
+++ chrome/browser/metrics/metrics_service.cc (working copy)
@@ -331,7 +331,10 @@
0);
local_state->RegisterIntegerPref(prefs::kStabilityPageLoadCount, 0);
local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0);
+ local_state->RegisterIntegerPref(prefs::kStabilityExtensionRendererCrashCount,
+ 0);
local_state->RegisterIntegerPref(prefs::kStabilityRendererHangCount, 0);
+ local_state->RegisterIntegerPref(prefs::kStabilityChildProcessCrashCount, 0);
local_state->RegisterIntegerPref(prefs::kStabilityBreakpadRegistrationFail,
0);
local_state->RegisterIntegerPref(prefs::kStabilityBreakpadRegistrationSuccess,
@@ -558,8 +561,17 @@
break;
case NotificationType::RENDERER_PROCESS_CLOSED:
- if (*Details<bool>(details).ptr())
- LogRendererCrash();
+ {
+ RenderProcessHost::RendererClosedDetails* process_details =
+ Details<RenderProcessHost::RendererClosedDetails>(details).ptr();
+ if (process_details->did_crash) {
+ if (process_details->was_extension_renderer) {
+ LogExtensionRendererCrash();
+ } else {
+ LogRendererCrash();
+ }
+ }
+ }
break;
case NotificationType::RENDERER_PROCESS_HANG:
@@ -1665,6 +1677,10 @@
IncrementPrefValue(prefs::kStabilityRendererCrashCount);
}
+void MetricsService::LogExtensionRendererCrash() {
+ IncrementPrefValue(prefs::kStabilityExtensionRendererCrashCount);
+}
+
void MetricsService::LogRendererHang() {
IncrementPrefValue(prefs::kStabilityRendererHangCount);
}
@@ -1676,7 +1692,6 @@
Details<ChildProcessInfo> child_details(details);
const std::wstring& child_name = child_details->name();
-
if (child_process_stats_buffer_.find(child_name) ==
child_process_stats_buffer_.end()) {
child_process_stats_buffer_[child_name] =
@@ -1695,6 +1710,11 @@
case NotificationType::CHILD_PROCESS_CRASHED:
stats.process_crashes++;
+ // Exclude plugin crashes from the count below because we report them via
+ // a separate UMA metric.
+ if (child_details->type() != ChildProcessInfo::PLUGIN_PROCESS) {
jar (doing other things) 2009/12/18 16:28:14 There is a surprising asymmetry in this code. I'd
asargent_no_longer_on_chrome 2010/01/05 01:01:19 The cause of this weirdness is probably that the s
+ IncrementPrefValue(prefs::kStabilityChildProcessCrashCount);
+ }
break;
default:

Powered by Google App Engine
This is Rietveld 408576698