KDAB / hotspot

The Linux perf GUI for performance analysis.
4.16k stars 257 forks source link

perfparser: inspect reading feature PerfHeader::SAMPLE_TIME and PerfHeader::BPF_PROG_INFO #537

Open GitMensch opened 1 year ago

GitMensch commented 1 year ago

Is your feature request related to a problem? Please describe. I've just recognized the unhandled features in the PerfHeader messages I get when opening recordings and those two seem to be useful to inspect further. Obviously this is nothing that is important for the short term.

unhandled feature PerfHeader::BPF_PROG_INFO 4
unhandled feature PerfHeader::BPF_BTF 4
unhandled feature PerfHeader::CPU_PMU_CAPS 140
unhandled feature PerfHeader::CACHE 5508
unhandled feature PerfHeader::SAMPLE_TIME 16
feature not properly read PerfHeader::CPU_TOPOLOGY 884 620

Describe the solution you'd like Check the contents of: PerfHeader::SAMPLE_TIME, the perf_event_open manpage says that this "Records a timestamp" - this likely means the summary could output the time of recording. PerfHeader::BPF_PROG_INFO, this contains the struct bpf_prog_info from /include/linux/bpf.h), also see https://www.kernel.org/doc/html/latest/bpf/btf.html ; the entries that seem interesting there are the run_time_ns, possibly there are more.