关于linux:perf-report显示CPU寄存器的值

perf-report show value of CPU register

我遵循此文档,并在--intr-regs=ax,bx,r15中使用perf record,试图用PEBS记录记录其他CPU寄存器信息。

但是我如何从perf.data查看这些信息?原始命令为perf report,并且仅显示一些字段,例如开销,命令,共享对象和符号。

有什么办法显示CPU regs的值?


iregs字段中尝试perf script数据转储命令:perf script -F ip,sym,iregs-F的所有字段均记录有tools / perf / builtin-script.c-struct output_option .. all_output_options的源代码,并且iregs仍在此处(同一文件中的OPT_CALLBACK('F',"fields" ...)。还有perf-script.txt文档-https://github.com/torvalds/linux/blob/master/tools/perf/Documentation/perf-script.txt#L115

1
2
3
4
5
6
7
-F::
--fields::
    Comma separated list of fields to print. Options are:
    comm, tid, pid, time, cpu, event, trace, ip, sym, dso, addr, symoff,
    srcline, period, iregs, brstack, brstacksym, flags, bpf-output, brstackinsn,
    callindent, insn, insnlen. Field list can be prepended with the type, trace, sw or hw,
    to indicate to which event type the field list applies.

在Linux内核git中有提交,其中提到了标志--intr-regs。从选项实现开始:

https://github.com/torvalds/linux/search?utf8=?


我找到了一种使用perf report -D来实现它的方法,然后逐个记录地找到了需要记录的寄存器名称(但这似乎效率很低。)。

或者其他人可以提供更简化的方法?