summaryrefslogtreecommitdiff
path: root/simpleperf
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2017-06-22 13:02:29 -0700
committerYabin Cui <yabinc@google.com>2017-06-22 13:02:29 -0700
commit30ae2db613ea82edf7b9cd1aef96a80b270f3df4 (patch)
tree73e4b00ab0bf3ebff7f5ccdf7d63960288ef051d /simpleperf
parent7941d1917b5a222901939b60d6cbc1523245307c (diff)
downloadextras-30ae2db613ea82edf7b9cd1aef96a80b270f3df4.tar.gz
simpleperf: fix x86 register dump on x86_64.
x86_64 linux kernel doesn't support dumping registers like DS. If simpleperf32 requests dumping these registers, it will fail. So don't request them to avoid failure. Bug: None. Test: run simpleperf32 manually on x86_64. Change-Id: I220ce5378bad8f0c3c9deb2ef32128fd3262b96d
Diffstat (limited to 'simpleperf')
-rw-r--r--simpleperf/perf_regs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/simpleperf/perf_regs.cpp b/simpleperf/perf_regs.cpp
index d27b62a9..6aa8bad0 100644
--- a/simpleperf/perf_regs.cpp
+++ b/simpleperf/perf_regs.cpp
@@ -99,7 +99,8 @@ bool IsArchTheSame(ArchType arch1, ArchType arch2, bool strict_check) {
uint64_t GetSupportedRegMask(ArchType arch) {
switch (arch) {
case ARCH_X86_32:
- return ((1ULL << PERF_REG_X86_32_MAX) - 1);
+ return ((1ULL << PERF_REG_X86_32_MAX) - 1) & ~(1ULL << PERF_REG_X86_DS) &
+ ~(1ULL << PERF_REG_X86_ES) & ~(1ULL << PERF_REG_X86_FS) & ~(1ULL << PERF_REG_X86_GS);
case ARCH_X86_64:
return (((1ULL << PERF_REG_X86_64_MAX) - 1) & ~(1ULL << PERF_REG_X86_DS) &
~(1ULL << PERF_REG_X86_ES) & ~(1ULL << PERF_REG_X86_FS) & ~(1ULL << PERF_REG_X86_GS));