1. 31 8月, 2009 1 次提交
  2. 09 8月, 2009 1 次提交
    • B
      perf report: Fix and improve the displaying of per-thread event counters · 8d513270
      Brice Goglin 提交于
      Improve and fix the handling of per-thread counter stats
      recorded via perf record -s. Previously we only displayed
      it in debug printouts (-D) and even that output was hard
      to disambiguate.
      
      I moved everything to utils/values.[ch] so that we may reuse
      it in perf stat.
      
      We get something like this now:
      
       #  PID   TID  cache-misses  cache-references
         4658  4659        495581           3238779
         4658  4662        498246           3236823
         4658  4663        499531           3243162
      
      Then it'll be easy to add --pretty=raw to display a single line per thread/event.
      
      By the way, -S was also used for --symbol... So I used -T/--thread here.
      
      perf report: Add -T/--threads to display per-thread counter values
      
       We get something like this now:
       #  PID   TID  cache-misses  cache-references
         4658  4659        495581           3238779
         4658  4662        498246           3236823
         4658  4663        499531           3243162
      
      Per-thread arrays of counter values are managed in utils/values.[ch]
      Signed-off-by: NBrice Goglin <Brice.Goglin@inria.fr>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: paulus@samba.org
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8d513270
  3. 12 7月, 2009 1 次提交
    • A
      perf report: Introduce -n/--show-nr-samples · e3d7e183
      Arnaldo Carvalho de Melo 提交于
      [acme@doppio pahole]$ perf report -ns comm,dso,symbol -d /lib64/libc-2.10.1.so -C pahole | head -17
          21.94%      32101  [.] _int_malloc
          20.10%      29402  [.] __GI_strcmp
          16.77%      24533  [.] __tsearch
          12.61%      18450  [.] malloc_consolidate
           6.42%       9394  [.] _int_free
           6.28%       9191  [.] __tfind
           4.56%       6678  [.] __GI___libc_free
           4.46%       6520  [.] _IO_vfprintf_internal
           2.59%       3786  [.] __malloc
           1.17%       1716  [.] __GI_memcpy
      [acme@doppio pahole]$
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1247325517-12272-5-git-send-email-acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e3d7e183
  4. 11 7月, 2009 1 次提交
    • A
      perf report: Adjust column width to the values sampled · 52d422de
      Arnaldo Carvalho de Melo 提交于
      Auto-adjust column width of perf report output to the
      longest occuring string length.
      
      Example:
      
      [acme@doppio pahole]$  perf report --sort comm,dso,symbol | head -13
      
          12.79%   pahole  /usr/lib64/libdw-0.141.so    [.] __libdw_find_attr
           8.90%   pahole  /lib64/libc-2.10.1.so        [.] _int_malloc
           8.68%   pahole  /usr/lib64/libdw-0.141.so    [.] __libdw_form_val_len
           8.15%   pahole  /lib64/libc-2.10.1.so        [.] __GI_strcmp
           6.80%   pahole  /lib64/libc-2.10.1.so        [.] __tsearch
           5.54%   pahole  ./build/libdwarves.so.1.0.0  [.] tag__recode_dwarf_type
      [acme@doppio pahole]$
      
      [acme@doppio pahole]$  perf report --sort comm,dso,symbol -d /lib64/libc-2.10.1.so | head -10
      
          21.92%   pahole  /lib64/libc-2.10.1.so  [.] _int_malloc
          20.08%   pahole  /lib64/libc-2.10.1.so  [.] __GI_strcmp
          16.75%   pahole  /lib64/libc-2.10.1.so  [.] __tsearch
      [acme@doppio pahole]$
      
      Also add these extra options to control the new behaviour:
      
        -w, --field-width
      
      Force each column width to the provided list, for large terminal
      readability.
      
        -t, --field-separator:
      
      Use a special separator character and don't pad with spaces, replacing
      all occurances of this separator in symbol names (and other output) with
      a '.' character, that thus it's the only non valid separator.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <20090711014728.GH3452@ghostprotocols.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      52d422de
  5. 01 7月, 2009 3 次提交
    • A
      perf report: Add --symbols parameter · 7bec7a91
      Arnaldo Carvalho de Melo 提交于
      So that we can filter by symbol name.
      
      The 'pfunct' utility in the 'dwarves' package can be used to
      create a file with the functions one wants.
      
      Example:
      
      [acme@doppio pahole]$ pfunct /usr/lib/debug/usr/lib64/libdw-0.141.so.debug | grep dwarf > /tmp/dwarf.symbols
      [acme@doppio pahole]$ wc -l /tmp/dwarf.symbols
      93 /tmp/dwarf.symbols
      [acme@doppio pahole]$ head -3 /tmp/dwarf.symbols
      dwfl_addrdwarf
      dwfl_module_getdwarf
      dwfl_getdwarf
      [acme@doppio pahole]$ perf report --sort comm,dso,symbol --comms pahole --dsos /usr/lib64/libdw-0.141.so --symbols file:///tmp/dwarf.symbols
      
          33.99%            pahole  /usr/lib64/libdw-0.141.so  [.] dwarf_tag
          29.07%            pahole  /usr/lib64/libdw-0.141.so  [.] dwarf_decl_file
          27.71%            pahole  /usr/lib64/libdw-0.141.so  [.] dwarf_getsrclines
           4.54%            pahole  /usr/lib64/libdw-0.141.so  0x00000000007400
           3.93%            pahole  /usr/lib64/libdw-0.141.so  [.] dwarf_decl_line
           0.46%            pahole  /usr/lib64/libdw-0.141.so  [.] dwarf_getlocation
           0.18%            pahole  /usr/lib64/libdw-0.141.so  [.] __libdwarf_next_prime
           0.13%            pahole  /usr/lib64/libdw-0.141.so  [.] dwarf_diecu
      
      [acme@doppio pahole]$
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1246399282-20934-4-git-send-email-acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7bec7a91
    • A
      perf report: Add --comms parameter · cc8b88b1
      Arnaldo Carvalho de Melo 提交于
      So that we can filter by comm. Symbols in other comms won't be
      accounted for.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1246399282-20934-3-git-send-email-acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cc8b88b1
    • A
      perf report: Add --dsos parameter · 25903407
      Arnaldo Carvalho de Melo 提交于
      So that we can filter by dso. Symbols in other dsos won't be
      accounted for.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1246399282-20934-2-git-send-email-acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      25903407
  6. 23 6月, 2009 1 次提交
  7. 07 6月, 2009 1 次提交
  8. 30 5月, 2009 1 次提交
    • I
      perf_counter tools: Generate per command manpages (and pdf/html, etc.) · c1c2365a
      Ingo Molnar 提交于
      Import Git's nice .txt => {man/html/pdf} generation machinery.
      
      Fix various errors in the Documentation/perf*.txt description as well.
      
      Also fix a bug in builtin-help: we'd map 'perf help top' to 'perftop'
      if only the 'perf' binary is in the default PATH - confusing the manpage
      logic. I dont fully understand why Git did it this way - but i suppose
      it's a migration artifact from their migration from standalone git-xyz
      commands to 'git xyz' commands. The perf tools were always using the
      modern form so it's not an issue there.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c1c2365a
  9. 27 5月, 2009 1 次提交
    • I
      perf_counter tools: Rename output.perf to perf.data · 23ac9cbe
      Ingo Molnar 提交于
      output.perf is only output to perf-record - it's input to
      perf-report. So change it to a more direction-neutral name.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      23ac9cbe
  10. 26 5月, 2009 1 次提交
    • I
      perf report: Add help/manpage · 0bec253c
      Ingo Molnar 提交于
      Add a (minimal) manpage for perf report.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0bec253c