summaryrefslogtreecommitdiff
path: root/simpleperf/perf_regs_test.cpp
AgeCommit message (Collapse)Author
2021-01-11simpleperf: move all source files into simpleperf namespaceYabin Cui
Bug: none Test: run simpleperf_unit_test Change-Id: I348028ee5bea90ce908bc240fc5efc22c4cd540f
2021-01-07simpleperf: fix arch in RegSet.Yabin Cui
When a 32-bit simpleperf runs on x86_64, GetMachineArch() returns ARCH_X86_32. When it is used to record a 64-bit process, RegSet thinks the arch is ARCH_X86_32, while the correct one is ARCH_X86_64. This bug makes a check failure in OfflineUnwinderImpl::UnwindCallChain(): Check failed: (*ips)[0] == ip_reg_value It is fixed in two ways: 1. Use `uname -m` in GetMachineArch() for 32-bit simpleperf on x86. It can detect a 64-bit device. 2. Use GetArchForAbi() in RegSet. Bug: 175162821 Bug: 174400620 Test: run simpleperf_unit_test. Change-Id: Iab29d5a5e26862d73c7aae15bcc31d1c4044a95e