summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_report.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-05-25 14:08:05 -0700
committerYabin Cui <yabinc@google.com>2016-05-31 14:16:14 -0700
commitb42129797f17f990ea5a88c6bdc7446000cc361c (patch)
treecbc62824b5cd6bbaa0e012b21529d240fa0a868c /simpleperf/cmd_report.cpp
parentc8642b2dcfd60f12a0cdbd1f9361967d264d2a3a (diff)
downloadextras-b42129797f17f990ea5a88c6bdc7446000cc361c.tar.gz
simpleperf: record kernel symbols in perf.data.
To better support kernel profiling, record kernel symbols in perf.data when necessary. An option --no-dump-kernel-symbols is added in record command to always avoid recording kernel symbols. The way to handle all zero /proc/modules and /proc/kallsyms is improved. Add Better support in finding symbols for kernel modules. Bug: 27403614 Change-Id: I470151c54f8a45ad1c101c1b94490e33d7fd7485
Diffstat (limited to 'simpleperf/cmd_report.cpp')
-rw-r--r--simpleperf/cmd_report.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/simpleperf/cmd_report.cpp b/simpleperf/cmd_report.cpp
index e2cd39c0..2ab58278 100644
--- a/simpleperf/cmd_report.cpp
+++ b/simpleperf/cmd_report.cpp
@@ -583,7 +583,7 @@ bool ReportCommand::ReadSampleTreeFromRecordFile() {
bool ReportCommand::ProcessRecord(std::unique_ptr<Record> record) {
BuildThreadTree(*record, &thread_tree_);
- if (record->header.type == PERF_RECORD_SAMPLE) {
+ if (record->type() == PERF_RECORD_SAMPLE) {
sample_tree_builder_->ProcessSampleRecord(
*static_cast<const SampleRecord*>(record.get()));
}
@@ -616,6 +616,7 @@ void ReportCommand::PrintReportContext(FILE* report_fp) {
if (!record_cmdline_.empty()) {
fprintf(report_fp, "Cmdline: %s\n", record_cmdline_.c_str());
}
+ fprintf(report_fp, "Arch: %s\n", GetArchString(record_file_arch_).c_str());
for (const auto& attr : event_attrs_) {
const EventType* event_type = FindEventTypeByConfig(attr.type, attr.config);
std::string name;