OSDN Git Service

Simpleperf: remove dependency on global current_arch.
authorYabin Cui <yabinc@google.com>
Fri, 18 Mar 2016 19:30:31 +0000 (12:30 -0700)
committerYabin Cui <yabinc@google.com>
Fri, 18 Mar 2016 23:24:56 +0000 (16:24 -0700)
commit48460892306fbc232d7623b1aa5be1aefdc1a8a7
treee67cfcd29f7a8d5e1260745686b44e56ee695a37
parent47ea8eeab1ad047432fcecf5b9abb2d015ee66ed
Simpleperf: remove dependency on global current_arch.

When running unit tests on arm64 devices:
[OK] ReportCommandTest.dwarf_callgraph
[OK] record_cmd.dwarf_callchain_sampling.
ERROR: can't unwind data recorded on a different architecture.

It is because ReportCommandtest.dwarf_callgraph opens a perf.data
recorded on x86_64, and changes current_arch. It causes a problem when
the test record_cmd.dwarf_callchain_sampling calls libbacktrace built
on aarch64. Athough it doesn't make the test fail, we should fix this.

Change-Id: I2cd70369a769ef2199cab2302b8b824369be0907
simpleperf/cmd_dumprecord.cpp
simpleperf/cmd_record.cpp
simpleperf/cmd_report.cpp
simpleperf/dwarf_unwind.cpp
simpleperf/dwarf_unwind.h
simpleperf/event_selection_set.cpp
simpleperf/nonlinux_support/nonlinux_support.cpp
simpleperf/perf_regs.cpp
simpleperf/perf_regs.h
simpleperf/record.cpp