From 91784fd65b7314e5b296f07b8c487c506df17802 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Wed, 29 Jan 2020 17:08:49 -0800 Subject: simpleperf: support for ARMv8.3-A Pointer Autentication. On devices enabling ARMv8.3-A pointer autentication, return addresses may be signed with authentication code. And we need to strip this code to unwind correctly, using a pac_mask got from the same device. Simpleperf supports recording and unwinding on different devices, mainly for debugging and testing. To avoid breaking it, this CL supports keeping pac_mask in perf.data and providing it to libunwindstack when reporting. Bug: none Test: run simpleperf_unit_test. Change-Id: I8a12a97efbe188599d5438099f8a58842a8f73eb --- simpleperf/cmd_report.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'simpleperf/cmd_report.cpp') diff --git a/simpleperf/cmd_report.cpp b/simpleperf/cmd_report.cpp index 3d5fad90..873819a3 100644 --- a/simpleperf/cmd_report.cpp +++ b/simpleperf/cmd_report.cpp @@ -860,6 +860,10 @@ bool ReportCommand::ReadSampleTreeFromRecordFile() { for (size_t i = 0; i < event_attrs_.size(); ++i) { sample_tree_builder_.push_back(sample_tree_builder_options_.CreateSampleTreeBuilder()); sample_tree_builder_.back()->SetEventName(event_attrs_[i].name); + OfflineUnwinder* unwinder = sample_tree_builder_.back()->GetUnwinder(); + if (unwinder != nullptr) { + unwinder->LoadMetaInfo(record_file_reader_->GetMetaInfoFeature()); + } } if (!record_file_reader_->ReadDataSection( -- cgit v1.2.3