Commit aa3626ec authored by Bo Liu's avatar Bo Liu Committed by Commit Bot

android: Add crash metrics for OOPIF

Bug: 813232
Change-Id: Ibdddfa25e97f0c5fbf5e737305d16f6dcd70ecd0
Reviewed-on: https://chromium-review.googlesource.com/1055801Reviewed-by: default avatarMaria Khomenko <mariakhomenko@chromium.org>
Reviewed-by: default avatarScott Graham <scottmg@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558041}
parent 889b87cc
......@@ -38,7 +38,9 @@ enum class ProcessedCrashCounts {
kRendererForegroundIntentionalKill = 2,
kRendererForegroundVisibleSubframeOom = 3,
kRendererForegroundVisibleSubframeIntentionalKill = 4,
kMaxValue = kRendererForegroundVisibleSubframeIntentionalKill
kRendererForegroundVisibleCrash = 5,
kRendererForegroundVisibleSubframeCrash = 6,
kMaxValue = kRendererForegroundVisibleSubframeCrash
};
void LogCount(ProcessedCrashCounts type) {
......@@ -63,11 +65,20 @@ void LogProcessedMetrics(const CrashDumpObserver::TerminationInfo& info,
}
if (info.process_type == content::PROCESS_TYPE_RENDERER && app_foreground) {
if (android_oom_kill && renderer_visible) {
LogCount(renderer_sub_frame
if (renderer_visible) {
if (android_oom_kill) {
LogCount(
renderer_sub_frame
? ProcessedCrashCounts::kRendererForegroundVisibleSubframeOom
: ProcessedCrashCounts::kRendererForegroundVisibleOom);
}
if (has_crash_dump) {
LogCount(
renderer_sub_frame
? ProcessedCrashCounts::kRendererForegroundVisibleSubframeCrash
: ProcessedCrashCounts::kRendererForegroundVisibleCrash);
}
}
if (intentional_kill) {
LogCount(ProcessedCrashCounts::kRendererForegroundIntentionalKill);
if (renderer_visible && renderer_sub_frame) {
......
......@@ -973,6 +973,14 @@ uploading your change for review. These are checked by presubmit scripts.
Renderer hosting visible subframe is killed to free renderer slot while app
is foreground.
</int>
<int value="5" label="Visible main frame renderer foreground crash">
Renderer is crashed (with crash report) while app is foreground and renderer
is hosting visible clients (generally tabs).
</int>
<int value="6" label="Visible subframe renderer foreground crash">
Renderer hosting visible subframe is crashed (with crash report) while app
is foreground.
</int>
</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