Chromium Code Reviews| 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 86aee41875f0bcfe786c2eef36d392a214c1122b..0a853cdf4524a7132cff225234e9bbbd3348a699 100644 |
| --- a/content/browser/gpu/gpu_process_host.cc |
| +++ b/content/browser/gpu/gpu_process_host.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/bind.h" |
| #include "base/bind_helpers.h" |
| #include "base/command_line.h" |
| +#include "base/cpu.h" |
| #include "base/debug/trace_event.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/metrics/histogram.h" |
| @@ -270,6 +271,28 @@ GpuProcessHost* GpuProcessHost::Get(GpuProcessKind kind, |
| int host_id; |
| host_id = ++last_host_id; |
| +#if defined(ARCH_CPU_X86_FAMILY) |
| + base::CPU cpu; |
| + int arch = 0; |
| + if (cpu.has_sse()) |
| + arch = 1; |
|
apatrick_chromium
2013/01/25 19:06:30
nit: use an enum and comment that it must not be r
|
| + if (cpu.has_sse2()) |
| + arch = 2; |
| + if (cpu.has_sse3()) |
| + arch = 3; |
| + if (cpu.has_ssse3()) |
| + arch = 4; |
| + if (cpu.has_sse41()) |
| + arch = 5; |
| + if (cpu.has_sse42()) |
| + arch = 6; |
| + if (cpu.has_avx()) |
| + arch = 7; |
| + UMA_HISTOGRAM_ENUMERATION("Platform.IntelMaxuArchSupport", |
| + arch, |
| + 8); |
| +#endif // defined(ARCH_CPU_X86_FAMILY) |
| + |
| UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLaunchCause", |
| cause, |
| CAUSE_FOR_GPU_LAUNCH_MAX_ENUM); |