Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 12049058: Adds AVX detection to CPU and records a histogram of Intel uArch Support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing feedback Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/cpu.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 245f860522411718aac24e6fc5e35542f0145838..80835639b48e0d48e8f4879071d89d1d9a2038d1 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -14,6 +14,7 @@
#include "base/at_exit.h"
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/cpu.h"
#include "base/debug/trace_event.h"
#include "base/file_path.h"
#include "base/file_util.h"
@@ -207,6 +208,13 @@ using content::BrowserThread;
namespace {
+void LogIntelMicroArchitecture() {
+ base::CPU cpu;
+ base::CPU::IntelMicroArchitecture arch = cpu.GetIntelMicroArchitecture();
+ UMA_HISTOGRAM_ENUMERATION("Platform.IntelMaxMicroArchitecture", arch,
+ base::CPU::MAX_INTEL_MICRO_ARCHITECTURE);
+}
+
// This function provides some ways to test crash and assertion handling
// behavior of the program.
void HandleTestParameters(const CommandLine& command_line) {
@@ -1029,6 +1037,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
StartMetricsRecording();
#endif
+#if defined(ARCH_CPU_X86_FAMILY)
+ LogIntelMicroArchitecture();
+#endif // defined(ARCH_CPU_X86_FAMILY)
+
// Create watchdog thread after creating all other threads because it will
// watch the other threads and they must be running.
browser_process_->watchdog_thread();
« no previous file with comments | « base/cpu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698