summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2023-09-06 14:50:31 -0700
committerYabin Cui <yabinc@google.com>2024-01-23 14:11:20 -0800
commitb347fdbef643dabf6d2fbc48a9ad94f32e87dc89 (patch)
tree4f53b8f94efa17c718fed546f5daa36455b656e0
parentd85e633e1fd8c647de595a1a74dd07ce718acbb5 (diff)
downloadextras-b347fdbef643dabf6d2fbc48a9ad94f32e87dc89.tar.gz
simpleperf: Fix record_cmd#check_trampoline test
art_jni_trampoline may appear in JIT cache. To load symbols for JIT cache (stored in the recording file), we need to call LoadBuildIdAndFileFeatures(). Bug: 317955689 Bug: 299090869 Test: run simpleperf_unit_test Change-Id: I401b091e27e7b3ae86f003a270b53be4060c922f
-rw-r--r--simpleperf/cmd_record_test.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/simpleperf/cmd_record_test.cpp b/simpleperf/cmd_record_test.cpp
index 4ea71ad1..d3db6d56 100644
--- a/simpleperf/cmd_record_test.cpp
+++ b/simpleperf/cmd_record_test.cpp
@@ -907,6 +907,7 @@ TEST(record_cmd, check_trampoline_after_art_jni_methods) {
auto reader = RecordFileReader::CreateInstance(helper.GetDataPath());
ASSERT_TRUE(reader);
ThreadTree thread_tree;
+ ASSERT_TRUE(reader->LoadBuildIdAndFileFeatures(thread_tree));
auto get_symbol_name = [&](ThreadEntry* thread, uint64_t ip) -> std::string {
const MapEntry* map = thread_tree.FindMap(thread, ip, false);