Improve ARM CPU info reporting.

This patch improves several things for Linux/ARM:

- Better detection of the number of CPUs on the target
  device. The content of /proc/cpuinfo only matches the
  number of "online" CPUs, which varies over time with
  recent Android devices.

- Reconstruct the CPUID and ELF hwcaps values from
  /proc/cpuinfo, this is useful to better identify
  target devices in minidumps.

- Make minidump_dump display the new information
  in useful ways.

- Write a small helper class to parse /proc/cpuinfo
  and also use it for x86/64.

- Write a small helper class to parse sysfds cpu lists.

- Add a my_memchr() implementation.

- Add unit tests.

Tested on a Nexus S (1 CPU), Galaxy Nexus (2 CPUs)
and a Nexus 4 (4 CPUs).

Review URL: https://breakpad.appspot.com/540003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1160 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
digit@chromium.org 2013-04-24 10:06:14 +00:00
parent 9f45f6b5cf
commit 593eff42ca
15 changed files with 1249 additions and 127 deletions

View file

@ -77,6 +77,9 @@ SystemInfo::SystemInfo(const Dump &dump,
D32(system_info.cpu.x86_cpu_info.version_information);
D32(system_info.cpu.x86_cpu_info.feature_information);
D32(system_info.cpu.x86_cpu_info.amd_extended_cpu_features);
} else if (system_info.processor_architecture == MD_CPU_ARCHITECTURE_ARM) {
D32(system_info.cpu.arm_cpu_info.cpuid);
D32(system_info.cpu.arm_cpu_info.elf_hwcaps);
} else {
D64(system_info.cpu.other_cpu_info.processor_features[0]);
D64(system_info.cpu.other_cpu_info.processor_features[1]);