diff options
Diffstat (limited to 'simpleperf/cmd_report.cpp')
-rw-r--r-- | simpleperf/cmd_report.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/simpleperf/cmd_report.cpp b/simpleperf/cmd_report.cpp index 7fd0f61f..6a043c5f 100644 --- a/simpleperf/cmd_report.cpp +++ b/simpleperf/cmd_report.cpp @@ -629,6 +629,8 @@ bool ReportCommand::ReadEventAttrFromRecordFile() { } bool ReportCommand::ReadFeaturesFromRecordFile() { + // TODO: process features not only for report command, but also for + // other report ways: report_sample, report_lib_interface, etc. std::vector<BuildIdRecord> records = record_file_reader_->ReadBuildIdFeature(); std::vector<std::pair<std::string, BuildId>> build_ids; @@ -637,6 +639,18 @@ bool ReportCommand::ReadFeaturesFromRecordFile() { } Dso::SetBuildIds(build_ids); + if (record_file_reader_->HasFeature(PerfFileFormat::FEAT_FILE)) { + std::string file_path; + uint32_t file_type; + uint64_t min_vaddr; + std::vector<Symbol> symbols; + size_t read_pos = 0; + while (record_file_reader_->ReadFileFeature( + read_pos, &file_path, &file_type, &min_vaddr, &symbols)) { + thread_tree_.AddDsoInfo(file_path, file_type, min_vaddr, &symbols); + } + } + std::string arch = record_file_reader_->ReadFeatureString(PerfFileFormat::FEAT_ARCH); if (!arch.empty()) { |