summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 05:33:45 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 05:33:45 +0000
commit1f085624338804175358157bd1e1b3632be37c93 (patch)
treecdfebd86f786c7d71c1be4b1cb7bbb65ba9f740d /chrome/common
parentb9376951e95e4cb1dda5a21f6f698a359ad51da0 (diff)
downloadchromium_src-1f085624338804175358157bd1e1b3632be37c93.zip
chromium_src-1f085624338804175358157bd1e1b3632be37c93.tar.gz
chromium_src-1f085624338804175358157bd1e1b3632be37c93.tar.bz2
Improve reporting of subprocess crashes.
-Split extension renderer crashes out of the existing UMA renderer crash metric into its own metric. -Add a new metric for the sum of all ChildProcessHost crashes. -Add histograms for each crash type. BUG=28022 TEST=We should start getting more crash reports in UMA and histograms. Review URL: http://codereview.chromium.org/468005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33794 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/child_process_host.cc2
-rw-r--r--chrome/common/child_process_info.h6
-rw-r--r--chrome/common/notification_type.h5
-rw-r--r--chrome/common/pref_names.cc10
-rw-r--r--chrome/common/pref_names.h2
5 files changed, 20 insertions, 5 deletions
diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc
index 077eca5..d7f6ce1 100644
--- a/chrome/common/child_process_host.cc
+++ b/chrome/common/child_process_host.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/file_path.h"
+#include "base/histogram.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/process_util.h"
@@ -183,6 +184,7 @@ void ChildProcessHost::OnChildDied() {
OnProcessCrashed();
// Report that this child process crashed.
Notify(NotificationType::CHILD_PROCESS_CRASHED);
+ UMA_HISTOGRAM_COUNTS("ChildProcess.Crashes", this->type());
}
// Notify in the main loop of the disconnection.
Notify(NotificationType::CHILD_PROCESS_HOST_DISCONNECTED);
diff --git a/chrome/common/child_process_info.h b/chrome/common/child_process_info.h
index 31b1cb84..50d1d0d 100644
--- a/chrome/common/child_process_info.h
+++ b/chrome/common/child_process_info.h
@@ -12,7 +12,10 @@
// Holds information about a child process.
class ChildProcessInfo {
public:
+ // NOTE: Do not remove or reorder the elements in this enum, and only add new
+ // items at the end. We depend on these specific values in a histogram.
enum ProcessType {
+ UNKNOWN_PROCESS = 1,
BROWSER_PROCESS,
RENDER_PROCESS,
PLUGIN_PROCESS,
@@ -21,8 +24,7 @@ class ChildProcessInfo {
UTILITY_PROCESS,
PROFILE_IMPORT_PROCESS,
ZYGOTE_PROCESS,
- SANDBOX_HELPER_PROCESS,
- UNKNOWN_PROCESS,
+ SANDBOX_HELPER_PROCESS
};
ChildProcessInfo(const ChildProcessInfo& original);
diff --git a/chrome/common/notification_type.h b/chrome/common/notification_type.h
index 4ea338d..4a45a3e 100644
--- a/chrome/common/notification_type.h
+++ b/chrome/common/notification_type.h
@@ -357,9 +357,8 @@ class NotificationType {
// Indicates that a render process was closed (meaning it exited, but the
// RenderProcessHost might be reused). The source will be the corresponding
- // RenderProcessHost. The details will be a bool which is true if the
- // process crashed. This may get sent along with
- // RENDERER_PROCESS_TERMINATED.
+ // RenderProcessHost. The details will be a RendererClosedDetails struct.
+ // This may get sent along with RENDERER_PROCESS_TERMINATED.
RENDERER_PROCESS_CLOSED,
// Indicates that a render process has become unresponsive for a period of
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 40b5e0b..c13da00 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -366,6 +366,10 @@ const wchar_t kStabilityPageLoadCount[] =
const wchar_t kStabilityRendererCrashCount[] =
L"user_experience_metrics.stability.renderer_crash_count";
+// Number of times an extension renderer process crashed since the last report.
+const wchar_t kStabilityExtensionRendererCrashCount[] =
+ L"user_experience_metrics.stability.extension_renderer_crash_count";
+
// Time when the app was last launched, in seconds since the epoch.
const wchar_t kStabilityLaunchTimeSec[] =
L"user_experience_metrics.stability.launch_time_sec";
@@ -389,6 +393,12 @@ const wchar_t kStabilityPluginStats[] =
const wchar_t kStabilityRendererHangCount[] =
L"user_experience_metrics.stability.renderer_hang_count";
+// Total number of child process crashes (other than renderer / extension
+// renderer ones, and plugin children, which are counted separately) since the
+// last report.
+const wchar_t kStabilityChildProcessCrashCount[] =
+ L"user_experience_metrics.stability.child_process_crash_count";
+
// Number of times the browser has been able to register crash reporting.
const wchar_t kStabilityBreakpadRegistrationSuccess[] =
L"user_experience_metrics.stability.breakpad_registration_ok";
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 4b107e7..f2f30b2 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -137,10 +137,12 @@ extern const wchar_t kStabilityCrashCount[];
extern const wchar_t kStabilityIncompleteSessionEndCount[];
extern const wchar_t kStabilityPageLoadCount[];
extern const wchar_t kStabilityRendererCrashCount[];
+extern const wchar_t kStabilityExtensionRendererCrashCount[];
extern const wchar_t kStabilityLaunchTimeSec[];
extern const wchar_t kStabilityLastTimestampSec[];
extern const wchar_t kStabilityUptimeSec[];
extern const wchar_t kStabilityRendererHangCount[];
+extern const wchar_t kStabilityChildProcessCrashCount[];
extern const wchar_t kStabilityBreakpadRegistrationSuccess[];
extern const wchar_t kStabilityBreakpadRegistrationFail[];