1. 22 1月, 2015 6 次提交
    • N
      perf diff: Fix output ordering to honor next column · 56495a8a
      Namhyung Kim 提交于
      When perf diff prints output, it sorts the entries using baseline field
      by default, but entries which don't have baseline are not sorted
      properly.  This patch makes it sorted by values of next column.
      
      Before:
      
        # Baseline/0  Delta/1  Delta/2  Shared Object      Symbol
        # ..........  .......  .......  .................  ..........................................
        #
              32.75%   +0.28%   -0.83%  libc-2.20.so       [.] malloc
              31.50%   -0.74%   -0.23%  libc-2.20.so       [.] _int_free
              22.98%   +0.51%   +0.52%  libc-2.20.so       [.] _int_malloc
               5.70%   +0.28%   +0.30%  libc-2.20.so       [.] free
               4.38%   -0.21%   +0.25%  a.out              [.] main
               1.32%   -0.15%   +0.05%  a.out              [.] free@plt
               1.31%   +0.03%   -0.06%  a.out              [.] malloc@plt
               0.01%   -0.01%   -0.01%  [kernel.kallsyms]  [k] native_write_msr_safe
               0.01%                    [kernel.kallsyms]  [k] scheduler_tick
               0.01%            -0.00%  [kernel.kallsyms]  [k] native_read_msr_safe
                                +0.01%  [kernel.kallsyms]  [k] _raw_spin_lock_irqsave
                       +0.01%   +0.01%  [kernel.kallsyms]  [k] apic_timer_interrupt
                                +0.01%  [kernel.kallsyms]  [k] intel_pstate_timer_func
                       +0.01%           [kernel.kallsyms]  [k] perf_adjust_freq_unthr_context.part.82
                       +0.01%           [kernel.kallsyms]  [k] read_tsc
                                +0.01%  [kernel.kallsyms]  [k] timekeeping_update.constprop.8
      
      After:
      
        # Baseline/0  Delta/1  Delta/2  Shared Object      Symbol
        # ..........  .......  .......  .................  ..........................................
        #
              32.75%   +0.28%   -0.83%  libc-2.20.so       [.] malloc
              31.50%   -0.74%   -0.23%  libc-2.20.so       [.] _int_free
              22.98%   +0.51%   +0.52%  libc-2.20.so       [.] _int_malloc
               5.70%   +0.28%   +0.30%  libc-2.20.so       [.] free
               4.38%   -0.21%   +0.25%  a.out              [.] main
               1.32%   -0.15%   +0.05%  a.out              [.] free@plt
               1.31%   +0.03%   -0.06%  a.out              [.] malloc@plt
               0.01%   -0.01%   -0.01%  [kernel.kallsyms]  [k] native_write_msr_safe
               0.01%                    [kernel.kallsyms]  [k] scheduler_tick
               0.01%            -0.00%  [kernel.kallsyms]  [k] native_read_msr_safe
                       +0.01%   +0.01%  [kernel.kallsyms]  [k] apic_timer_interrupt
                       +0.01%           [kernel.kallsyms]  [k] read_tsc
                       +0.01%           [kernel.kallsyms]  [k] perf_adjust_freq_unthr_context.part.82
                                +0.01%  [kernel.kallsyms]  [k] intel_pstate_timer_func
                                +0.01%  [kernel.kallsyms]  [k] _raw_spin_lock_irqsave
                                +0.01%  [kernel.kallsyms]  [k] timekeeping_update.constprop.8
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1420677949-6719-7-git-send-email-namhyung@kernel.org
      [ Fixed up hist_entry__cmp_ method signatures, fallout from making previous cset buildable ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      56495a8a
    • N
      perf tools: Pass struct perf_hpp_fmt to its callbacks · 87bbdf76
      Namhyung Kim 提交于
      Currently ->cmp, ->collapse and ->sort callbacks doesn't pass
      corresponding fmt.  But it'll be needed by upcoming changes in
      perf diff command.
      Suggested-by: NJiri Olsa <jolsa@kernel.org>
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1420677949-6719-6-git-send-email-namhyung@kernel.org
      [ fix build by passing perf_hpp_fmt pointer to hist_entry__cmp_ methods ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      87bbdf76
    • N
      perf diff: Introduce fmt_to_data_file() helper · ff21cef6
      Namhyung Kim 提交于
      The fmt_to_data_file() is to retrieve struct data__file from
      perf_hpp_fmt which is embedded in diff_hpp_fmt.  It'll be used by sort
      callback functions later.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1420677949-6719-5-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ff21cef6
    • N
      perf diff: Print diff result more precisely · ec3d07cb
      Namhyung Kim 提交于
      Current perf diff result is somewhat confusing since it sometimes hide
      small result and sometimes there's no result.  So do not hide small
      result (less than 0.01%) and print "N/A" if baseline is not
      recorded (for ratio and wdiff only).  Blank means the baseline is
      available but its pairs are not.
      
      Before:
      
        # Baseline    Delta  Shared Object      Symbol
        # ........  .......  .................  .........................
        #
             ...
             0.01%   -0.01%  [kernel.kallsyms]  [k] native_write_msr_safe
             0.01%           [kernel.kallsyms]  [k] scheduler_tick
             0.01%           [kernel.kallsyms]  [k] native_read_msr_safe
             0.00%           [kernel.kallsyms]  [k] __rcu_read_unlock
                             [kernel.kallsyms]  [k] _raw_spin_lock
                     +0.01%  [kernel.kallsyms]  [k] apic_timer_interrupt
                             [kernel.kallsyms]  [k] read_tsc
      
      After:
      
        # Baseline    Delta  Shared Object      Symbol
        # ........  .......  .................  .........................
        #
             ...
             0.01%   -0.01%  [kernel.kallsyms]  [k] native_write_msr_safe
             0.01%           [kernel.kallsyms]  [k] scheduler_tick
             0.01%           [kernel.kallsyms]  [k] native_read_msr_safe
             0.00%           [kernel.kallsyms]  [k] __rcu_read_unlock
                     +0.01%  [kernel.kallsyms]  [k] _raw_spin_lock
                     +0.01%  [kernel.kallsyms]  [k] apic_timer_interrupt
                     +0.01%  [kernel.kallsyms]  [k] read_tsc
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1419656793-32756-3-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ec3d07cb
    • N
      perf diff: Get rid of hists__compute_resort() · 38259a17
      Namhyung Kim 提交于
      The hists__compute_resort() is to sort output fields based on the
      given field/criteria.  This was done without the sort list but as we
      added the field to the sort list, we can do it with normal
      hists__output_resort() using the ->sort callback.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1419656793-32756-2-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      38259a17
    • A
      perf hists: Rename hist_entry__free to __delete · 6733d1bf
      Arnaldo Carvalho de Melo 提交于
      No logic changes, just to be consistent.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-f7n5y0mvk6gew5185h6fg316@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6733d1bf
  2. 03 1月, 2015 1 次提交
    • N
      perf diff: Fix to sort by baseline field by default · e7024fc3
      Namhyung Kim 提交于
      The currently perf diff didn't add the baseline and delta (or other
      compute) fields to the sort list so output will be sorted by other
      fields like alphabetical order of DSO or symbol as below example.
      
      Fix it by adding hpp formats for the fields and provides default compare
      functions.
      
      Before:
      
        $ perf diff
        # Event 'cycles'
        #
        # Baseline    Delta  Shared Object       Symbol
        # ........  .......  ..................  ...............................
        #
                             [bridge]            [k] ip_sabotage_in
                             [btrfs]             [k] __etree_search.constprop.47
             0.01%           [btrfs]             [k] btrfs_file_mmap
             0.01%   -0.01%  [btrfs]             [k] btrfs_getattr
                             [e1000e]            [k] e1000_watchdog
             0.00%           [kernel.vmlinux]    [k] PageHuge
             0.00%           [kernel.vmlinux]    [k] __acct_update_integrals
             0.00%           [kernel.vmlinux]    [k] __activate_page
                             [kernel.vmlinux]    [k] __alloc_fd
             0.02%   +0.02%  [kernel.vmlinux]    [k] __alloc_pages_nodemask
             ...
      
      After:
      
        # Baseline    Delta  Shared Object       Symbol
        # ........  .......  ..................  ................................
        #
            24.73%   -4.62%  perf                [.] append_chain_children
             7.96%   -1.29%  perf                [.] dso__find_symbol
             6.97%   -2.07%  libc-2.20.so        [.] vfprintf
             4.61%   +0.88%  libc-2.20.so        [.] __fprintf_chk
             4.41%   +2.43%  perf                [.] sort__comm_cmp
             4.10%   -0.16%  perf                [.] comm__str
             4.03%   -0.93%  perf                [.] machine__findnew_thread_time
             3.82%   +3.09%  perf                [.] __hists__add_entry
             2.95%   -0.18%  perf                [.] sort__dso_cmp
             ...
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1419656793-32756-1-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e7024fc3
  3. 23 12月, 2014 1 次提交
  4. 19 11月, 2014 1 次提交
  5. 23 10月, 2014 1 次提交
  6. 10 10月, 2014 1 次提交
    • A
      perf evsel: Add hists helper · 4ea062ed
      Arnaldo Carvalho de Melo 提交于
      Not all tools need a hists instance per perf_evsel, so lets pave the way
      to remove evsel->hists while leaving a way to access the hists from a
      specially allocated evsel, one that comes with space at the end where
      lives the evsel.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jean Pihet <jean.pihet@linaro.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-qlktkhe31w4mgtbd84035sr2@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4ea062ed
  7. 26 9月, 2014 1 次提交
  8. 14 8月, 2014 1 次提交
    • N
      perf tools: Check recorded kernel version when finding vmlinux · 0a7e6d1b
      Namhyung Kim 提交于
      Currently vmlinux_path__init() only tries to find vmlinux file from
      current directory, /boot and some canonical directories with version
      number of the running kernel.  This can be a problem when reporting old
      data recorded on a kernel version not running currently.
      
      We can use --symfs option for this but it's annoying for user to do it
      always.  As we already have the info in the perf.data file, it can be
      changed to use it for the search automatically.
      
      Before:
      
        $ perf report
        ...
        # Samples: 4K of event 'cpu-clock'
        # Event count (approx.): 1067250000
        #
        # Overhead  Command     Shared Object      Symbol
        # ........  ..........  .................  ..............................
            71.87%     swapper  [kernel.kallsyms]  [k] recover_probed_instruction
      
      After:
      
        # Overhead  Command     Shared Object      Symbol
        # ........  ..........  .................  ....................
            71.87%     swapper  [kernel.kallsyms]  [k] native_safe_halt
      
      This requires to change signature of symbol__init() to receive struct
      perf_session_env *.
      Reported-by: NMinchan Kim <minchan@kernel.org>
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1407825645-24586-14-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0a7e6d1b
  9. 12 8月, 2014 1 次提交
  10. 01 6月, 2014 1 次提交
  11. 21 5月, 2014 2 次提交
  12. 24 4月, 2014 4 次提交
  13. 16 4月, 2014 2 次提交
  14. 15 3月, 2014 1 次提交
  15. 13 1月, 2014 4 次提交
  16. 28 12月, 2013 1 次提交
  17. 10 12月, 2013 1 次提交
  18. 05 11月, 2013 1 次提交
  19. 24 10月, 2013 1 次提交
  20. 23 10月, 2013 1 次提交
  21. 22 10月, 2013 1 次提交
  22. 04 10月, 2013 1 次提交
  23. 12 8月, 2013 1 次提交
  24. 13 7月, 2013 4 次提交