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

Side by Side Diff: base/cpu.h

Issue 188443003: Parsing /proc/cpuinfo for model on Android and Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WIP - comments + nits Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « AUTHORS ('k') | base/cpu.cc » ('j') | base/cpu.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_CPU_H_ 5 #ifndef BASE_CPU_H_
6 #define BASE_CPU_H_ 6 #define BASE_CPU_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // operating system support needed to actually call AVX instuctions. 51 // operating system support needed to actually call AVX instuctions.
52 // Note: you should never need to call this function. It was added in order 52 // Note: you should never need to call this function. It was added in order
53 // to workaround a bug in NSS but |has_avx()| is what you want. 53 // to workaround a bug in NSS but |has_avx()| is what you want.
54 bool has_avx_hardware() const { return has_avx_hardware_; } 54 bool has_avx_hardware() const { return has_avx_hardware_; }
55 bool has_aesni() const { return has_aesni_; } 55 bool has_aesni() const { return has_aesni_; }
56 bool has_non_stop_time_stamp_counter() const { 56 bool has_non_stop_time_stamp_counter() const {
57 return has_non_stop_time_stamp_counter_; 57 return has_non_stop_time_stamp_counter_;
58 } 58 }
59 IntelMicroArchitecture GetIntelMicroArchitecture() const; 59 IntelMicroArchitecture GetIntelMicroArchitecture() const;
60 const std::string& cpu_brand() const { return cpu_brand_; } 60 const std::string& cpu_brand() const { return cpu_brand_; }
61 static std::string CpuBrandInfo();
rptr 2014/03/08 13:03:06 Used for caching CPU brand string before sandbox i
Mark Mentovai 2014/03/10 14:16:24 ptr wrote:
rptr 2014/03/11 15:47:14 Done.
61 62
62 private: 63 private:
63 // Query the processor for CPUID information. 64 // Query the processor for CPUID information.
64 void Initialize(); 65 void Initialize();
65 66
66 int signature_; // raw form of type, family, model, and stepping 67 int signature_; // raw form of type, family, model, and stepping
67 int type_; // process type 68 int type_; // process type
68 int family_; // family of the processor 69 int family_; // family of the processor
69 int model_; // model of processor 70 int model_; // model of processor
70 int stepping_; // processor revision number 71 int stepping_; // processor revision number
(...skipping 10 matching lines...) Expand all
81 bool has_avx_hardware_; 82 bool has_avx_hardware_;
82 bool has_aesni_; 83 bool has_aesni_;
83 bool has_non_stop_time_stamp_counter_; 84 bool has_non_stop_time_stamp_counter_;
84 std::string cpu_vendor_; 85 std::string cpu_vendor_;
85 std::string cpu_brand_; 86 std::string cpu_brand_;
86 }; 87 };
87 88
88 } // namespace base 89 } // namespace base
89 90
90 #endif // BASE_CPU_H_ 91 #endif // BASE_CPU_H_
OLDNEW
« no previous file with comments | « AUTHORS ('k') | base/cpu.cc » ('j') | base/cpu.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698