Commit 2b7bd98c authored by Bo Liu's avatar Bo Liu Committed by Commit Bot

android: Add UMA that counts all crashes

This counts all crashes (ie crash report is non-empty). This metric
isn't generally useful since we don't traditionally cared a whole
lot about crashes while in background. However it is useful for
correlating with number of crash reports in the crash database.

Change-Id: Idea2e865e66ced5d7ccc4fc1b359d3793433d2ab
Reviewed-on: https://chromium-review.googlesource.com/1069419Reviewed-by: default avatarMaria Khomenko <mariakhomenko@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560807}
parent 2cf52872
......@@ -40,7 +40,9 @@ enum class ProcessedCrashCounts {
kRendererForegroundVisibleSubframeIntentionalKill = 4,
kRendererForegroundVisibleCrash = 5,
kRendererForegroundVisibleSubframeCrash = 6,
kMaxValue = kRendererForegroundVisibleSubframeCrash
kGpuCrashAll = 7,
kRendererCrashAll = 8,
kMaxValue = kRendererCrashAll
};
void LogCount(ProcessedCrashCounts type) {
......@@ -59,13 +61,17 @@ void LogProcessedMetrics(const CrashDumpObserver::TerminationInfo& info,
const bool renderer_visible = info.renderer_has_visible_clients;
const bool renderer_sub_frame = info.renderer_was_subframe;
if (info.process_type == content::PROCESS_TYPE_GPU && app_foreground &&
android_oom_kill) {
LogCount(ProcessedCrashCounts::kGpuForegroundOom);
if (info.process_type == content::PROCESS_TYPE_GPU) {
if (app_foreground && android_oom_kill) {
LogCount(ProcessedCrashCounts::kGpuForegroundOom);
}
if (has_crash_dump) {
LogCount(ProcessedCrashCounts::kGpuCrashAll);
}
}
if (info.process_type == content::PROCESS_TYPE_RENDERER && app_foreground) {
if (renderer_visible) {
if (info.process_type == content::PROCESS_TYPE_RENDERER) {
if (app_foreground && renderer_visible) {
if (android_oom_kill) {
LogCount(
renderer_sub_frame
......@@ -79,13 +85,16 @@ void LogProcessedMetrics(const CrashDumpObserver::TerminationInfo& info,
: ProcessedCrashCounts::kRendererForegroundVisibleCrash);
}
}
if (intentional_kill) {
if (app_foreground && intentional_kill) {
LogCount(ProcessedCrashCounts::kRendererForegroundIntentionalKill);
if (renderer_visible && renderer_sub_frame) {
LogCount(ProcessedCrashCounts::
kRendererForegroundVisibleSubframeIntentionalKill);
}
}
if (has_crash_dump) {
LogCount(ProcessedCrashCounts::kRendererCrashAll);
}
}
}
......
......@@ -982,6 +982,8 @@ uploading your change for review. These are checked by presubmit scripts.
Renderer hosting visible subframe is crashed (with crash report) while app
is foreground.
</int>
<int value="7" label="All GPU process crashes"/>
<int value="8" label="All renderer process crashes"/>
</enum>
<enum name="AndroidResourceExtractionStatus">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment