Index: content/browser/gpu/gpu_process_host.cc |
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc |
index 8c1824b1f030e79183ade9855087769b2197ac41..ab0ad6a8e8d2a36d049fef9ee46b7d8638c74a6a 100644 |
--- a/content/browser/gpu/gpu_process_host.cc |
+++ b/content/browser/gpu/gpu_process_host.cc |
@@ -546,7 +546,7 @@ GpuProcessHost::~GpuProcessHost() { |
// Windows always returns PROCESS_CRASHED on abnormal termination, as it |
// doesn't have a way to distinguish the two. |
UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessExitCode", |
- exit_code, |
+ static_cast<ResultCode>(exit_code), |
RESULT_CODE_LAST_CODE); |
} |
@@ -1132,9 +1132,10 @@ void GpuProcessHost::RecordProcessCrash() { |
// options). |
if (process_launched_ && kind_ == GPU_PROCESS_KIND_SANDBOXED) { |
if (swiftshader_rendering_) { |
- UMA_HISTOGRAM_ENUMERATION("GPU.SwiftShaderLifetimeEvents", |
- DIED_FIRST_TIME + swiftshader_crash_count_, |
- GPU_PROCESS_LIFETIME_EVENT_MAX); |
+ UMA_HISTOGRAM_EXACT_LINEAR( |
+ "GPU.SwiftShaderLifetimeEvents", |
+ DIED_FIRST_TIME + swiftshader_crash_count_, |
+ static_cast<int>(GPU_PROCESS_LIFETIME_EVENT_MAX)); |
if (++swiftshader_crash_count_ >= kGpuMaxCrashCount && |
!disable_crash_limit) { |
@@ -1143,10 +1144,11 @@ void GpuProcessHost::RecordProcessCrash() { |
} |
} else { |
++gpu_crash_count_; |
- UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", |
- std::min(DIED_FIRST_TIME + gpu_crash_count_, |
- GPU_PROCESS_LIFETIME_EVENT_MAX - 1), |
- GPU_PROCESS_LIFETIME_EVENT_MAX); |
+ UMA_HISTOGRAM_EXACT_LINEAR( |
+ "GPU.GPUProcessLifetimeEvents", |
+ std::min(DIED_FIRST_TIME + gpu_crash_count_, |
+ GPU_PROCESS_LIFETIME_EVENT_MAX - 1), |
+ static_cast<int>(GPU_PROCESS_LIFETIME_EVENT_MAX)); |
// Allow about 1 GPU crash per hour to be removed from the crash count, |
// so very occasional crashes won't eventually add up and prevent the |