1. 26 2月, 2016 1 次提交
  2. 25 2月, 2016 6 次提交
  3. 22 2月, 2016 1 次提交
  4. 20 2月, 2016 2 次提交
  5. 12 2月, 2016 1 次提交
    • A
      perf hists: Do column alignment on the format iterator · 89fee709
      Arnaldo Carvalho de Melo 提交于
      We were doing column alignment in the format function for each cell,
      returning a string padded with spaces so that when the next column is
      printed the cursor is at its column alignment.
      
      This ends up needlessly printing trailing spaces, do it at the format
      iterator, that is where we know if it is needed, i.e. if there is more
      columns to be printed.
      
      This eliminates the need for triming lines when doing a dump using 'P'
      in the TUI browser and also produces far saner results with things like
      piping 'perf report' to 'less'.
      
      Right now only the formatters for sym->name and the 'locked' column
      (perf mem report), that are the ones that end up at the end of lines
      in the default 'perf report', 'perf top' and 'perf mem report' tools,
      the others will be done in a subsequent patch.
      
      In the end the 'width' parameter for the formatters now mean, in
      'printf' terms, the 'precision', where before it was the field 'width'.
      Reported-by: NDave Jones <davej@codemonkey.org.uk>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/n/tip-s7iwl2gj23w92l6tibnrcqzr@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      89fee709
  6. 03 2月, 2016 6 次提交
  7. 02 2月, 2016 2 次提交
  8. 26 1月, 2016 3 次提交
  9. 08 1月, 2016 2 次提交
  10. 07 1月, 2016 4 次提交
  11. 11 12月, 2015 1 次提交
  12. 10 12月, 2015 1 次提交
  13. 28 11月, 2015 1 次提交
    • N
      perf hists: Do not skip elided fields when processing samples · e72655d9
      Namhyung Kim 提交于
      If user gives a filter, perf marks the corresponding column elided and
      omits the output.  But it should process and aggregates samples using
      the field, otherwise samples will be aggregated as if the column was not
      there resulted in incorrect output.
      
      For example, I'd like to set a filter on native_write_msr_safe.  The
      original overhead of the function is negligible.
      
        $ perf report | grep native_write_msr_safe
            0.00%  swapper  [kernel.vmlinux]  native_write_msr_safe
            0.00%  perf     [kernel.vmlinux]  native_write_msr_safe
      
      However adding -S option gives different output.
      
        $ perf report -S native_write_msr_safe --percentage absolute | \
        > grep -e swapper -e perf
           51.47%  swapper  [kernel.vmlinux]
            4.14%  perf     [kernel.vmlinux]
      
      Since it aggregated samples using comm and dso only.  In fact, the above
      values are same when it sorts with -s comm,dso.
      
        $ perf report -s comm,dso | grep -e swapper -e perf
           51.47%  swapper  [kernel.vmlinux]
            4.14%  perf     [kernel.vmlinux]
      
      This resulted in TUI failure with -ERANGE since it tries to increase
      sample hit count for annotation with wrong symbols due to incorrect
      aggregation.
      
      This patch fixes it not to skip elided fields when comparing samples in
      order to insert them to the hists.
      
      Commiter note:
      
      After the patch, with a different workloads:
      
        # perf report --show-total-period -S native_write_msr_safe --stdio
        #
        # symbol: native_write_msr_safe
        #
        # Samples: 455  of event 'cycles:pp'
        # Event count (approx.): 134787489
        #
        # Overhead Period Command         Shared Object
        # ........ ...... ............... ................
        #
             0.22% 293081 qemu-system-x86 [vmlinux]
             0.19% 255914 swapper         [vmlinux]
             0.00%   2054 Timer           [vmlinux]
             0.00%   1021 firefox         [vmlinux]
             0.00%      2 perf            [vmlinux]
      
        # perf report --show-total-period | grep native_write_msr_safe
        Failed to open /tmp/perf-14838.map, continuing without symbols
             0.22% 293081 qemu-system-x86 [vmlinux]  [k] native_write_msr_safe
             0.19% 255914 swapper         [vmlinux]  [k] native_write_msr_safe
             0.00%   2054 Timer           [vmlinux]  [k] native_write_msr_safe
             0.00%   1021 firefox         [vmlinux]  [k] native_write_msr_safe
             0.00%      2 perf            [vmlinux]  [k] native_write_msr_safe
        #
      Reported-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1448645559-31167-2-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e72655d9
  14. 06 10月, 2015 1 次提交
  15. 01 10月, 2015 1 次提交
  16. 29 9月, 2015 1 次提交
  17. 15 9月, 2015 1 次提交
  18. 14 9月, 2015 4 次提交
  19. 13 8月, 2015 1 次提交
    • K
      perf report: Show call graph from reference events · 9e207ddf
      Kan Liang 提交于
      Introduce --show-ref-call-graph for perf report to print reference
      callgraph for no callgraph event.
      
      Here is an example.
      
       perf report --show-ref-call-graph --stdio
      
       # To display the perf.data header info, please use
       --header/--header-only options.
       #
       #
       # Total Lost Samples: 0
       #
       # Samples: 5  of event 'cpu/cpu-cycles,call-graph=fp/'
       # Event count (approx.): 144985
       #
       # Children      Self  Command  Shared Object     Symbol
       # ........  ........  .......  ................  ........................................
       #
          72.30%     0.00%  sleep    [kernel.vmlinux]  [k] entry_SYSCALL_64_fastpath
                    |
                    ---entry_SYSCALL_64_fastpath
                       |
                       |--22.62%-- __GI___libc_nanosleep
                        --77.38%-- [...]
      
      ......
      
       # Samples: 6  of event 'cpu/instructions,call-graph=no/', show reference callgraph
       # Event count (approx.): 172780
       #
       # Children      Self  Command  Shared Object     Symbol
       # ........  ........  .......  ................  ........................................
       #
          73.16%     0.00%  sleep    [kernel.vmlinux]  [k] entry_SYSCALL_64_fastpath
                    |
                    ---entry_SYSCALL_64_fastpath
                       |
                       |--31.44%-- __GI___libc_nanosleep
                        --68.56%-- [...]
      Signed-off-by: NKan Liang <kan.liang@intel.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/1439289050-40510-3-git-send-email-kan.liang@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9e207ddf