linux-stable/tools/perf/Documentation
Arnaldo Carvalho de Melo 43c4023152 perf annotate: Allow setting the offset level in .perfconfig
The default is 1 (jump_target):

  # perf annotate --ignore-vmlinux --stdio2 _raw_spin_lock_irqsave
  Samples: 3K of event 'cycles:ppp', 3000 Hz, Event count (approx.): 2766398574
  _raw_spin_lock_irqsave() /proc/kcore
    0.26        nop
    4.61        push   %rbx
   19.33        pushfq
    7.97        pop    %rax
    0.32        nop
    0.06        mov    %rax,%rbx
   14.63        cli
    0.06        nop
                xor    %eax,%eax
                mov    $0x1,%edx
   49.94        lock   cmpxchg %edx,(%rdi)
    0.16        test   %eax,%eax
              ↓ jne    2b
    2.66        mov    %rbx,%rax
                pop    %rbx
              ← retq
          2b:   mov    %eax,%esi
              → callq  *ffffffffb30eaed0
                mov    %rbx,%rax
                pop    %rbx
              ← retq
  #

But one can ask for showing offsets for call instructions by setting
this:

  # perf annotate --ignore-vmlinux --stdio2 _raw_spin_lock_irqsave
  Samples: 3K of event 'cycles:ppp', 3000 Hz, Event count (approx.): 2766398574
  _raw_spin_lock_irqsave() /proc/kcore
    0.26        nop
    4.61        push   %rbx
   19.33        pushfq
    7.97        pop    %rax
    0.32        nop
    0.06        mov    %rax,%rbx
   14.63        cli
    0.06        nop
                xor    %eax,%eax
                mov    $0x1,%edx
   49.94        lock   cmpxchg %edx,(%rdi)
    0.16        test   %eax,%eax
              ↓ jne    2b
    2.66        mov    %rbx,%rax
                pop    %rbx
              ← retq
          2b:   mov    %eax,%esi
          2d: → callq  *ffffffffb30eaed0
                mov    %rbx,%rax
                pop    %rbx
              ← retq
  #

Or using a big value to ask for all offsets to be shown:

  # cat ~/.perfconfig
  [annotate]

	offset_level = 100

	hide_src_code = true
  # perf annotate --ignore-vmlinux --stdio2 _raw_spin_lock_irqsave
  Samples: 3K of event 'cycles:ppp', 3000 Hz, Event count (approx.): 2766398574
  _raw_spin_lock_irqsave() /proc/kcore
    0.26   0:   nop
    4.61   5:   push   %rbx
   19.33   6:   pushfq
    7.97   7:   pop    %rax
    0.32   8:   nop
    0.06   d:   mov    %rax,%rbx
   14.63  10:   cli
    0.06  11:   nop
          17:   xor    %eax,%eax
          19:   mov    $0x1,%edx
   49.94  1e:   lock   cmpxchg %edx,(%rdi)
    0.16  22:   test   %eax,%eax
          24: ↓ jne    2b
    2.66  26:   mov    %rbx,%rax
          29:   pop    %rbx
          2a: ← retq
          2b:   mov    %eax,%esi
          2d: → callq  *ffffffffb30eaed0
          32:   mov    %rbx,%rax
          35:   pop    %rbx
          36: ← retq
   #

