diff options
author | wnwen <wnwen@chromium.org> | 2015-12-07 07:40:06 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-07 15:41:35 +0000 |
commit | 607a5ae353c0e52f034d37fc7de4aa1c8ff3f7ee (patch) | |
tree | d110c93e415649e6a12047f77e3ca938d16b6a48 | |
parent | 8a9633b89b6ce929ac6a8ddc6ef0e1fb04a3480a (diff) | |
download | chromium_src-607a5ae353c0e52f034d37fc7de4aa1c8ff3f7ee.zip chromium_src-607a5ae353c0e52f034d37fc7de4aa1c8ff3f7ee.tar.gz chromium_src-607a5ae353c0e52f034d37fc7de4aa1c8ff3f7ee.tar.bz2 |
Add bounded information to renderer crash stats.
Similar to http://crrev.com/1473753002, this CL extends the native
side UMA recording to also record renderers that crash while not
having a strong binding on android.
This will allow us to confirm our suspicion that the vast majority,
over 99%, of unbound renderer crashes result in no crash report. If
that is indeed the case then we can remove this stat in the future,
but this confirmation is necessary to understand crash sources
holistically. This information is also not present in crash reports,
which means that adding a stat like this one is the only way to add
visibility to whether a renderer crashed while bounded or not.
BUG=510327
NOTRY=true
NOPRESUBMIT=true
Review URL: https://codereview.chromium.org/1469023003
Cr-Commit-Position: refs/heads/master@{#362713}
(cherry picked from commit eb1aff22fa3bcb4319eee0cb15cfe5318385d43b)
R=yfriedman@chromium.org
TBR=cpu@chromium.org,isherman@chromium.org
Review URL: https://codereview.chromium.org/1507583003
Cr-Commit-Position: refs/branch-heads/2564@{#253}
Cr-Branched-From: 1283eca15bd9f772387f75241576cde7bdec7f54-refs/heads/master@{#359700}
-rw-r--r-- | components/crash/content/browser/crash_dump_manager_android.cc | 26 | ||||
-rw-r--r-- | components/crash/content/browser/crash_dump_manager_android.h | 4 | ||||
-rw-r--r-- | tools/metrics/histograms/histograms.xml | 15 |
3 files changed, 32 insertions, 13 deletions
diff --git a/components/crash/content/browser/crash_dump_manager_android.cc b/components/crash/content/browser/crash_dump_manager_android.cc index 1a5954f..20f4afb 100644 --- a/components/crash/content/browser/crash_dump_manager_android.cc +++ b/components/crash/content/browser/crash_dump_manager_android.cc @@ -86,7 +86,7 @@ void CrashDumpManager::ProcessMinidump( const base::FilePath& minidump_path, base::ProcessHandle pid, content::ProcessType process_type, - base::TerminationStatus exit_status, + base::TerminationStatus termination_status, base::android::ApplicationState app_state) { DCHECK_CURRENTLY_ON(BrowserThread::FILE); CHECK(instance_); @@ -95,14 +95,16 @@ void CrashDumpManager::ProcessMinidump( DCHECK(r) << "Failed to retrieve size for minidump " << minidump_path.value(); + // TODO(wnwen): If these numbers match up to TabWebContentsObserver's + // TabRendererCrashStatus histogram, then remove that one as this is more + // accurate with more detail. if (process_type == content::PROCESS_TYPE_RENDERER && - app_state != base::android::APPLICATION_STATE_UNKNOWN && - exit_status == base::TERMINATION_STATUS_OOM_PROTECTED) { + app_state != base::android::APPLICATION_STATE_UNKNOWN) { + ExitStatus renderer_exit_status; bool is_running = (app_state == base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES); bool is_paused = (app_state == base::android::APPLICATION_STATE_HAS_PAUSED_ACTIVITIES); - ExitStatus renderer_exit_status; if (file_size == 0) { if (is_running) { renderer_exit_status = EMPTY_MINIDUMP_WHILE_RUNNING; @@ -120,9 +122,15 @@ void CrashDumpManager::ProcessMinidump( renderer_exit_status = VALID_MINIDUMP_WHILE_BACKGROUND; } } - UMA_HISTOGRAM_ENUMERATION("Tab.RendererDetailedExitStatus", - renderer_exit_status, - ExitStatus::MINIDUMP_STATUS_COUNT); + if (termination_status == base::TERMINATION_STATUS_OOM_PROTECTED) { + UMA_HISTOGRAM_ENUMERATION("Tab.RendererDetailedExitStatus", + renderer_exit_status, + ExitStatus::MINIDUMP_STATUS_COUNT); + } else { + UMA_HISTOGRAM_ENUMERATION("Tab.RendererDetailedExitStatusUnbound", + renderer_exit_status, + ExitStatus::MINIDUMP_STATUS_COUNT); + } } if (file_size == 0) { @@ -213,7 +221,7 @@ void CrashDumpManager::Observe(int type, void CrashDumpManager::OnChildExit(int child_process_id, base::ProcessHandle pid, content::ProcessType process_type, - base::TerminationStatus exit_status, + base::TerminationStatus termination_status, base::android::ApplicationState app_state) { base::FilePath minidump_path; { @@ -234,7 +242,7 @@ void CrashDumpManager::OnChildExit(int child_process_id, minidump_path, pid, process_type, - exit_status, + termination_status, app_state)); } diff --git a/components/crash/content/browser/crash_dump_manager_android.h b/components/crash/content/browser/crash_dump_manager_android.h index 3699d9834..7c6d79e 100644 --- a/components/crash/content/browser/crash_dump_manager_android.h +++ b/components/crash/content/browser/crash_dump_manager_android.h @@ -66,7 +66,7 @@ class CrashDumpManager : public content::BrowserChildProcessObserver, static void ProcessMinidump(const base::FilePath& minidump_path, base::ProcessHandle pid, content::ProcessType process_type, - base::TerminationStatus exit_status, + base::TerminationStatus termination_status, base::android::ApplicationState app_state); // content::BrowserChildProcessObserver implementation: @@ -85,7 +85,7 @@ class CrashDumpManager : public content::BrowserChildProcessObserver, void OnChildExit(int child_process_id, base::ProcessHandle pid, content::ProcessType process_type, - base::TerminationStatus exit_status, + base::TerminationStatus termination_status, base::android::ApplicationState app_state); content::NotificationRegistrar notification_registrar_; diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 56cd014..6fcf6539 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml @@ -47871,8 +47871,19 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. enum="TabRendererDetailedExitStatus"> <owner>wnwen@chromium.org</owner> <summary> - Breakdown of renderer exit status. An extension of the counts in - Tab.RendererExitStatus. Only recorded on Android. + Breakdown of renderer exit status for renderers that have strong bindings. + An extension of the counts in Tab.RendererExitStatus. Only recorded on + Android. + </summary> +</histogram> + +<histogram name="Tab.RendererDetailedExitStatusUnbound" + enum="TabRendererDetailedExitStatus"> + <owner>wnwen@chromium.org</owner> + <summary> + Breakdown of renderer exit status for renderers that do not have strong + bindings. An extension of the counts in Tab.RendererExitStatus. Only + recorded on Android. </summary> </histogram> |