summaryrefslogtreecommitdiff
path: root/simpleperf/nonlinux_support
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2019-07-18 10:43:32 -0700
committerYabin Cui <yabinc@google.com>2019-07-18 10:46:23 -0700
commit5ac7a258c7cddd23825e7bfc369164511ef17f40 (patch)
tree17c4204d64d9828eff00946323958e88df5c621e /simpleperf/nonlinux_support
parent193ca49c16231dc5511e74f2d925c53166db3021 (diff)
downloadextras-5ac7a258c7cddd23825e7bfc369164511ef17f40.tar.gz
simpleperf: don't expose libunwindstack in OfflineUnwinder.h.
It is to build etm decode library happen to include OfflineUnwinder.h, but don't link with libunwindstack. Bug: 135204414 Test: run simpleperf_unit_test. Change-Id: I924498e7315b50ff44f85445f23c4be342bd39bd
Diffstat (limited to 'simpleperf/nonlinux_support')
-rw-r--r--simpleperf/nonlinux_support/nonlinux_support.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/simpleperf/nonlinux_support/nonlinux_support.cpp b/simpleperf/nonlinux_support/nonlinux_support.cpp
index 19a3cb11..1726b589 100644
--- a/simpleperf/nonlinux_support/nonlinux_support.cpp
+++ b/simpleperf/nonlinux_support/nonlinux_support.cpp
@@ -38,3 +38,19 @@ bool ReadSymbolsFromDexFile(const std::string&, const std::vector<uint64_t>&,
std::vector<DexFileSymbol>*) {
return true;
}
+
+namespace simpleperf {
+
+class DummyOfflineUnwinder : public OfflineUnwinder {
+ public:
+ bool UnwindCallChain(const ThreadEntry&, const RegSet&, const char*, size_t,
+ std::vector<uint64_t>*, std::vector<uint64_t>*) override {
+ return false;
+ }
+};
+
+std::unique_ptr<OfflineUnwinder> OfflineUnwinder::Create(bool) {
+ return std::unique_ptr<OfflineUnwinder>(new DummyOfflineUnwinder);
+}
+
+} // namespace simpleperf \ No newline at end of file