diff options
author | Christopher Ferris <cferris@google.com> | 2017-10-24 15:36:00 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2017-10-24 15:45:59 -0700 |
commit | 1cb84cea2f622327d41abb8845e97dffa055fa4e (patch) | |
tree | f6eee63bebccee922592de7b3946d4aab564475e /libunwindstack/tests/UnwinderTest.cpp | |
parent | 09123383cbdaee9ca0a85289061b7b98ff6160d8 (diff) | |
download | core-1cb84cea2f622327d41abb8845e97dffa055fa4e.tar.gz core-1cb84cea2f622327d41abb8845e97dffa055fa4e.tar.bz2 core-1cb84cea2f622327d41abb8845e97dffa055fa4e.zip |
Add an interface for stopping in certain maps.
Also, change the std::set parameters to std::vector. As jmgao points out,
a small std::set is not really the best choice for performance reasons.
Test: All unit tests pass, enabled the new unwinder and did a kill -3 on
Test: an android process.
Change-Id: I81227d7b79a9b7cf1d54fb0e3331d3cf4d4d3c4f
Diffstat (limited to 'libunwindstack/tests/UnwinderTest.cpp')
-rw-r--r-- | libunwindstack/tests/UnwinderTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libunwindstack/tests/UnwinderTest.cpp b/libunwindstack/tests/UnwinderTest.cpp index 83844732c..8a90baec0 100644 --- a/libunwindstack/tests/UnwinderTest.cpp +++ b/libunwindstack/tests/UnwinderTest.cpp @@ -308,8 +308,8 @@ TEST_F(UnwinderTest, verify_frames_skipped) { ElfInterfaceFake::FakePushStepData(StepData(0, 0, true)); Unwinder unwinder(64, &maps_, ®s_, process_memory_); - std::set<std::string> skip_set{"libunwind.so", "libanother.so"}; - unwinder.Unwind(&skip_set); + std::vector<std::string> skip_libs{"libunwind.so", "libanother.so"}; + unwinder.Unwind(&skip_libs); ASSERT_EQ(3U, unwinder.NumFrames()); @@ -572,7 +572,7 @@ TEST_F(UnwinderTest, map_ignore_suffixes) { ElfInterfaceFake::FakePushStepData(StepData(0, 0, true)); Unwinder unwinder(64, &maps_, ®s_, process_memory_); - std::set<std::string> suffixes{"oat"}; + std::vector<std::string> suffixes{"oat"}; unwinder.Unwind(nullptr, &suffixes); ASSERT_EQ(2U, unwinder.NumFrames()); |