This also affects the TUI, i.e. the default 'perf annotate' and 'perf
top/report' -> A hotkey -> annotate interfaces, when slang-devel is present
in the build, i.e.:

  # perf version --build-options | grep slang
              libslang: [ on  ]  # HAVE_SLANG_SUPPORT
  #

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Martin Liška <mliska@suse.cz>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Thomas Richter <tmricht@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-venm6x5zrt40eu8hxdsmqxz6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-04-13 10:00:05 -03:00
..
android.txt perf tools: Update android build documentation 2016-07-04 20:27:27 -03:00
asciidoc.conf
Build.txt perf build: Add build documentation 2015-02-12 17:53:00 -03:00
callchain-overhead-calculation.txt perf tools: Document --children option in more detail 2015-04-29 10:38:06 -03:00
examples.txt
intel-bts.txt perf tools: Add Intel BTS support 2015-08-21 11:34:10 -03:00
intel-pt.txt perf intel-pt: Fix syntax in documentation of config option 2017-09-01 14:45:59 -03:00
itrace.txt perf auxtrace: Add itrace option to output power events 2017-06-27 12:09:58 -03:00
jit-interface.txt
jitdump-specification.txt perf jit: Add jitdump format specification document 2016-10-24 11:07:41 -03:00
Makefile perf tools: Really install manpages via 'make install-man' 2017-08-22 13:24:53 -03:00
manpage-1.72.xsl
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-suppress-sp.xsl
perf-annotate.txt perf annotate: Introduce --ignore-vmlinux command line option 2018-03-21 12:53:42 -03:00
perf-archive.txt
perf-bench.txt perf bench mem: Rename 'routine' to 'function' 2015-10-19 16:10:25 -03:00
perf-buildid-cache.txt perf buildid-cache: Document missing --force option 2017-11-16 14:50:07 -03:00
perf-buildid-list.txt
perf-c2c.txt perf c2c record: Record physical addresses in samples 2018-03-16 13:52:57 -03:00
perf-config.txt perf annotate: Allow setting the offset level in .perfconfig 2018-04-13 10:00:05 -03:00
perf-data.txt perf tools: Correct title markers for asciidoctor 2018-03-07 10:26:32 -03:00
perf-diff.txt perf diff: Add -q/--quiet option 2017-02-20 11:47:08 -03:00
perf-evlist.txt perf evlist: Document missing --force option 2017-11-16 14:50:07 -03:00
perf-ftrace.txt perf tools: Correct title markers for asciidoctor 2018-03-07 10:26:32 -03:00
perf-help.txt
perf-inject.txt perf inject: Document missing options 2017-11-16 14:50:05 -03:00
perf-kallsyms.txt perf tools: Correct title markers for asciidoctor 2018-03-07 10:26:32 -03:00
perf-kmem.txt perf kmem: Document a missing option & an argument 2018-02-16 14:55:42 -03:00
perf-kvm.txt perf tools: Configurable per thread proc map processing time out 2015-06-19 18:27:13 -03:00
perf-list.txt perf pmu: Support wildcards on pmu name in dynamic pmu events 2018-03-08 10:05:25 -03:00
perf-lock.txt perf lock: Document missing options 2017-11-16 14:50:04 -03:00
perf-mem.txt perf mem: Document a missing option 2018-02-16 14:55:42 -03:00
perf-probe.txt perf probe: Support escaped character in parser 2017-12-27 12:15:55 -03:00
perf-record.txt perf record: Throttle user defined frequencies to the maximum allowed 2018-03-05 09:58:44 -03:00
perf-report.txt perf tools: Add a "dso_size" sort order 2018-04-02 07:57:37 -03:00
perf-sched.txt perf sched: Fix documentation for timehist 2018-04-12 10:33:36 -03:00
perf-script-perl.txt perf tools: Correct title markers for asciidoctor 2018-03-07 10:26:32 -03:00
perf-script-python.txt perf script python: Remove dups in documentation examples 2017-06-07 20:36:12 -03:00
perf-script.txt perf script: Add --show-round-event to display PERF_RECORD_FINISHED_ROUND 2018-02-16 10:09:23 -03:00
perf-stat.txt perf stat: Enable 1ms interval for printing event counters values 2018-04-12 09:29:31 -03:00
perf-test.txt perf test: Add -F/--dont-fork option 2016-06-30 18:27:45 -03:00
perf-timechart.txt perf timechart: Document missing --force option 2017-11-16 14:50:06 -03:00
perf-top.txt perf top: Document --ignore-vmlinux 2018-03-19 13:51:52 -03:00
perf-trace.txt perf trace: Show only failing syscalls 2018-04-02 07:57:37 -03:00
perf-version.txt perf version: Add man page 2018-04-02 13:52:23 -03:00
perf.data-file-format.txt perf tools: Update quipper information 2018-03-08 11:30:54 -03:00
perf.txt perf tools: Handle -h and -v options 2015-10-05 16:36:18 -03:00
perfconfig.example perf config: Show default report configuration in example and docs 2016-09-01 09:44:13 -03:00
tips.txt perf c2c: Add a tip about cacheline events 2017-12-05 15:43:55 -03:00