| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_OS_LINUX) | 6 #if defined(TARGET_OS_LINUX) |
| 7 | 7 |
| 8 #include "vm/cpuinfo.h" | 8 #include "vm/cpuinfo.h" |
| 9 #include "vm/cpuid.h" | 9 #include "vm/cpuid.h" |
| 10 #include "vm/proccpuinfo.h" | 10 #include "vm/proccpuinfo.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 void CpuInfo::InitOnce() { | 23 void CpuInfo::InitOnce() { |
| 24 #if defined(HOST_ARCH_IA32) || defined(HOST_ARCH_X64) | 24 #if defined(HOST_ARCH_IA32) || defined(HOST_ARCH_X64) |
| 25 fields_[kCpuInfoProcessor] = "vendor_id"; | 25 fields_[kCpuInfoProcessor] = "vendor_id"; |
| 26 fields_[kCpuInfoModel] = "model name"; | 26 fields_[kCpuInfoModel] = "model name"; |
| 27 fields_[kCpuInfoHardware] = "model name"; | 27 fields_[kCpuInfoHardware] = "model name"; |
| 28 fields_[kCpuInfoFeatures] = "flags"; | 28 fields_[kCpuInfoFeatures] = "flags"; |
| 29 method_ = kCpuInfoCpuId; | 29 method_ = kCpuInfoCpuId; |
| 30 CpuId::InitOnce(); | 30 CpuId::InitOnce(); |
| 31 #elif defined(HOST_ARCH_ARM) | 31 #elif defined(HOST_ARCH_ARM) |
| 32 fields_[kCpuInfoProcessor] = "Processor"; | 32 fields_[kCpuInfoProcessor] = "Processor"; |
| 33 fields_[kCpuInfoModel] = "Hardware"; | 33 fields_[kCpuInfoModel] = "model name"; |
| 34 fields_[kCpuInfoHardware] = "Hardware"; | 34 fields_[kCpuInfoHardware] = "Hardware"; |
| 35 fields_[kCpuInfoFeatures] = "Features"; | 35 fields_[kCpuInfoFeatures] = "Features"; |
| 36 method_ = kCpuInfoSystem; | 36 method_ = kCpuInfoSystem; |
| 37 ProcCpuInfo::InitOnce(); | 37 ProcCpuInfo::InitOnce(); |
| 38 #elif defined(HOST_ARCH_MIPS) | 38 #elif defined(HOST_ARCH_MIPS) |
| 39 fields_[kCpuInfoProcessor] = "system type"; | 39 fields_[kCpuInfoProcessor] = "system type"; |
| 40 fields_[kCpuInfoModel] = "cpu model"; | 40 fields_[kCpuInfoModel] = "cpu model"; |
| 41 fields_[kCpuInfoHardware] = "cpu model"; | 41 fields_[kCpuInfoHardware] = "cpu model"; |
| 42 fields_[kCpuInfoFeatures] = "ASEs implemented"; | 42 fields_[kCpuInfoFeatures] = "ASEs implemented"; |
| 43 method_ = kCpuInfoSystem; | 43 method_ = kCpuInfoSystem; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 (strcmp(field, fields_[kCpuInfoFeatures]) == 0); | 119 (strcmp(field, fields_[kCpuInfoFeatures]) == 0); |
| 120 } else { | 120 } else { |
| 121 ASSERT(method_ == kCpuInfoSystem); | 121 ASSERT(method_ == kCpuInfoSystem); |
| 122 return ProcCpuInfo::HasField(field); | 122 return ProcCpuInfo::HasField(field); |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace dart | 126 } // namespace dart |
| 127 | 127 |
| 128 #endif // defined(TARGET_OS_LINUX) | 128 #endif // defined(TARGET_OS_LINUX) |
| OLD | NEW |