diff options
author | Yabin Cui <yabinc@google.com> | 2022-01-21 17:59:17 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-01-21 17:59:17 +0000 |
commit | 01857daf604c8296eac859c658a9f25af0785efa (patch) | |
tree | b6ec579e2bc9879e51314d3d863d0cc7cc02852b | |
parent | 2cc193fe311984a02c2f6216c92c9186b33e528a (diff) | |
parent | 97b4bb3c9ad16c15bca22605d385ba95263c20db (diff) | |
download | extras-01857daf604c8296eac859c658a9f25af0785efa.tar.gz |
Merge "simpleperf: add test for unwinding small map range."
-rw-r--r-- | simpleperf/cmd_debug_unwind_test.cpp | 10 | ||||
-rw-r--r-- | simpleperf/testdata/debug_unwind_small_map_range.data | bin | 0 -> 204847 bytes |
2 files changed, 10 insertions, 0 deletions
diff --git a/simpleperf/cmd_debug_unwind_test.cpp b/simpleperf/cmd_debug_unwind_test.cpp index 9a6a6fc2..d0bbfe8f 100644 --- a/simpleperf/cmd_debug_unwind_test.cpp +++ b/simpleperf/cmd_debug_unwind_test.cpp @@ -168,3 +168,13 @@ TEST(cmd_debug_unwind, generate_report) { ASSERT_NE(output.find("unwinding_error_code: 4"), std::string::npos); ASSERT_NE(output.find("symbol_2: android.os.Handler.enqueueMessage"), std::string::npos); } + +TEST(cmd_debug_unwind, unwind_sample_for_small_map_range) { + CaptureStdout capture; + ASSERT_TRUE(capture.Start()); + ASSERT_TRUE(DebugUnwindCmd()->Run( + {"-i", GetTestData("debug_unwind_small_map_range.data"), "--unwind-sample"})); + std::string output = capture.Finish(); + ASSERT_NE(output.find("dso_3: /apex/com.android.art/lib64/libart.so"), std::string::npos) + << output; +} diff --git a/simpleperf/testdata/debug_unwind_small_map_range.data b/simpleperf/testdata/debug_unwind_small_map_range.data Binary files differnew file mode 100644 index 00000000..2f94baac --- /dev/null +++ b/simpleperf/testdata/debug_unwind_small_map_range.data |