1. Sep 20, 2018
    • Andi Kleen's avatar
      perf script: Print DSO for callindent · a78cdee6
      Andi Kleen authored
      
      
      Now that we don't need to print the IP/ADDR for callindent the DSO is
      also not printed. It's useful for some cases, so add an own DSO printout
      for callindent for the case when IP/ADDR is not enabled.
      
      Before:
      
      % perf script --itrace=cr -F +callindent,-ip,-sym,-symoff,-addr
               swapper     0 [000]  3377.917072:          1   branches: pt_config
               swapper     0 [000]  3377.917072:          1   branches:     pt_config
               swapper     0 [000]  3377.917072:          1   branches:     pt_event_add
               swapper     0 [000]  3377.917072:          1   branches:     perf_pmu_enable
               swapper     0 [000]  3377.917072:          1   branches:     perf_pmu_nop_void
               swapper     0 [000]  3377.917072:          1   branches:     event_sched_in.isra.107
               swapper     0 [000]  3377.917072:          1   branches:     __x86_indirect_thunk_rax
               swapper     0 [000]  3377.917072:          1   branches:     perf_pmu_nop_int
               swapper     0 [000]  3377.917072:          1   branches:     group_sched_in
               swapper     0 [000]  3377.917072:          1   branches:     event_filter_match
               swapper     0 [000]  3377.917072:          1   branches:     event_filter_match
               swapper     0 [000]  3377.917072:          1   branches:     group_sched_in
      
      After:
      
               swapper     0 [000]  3377.917072:          1   branches: ([unknown])   pt_config
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])       pt_config
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])       pt_event_add
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])       perf_pmu_enable
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])       perf_pmu_nop_void
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])       event_sched_in.isra.107
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])       __x86_indirect_thunk_rax
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])       perf_pmu_nop_int
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])       group_sched_in
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])       event_filter_match
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])       event_filter_match
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])       group_sched_in
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])           __x86_indirect_thunk_rax
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])           perf_pmu_nop_txn
               swapper     0 [000]  3377.917072:          1   branches: ([kernel.kallsyms])           event_sched_in.isra.107
      
      (in the kernel case of course it's not very useful, but it's important
      with user programs where symbols are not unique)
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kim Phillips <kim.phillips@arm.com>
      Link: http://lkml.kernel.org/r/20180918123214.26728-6-andi@firstfloor.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a78cdee6
    • Andi Kleen's avatar
      perf script: Allow sym and dso without ip, addr · 37fed3de
      Andi Kleen authored
      
      
      Currently sym and dso require printing ip and addr because the print
      function is tied to those outputs. With callindent it makes sense to
      print the symbol or dso without numerical IP or ADDR. So change the
      dependency check to only check the underlying attribute.
      
      Also the branch target output relies on the user_set flag to determine
      if the branch target should be implicitely printed. When modifying the
      fields with + or - also set user_set, so that ADDR can be removed. We
      also need to set wildcard_set to make the initial sanity check pass.
      
      This allows to remove a lot of noise in callindent output by dropping
      the numerical addresses, which are not all that useful.
      
      Before
      
      % perf script --itrace=cr -F +callindent
               swapper     0 [000] 156546.354971:          1   branches: pt_config                                       0 [unknown] ([unknown]) => ffffffff81010486 pt_config ([kernel.kallsyms])
               swapper     0 [000] 156546.354971:          1   branches:     pt_config                    ffffffff81010499 pt_config ([kernel.kallsyms]) => ffffffff8101063e pt_event_add ([kernel.kallsyms])
               swapper     0 [000] 156546.354971:          1   branches:     pt_event_add                 ffffffff81010635 pt_event_add ([kernel.kallsyms]) => ffffffff8115e687 event_sched_in.isra.107 ([kernel.kallsyms])
               swapper     0 [000] 156546.354971:          1   branches:     perf_pmu_enable              ffffffff8115e726 event_sched_in.isra.107 ([kernel.kallsyms]) => ffffffff811579b0 perf_pmu_enable ([kernel.kallsyms])
               swapper     0 [000] 156546.354971:          1   branches:     perf_pmu_nop_void            ffffffff81151730 perf_pmu_nop_void ([kernel.kallsyms]) => ffffffff8115e72b event_sched_in.isra.107 ([kernel.kallsyms])
               swapper     0 [000] 156546.354971:          1   branches:     event_sched_in.isra.107      ffffffff8115e737 event_sched_in.isra.107 ([kernel.kallsyms]) => ffffffff8115e7a5 group_sched_in ([kernel.kallsyms])
               swapper     0 [000] 156546.354971:          1   branches:     __x86_indirect_thunk_rax     ffffffff8115e7f6 group_sched_in ([kernel.kallsyms]) => ffffffff81a03000 __x86_indirect_thunk_rax ([kernel.kallsyms])
      
      After
      
      % perf script --itrace=cr -F +callindent,-ip,-sym,-symoff
             swapper     0 [000] 156546.354971:          1   branches:  pt_config
               swapper     0 [000] 156546.354971:          1   branches:      pt_config
               swapper     0 [000] 156546.354971:          1   branches:      pt_event_add
               swapper     0 [000] 156546.354971:          1   branches:       perf_pmu_enable
               swapper     0 [000] 156546.354971:          1   branches:       perf_pmu_nop_void
               swapper     0 [000] 156546.354971:          1   branches:       event_sched_in.isra.107
               swapper     0 [000] 156546.354971:          1   branches:       __x86_indirect_thunk_rax
               swapper     0 [000] 156546.354971:          1   branches:       perf_pmu_nop_int
               swapper     0 [000] 156546.354971:          1   branches:       group_sched_in
               swapper     0 [000] 156546.354971:          1   branches:       event_filter_match
               swapper     0 [000] 156546.354971:          1   branches:       event_filter_match
               swapper     0 [000] 156546.354971:          1   branches:       group_sched_in
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kim Phillips <kim.phillips@arm.com>
      Link: http://lkml.kernel.org/r/20180918123214.26728-5-andi@firstfloor.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      37fed3de
    • Andi Kleen's avatar
      tools lib subcmd: Support overwriting the pager · 03a1f49f
      Andi Kleen authored
      
      
      Add an interface to the auto pager code that allows callers to overwrite
      the pager.
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kim Phillips <kim.phillips@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/20180918123214.26728-3-andi@firstfloor.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      03a1f49f
    • Andi Kleen's avatar
      perf tools: Report itrace options in help · c12e039d
      Andi Kleen authored
      
      
      I often forget all the options that --itrace accepts. Instead of burying
      them in the man page only report them in the normal command line help
      too to make them easier accessible.
      
      v2: Align
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kim Phillips <kim.phillips@arm.com>
      Link: http://lkml.kernel.org/r/20180914031038.4160-2-andi@firstfloor.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c12e039d
    • Sangwon Hong's avatar
      perf help: Add missing subcommand `version` · 3b9c25c0
      Sangwon Hong authored
      
      
      There isn't subcommand `version` when typing `perf help`.
      
      Before :
      
        $ perf help | grep version
         usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS]
      
      So add perf-version in command-list.txt for listing it when typing `perf
      help`.
      
      After :
      
      $ perf help | grep version
      
       usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS]
         version         display the version of perf binary
      
      Signed-off-by: default avatarSangwon Hong <qpakzk@gmail.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/20180919074911.41931-1-qpakzk@gmail.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3b9c25c0
  2. Sep 19, 2018
  3. Sep 18, 2018
  4. Sep 13, 2018
  5. Sep 12, 2018
  6. Sep 11, 2018
    • Arnaldo Carvalho de Melo's avatar
      tools headers uapi: Update tools's copy of drm/drm.h · 434ea1bf
      Arnaldo Carvalho de Melo authored
      To get the changes in:
      
      	d67b6a20 ("drm: writeback: Add client capability for exposing writeback connectors")
      
      This is for an argument to a DRM ioctl, which is not being prettyfied in
      the 'perf trace' DRM ioctl beautifier, but will now that syscalls are
      starting to have pointer arguments augmented via BPF.
      
      This time around this just cures the following warning during perf's
      build:
      
      	Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h'
      	diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Brian Starkey <brian.starkey@arm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Liviu Dudau <liviu.dudau@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-n7qib1bac6mc6w9oke7r4qdc@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      434ea1bf
    • Arnaldo Carvalho de Melo's avatar
      tools headers uapi: Update tools's copy of asm-generic/unistd.h · f9e6e435
      Arnaldo Carvalho de Melo authored
      To get the changes in:
      
      	db7a2d18 ("asm-generic: unistd.h: Wire up sys_rseq")
      
      That wires up the new 'rsec' system call, which will automagically
      support that syscall in the syscall table used by 'perf trace' on
      arm/arm64.
      
      This cures the following warning during perf's build:
      
      	Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h'
      	diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kim Phillips <kim.phillips@arm.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Cc: Thomas Richter <tmricht@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Link: https://lkml.kernel.org/n/tip-vt7k2itnitp1t9p3dp7qeb08@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f9e6e435
    • Arnaldo Carvalho de Melo's avatar
      tools headers uapi: Update tools's copy of linux/perf_event.h · 0ee03d93
      Arnaldo Carvalho de Melo authored
      To get the changes in:
      
      	09121255 ("perf/UAPI: Clearly mark __PERF_SAMPLE_CALLCHAIN_EARLY as internal use")
      
      This cures the following warning during perf's build:
      
      	Warning: Kernel ABI header at 'tools/include/uapi/linux/perf_event.h' differs from latest version at 'include/uapi/linux/perf_event.h'
      	diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h
      
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-2vvwh2o19orn56di0ksrtgzr@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0ee03d93
  7. Sep 10, 2018