linux/tools/perf/Documentation
Andi Kleen d812044688 perf script: Add capstone support for '-F +brstackdisasm'
Support capstone output for the '-F +brstackinsn' branch dump.

The new output is enabled with the new field 'brstackdisasm'.

This was possible before with --xed, but now also allow it for users
that don't have xed using the builtin capstone support.

Before:

  perf record -b emacs -Q --batch '()'
  perf script -F +brstackinsn
  ...
            emacs   55778 1814366.755945:     151564 cycles:P:      7f0ab2d17192 intel_check_word.constprop.0+0x162 (/usr/lib64/ld-linux-x86-64.s>        intel_check_word.constprop.0+237:
          00007f0ab2d1711d        insn: 75 e6                     # PRED 3 cycles [3]
          00007f0ab2d17105        insn: 73 51
          00007f0ab2d17107        insn: 48 89 c1
          00007f0ab2d1710a        insn: 48 39 ca
          00007f0ab2d1710d        insn: 73 96
          00007f0ab2d1710f        insn: 48 8d 04 11
          00007f0ab2d17113        insn: 48 d1 e8
          00007f0ab2d17116        insn: 49 8d 34 c1
          00007f0ab2d1711a        insn: 44 3a 06
          00007f0ab2d1711d        insn: 75 e6                     # PRED 3 cycles [6] 3.00 IPC
          00007f0ab2d17105        insn: 73 51                     # PRED 1 cycles [7] 1.00 IPC
          00007f0ab2d17158        insn: 48 8d 50 01
          00007f0ab2d1715c        insn: eb 92                     # PRED 1 cycles [8] 2.00 IPC
          00007f0ab2d170f0        insn: 48 39 ca
          00007f0ab2d170f3        insn: 73 b0                     # PRED 1 cycles [9] 2.00 IPC

After (perf must be compiled with capstone):

  perf script -F +brstackdisasm

  ...
             emacs   55778 1814366.755945:     151564 cycles:P:      7f0ab2d17192 intel_check_word.constprop.0+0x162 (/usr/lib64/ld-linux-x86-64.s>        intel_check_word.constprop.0+237:
          00007f0ab2d1711d        jne intel_check_word.constprop.0+0xd5   # PRED 3 cycles [3]
          00007f0ab2d17105        jae intel_check_word.constprop.0+0x128
          00007f0ab2d17107        movq %rax, %rcx
          00007f0ab2d1710a        cmpq %rcx, %rdx
          00007f0ab2d1710d        jae intel_check_word.constprop.0+0x75
          00007f0ab2d1710f        leaq (%rcx, %rdx), %rax
          00007f0ab2d17113        shrq $1, %rax
          00007f0ab2d17116        leaq (%r9, %rax, 8), %rsi
          00007f0ab2d1711a        cmpb (%rsi), %r8b
          00007f0ab2d1711d        jne intel_check_word.constprop.0+0xd5   # PRED 3 cycles [6] 3.00 IPC
          00007f0ab2d17105        jae intel_check_word.constprop.0+0x128  # PRED 1 cycles [7] 1.00 IPC
          00007f0ab2d17158        leaq 1(%rax), %rdx
          00007f0ab2d1715c        jmp intel_check_word.constprop.0+0xc0   # PRED 1 cycles [8] 2.00 IPC
          00007f0ab2d170f0        cmpq %rcx, %rdx
          00007f0ab2d170f3        jae intel_check_word.constprop.0+0x75   # PRED 1 cycles [9] 2.00 IPC

Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: https://lore.kernel.org/r/20240401210925.209671-3-ak@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2024-04-05 10:43:07 -03:00
..
android.txt
arm-coresight.txt
asciidoc.conf
asciidoctor-extensions.rb
build-docdep.perl
build-xed.txt
Build.txt
callchain-overhead-calculation.txt
cat-texi.perl
db-export.txt
examples.txt
guest-files.txt
guestmount.txt
intel-bts.txt
intel-hybrid.txt
intel-pt.txt
itrace.txt perf auxtrace: Add 'T' itrace option for timestamp trace 2023-11-27 10:21:27 -03:00
jit-interface.txt
jitdump-specification.txt
Makefile
manpage-1.72.xsl
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-suppress-sp.xsl
perf-annotate.txt perf annotate: Add --type-stat option for debugging 2023-12-23 22:40:13 -03:00
perf-archive.txt
perf-arm-spe.txt perf docs arm_spe: Clarify more SPE requirements related to KPTI 2024-03-21 10:41:27 -03:00
perf-bench.txt perf bench sched pipe: Add -G/--cgroups option 2023-10-25 10:02:10 -07:00
perf-buildid-cache.txt
perf-buildid-list.txt
perf-c2c.txt
perf-config.txt perf test: Use existing config value for objdump path 2023-11-27 15:56:34 -03:00
perf-daemon.txt
perf-data.txt
perf-diff.txt
perf-dlfilter.txt
perf-evlist.txt
perf-ftrace.txt
perf-help.txt
perf-inject.txt
perf-intel-pt.txt perf: script: prefer capstone to XED 2024-02-20 18:07:34 -08:00
perf-iostat.txt
perf-kallsyms.txt
perf-kmem.txt
perf-kvm.txt
perf-kwork.txt perf kwork top: Implements BPF-based cpu usage statistics 2023-09-12 17:31:59 -03:00
perf-list.txt perf list: Add output file option 2024-01-26 10:51:49 -03:00
perf-lock.txt perf docs: Fix man page formatting for 'perf lock' 2023-12-03 21:25:44 -03:00
perf-mem.txt
perf-probe.txt
perf-record.txt perf tools: Add branch counter knob 2023-11-09 13:47:50 -03:00
perf-report.txt perf tools: Add -H short option for --hierarchy 2024-01-25 15:24:04 -08:00
perf-sched.txt
perf-script-perl.txt
perf-script-python.txt tools: perf: Expose sample ID / stream ID to python scripts 2024-02-02 18:05:40 -08:00
perf-script.txt perf script: Add capstone support for '-F +brstackdisasm' 2024-04-05 10:43:07 -03:00
perf-stat.txt perf stat: Support per-cluster aggregation 2024-02-09 14:59:53 -08:00
perf-test.txt
perf-timechart.txt
perf-top.txt perf tools: Add -H short option for --hierarchy 2024-01-25 15:24:04 -08:00
perf-trace.txt
perf-version.txt
perf.data-directory-format.txt
perf.data-file-format.txt
perf.txt perf tools: Make it possible to see perf's kernel and module memory mappings 2024-02-08 15:49:39 -08:00
perfconfig.example
security.txt
tips.txt perf Documentation: Add some more hints to tips.txt 2024-02-01 22:18:18 -08:00
topdown.txt