perf script: Support user regs
authorAndi Kleen <ak@linux.intel.com>
Tue, 5 Sep 2017 18:40:57 +0000 (11:40 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 13 Sep 2017 12:49:14 +0000 (09:49 -0300)
commitb1491ace8eb2e92677cd9ee966763f8f53d29d16
tree26f3d79d66e169d76c9edd1cc56df89cef58c903
parent84c417422798c897f637b0249f64a52807b4a61b
perf script: Support user regs

Teach perf script to print user regs.

  % perf record --user-regs=ip,sp ...
  % perf script -F ip,sym,uregs
  ...
   ffffffff9e060c24 native_write_msr ABI:2    SP:0x7ffd0ea06c38    IP:0x7fe77f55b637
   ffffffff9e060c24 native_write_msr ABI:2    SP:0x7ffd0ea06c38    IP:0x7fe77f55b637
   ffffffff9e060c24 native_write_msr ABI:2    SP:0x7ffd0ea06c38    IP:0x7fe77f55b637
   ffffffff9e060c24 native_write_msr ABI:2    SP:0x7ffd0ea06c38    IP:0x7fe77f55b637
   ffffffff9e00cc12 intel_pmu_handle_irq ABI:2    SP:0x7ffd0ea06c38    IP:0x7fe77f55b637

v2: Rebased on top of phys-addr patches

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/20170905184057.26135-1-andi@firstfloor.org
[ Use PRIu64 for regs->abi in print_sample_uregs() ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-script.txt
tools/perf/builtin-script.c