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

Unified Diff: runtime/vm/cpuinfo_linux.cc

Issue 1586663005: VM: Don't do free("") in shutdown when we can't find the cpu model field in /proc/cpuinfo. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « runtime/vm/cpuinfo.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cpuinfo_linux.cc
diff --git a/runtime/vm/cpuinfo_linux.cc b/runtime/vm/cpuinfo_linux.cc
index 0341530ae220590056a8e8a4131a9bc2634cde9a..e58bac1fe6a0d5f2f6bb953a6904038386854b8b 100644
--- a/runtime/vm/cpuinfo_linux.cc
+++ b/runtime/vm/cpuinfo_linux.cc
@@ -28,14 +28,20 @@ void CpuInfo::InitOnce() {
fields_[kCpuInfoFeatures] = "flags";
method_ = kCpuInfoCpuId;
CpuId::InitOnce();
-#elif defined(HOST_ARCH_ARM) || defined(HOST_ARCH_ARM64)
- // TODO(zra): Verify that these field names are correct for arm64.
+#elif defined(HOST_ARCH_ARM)
fields_[kCpuInfoProcessor] = "Processor";
fields_[kCpuInfoModel] = "model name";
fields_[kCpuInfoHardware] = "Hardware";
fields_[kCpuInfoFeatures] = "Features";
method_ = kCpuInfoSystem;
ProcCpuInfo::InitOnce();
+#elif defined(HOST_ARCH_ARM64)
+ fields_[kCpuInfoProcessor] = "Processor";
+ fields_[kCpuInfoModel] = "CPU implementer";
+ fields_[kCpuInfoHardware] = "CPU implementer";
+ fields_[kCpuInfoFeatures] = "Features";
+ method_ = kCpuInfoSystem;
+ ProcCpuInfo::InitOnce();
#elif defined(HOST_ARCH_MIPS)
fields_[kCpuInfoProcessor] = "system type";
fields_[kCpuInfoModel] = "cpu model";
« no previous file with comments | « runtime/vm/cpuinfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698