1. 20 6月, 2015 4 次提交
  2. 18 6月, 2015 1 次提交
    • A
      perf top: Allow disabling/enabling events dynamicly · 5d484f99
      Arnaldo Carvalho de Melo 提交于
      Now it is possible to press CTRL+z at anytime and that will disable the
      events being monitored, essentially turning 'top' into 'report', with
      pressing CTRL+z again making it enable the events again, returning to
      the 'top' behaviour, i.e. dynamic + decaying of older samples.
      
      One may want, for instance, play with:
      
          -d, --delay <n>       number of seconds to delay between refreshes
      
      and:
      
          -z, --zero            zero history across updates
      
      Plus CTRL+z to see only the events since last zeroing, etc.
      Suggested-by: NIngo Molnar <mingo@kernel.org>
      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: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-zq7tnh5462blt2yda0bcxh5b@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5d484f99
  3. 29 5月, 2015 1 次提交
  4. 06 5月, 2015 8 次提交
  5. 22 3月, 2015 1 次提交
  6. 18 3月, 2015 2 次提交
  7. 17 3月, 2015 2 次提交
  8. 13 3月, 2015 1 次提交
    • H
      perf hists browser: Fix UI bug after fold/unfold · 4fabf3d1
      He Kuang 提交于
      In perf hists browser, the fold/unfold stat of each hist entry is
      recorded but hb->nr_callchain_rows loses its value after zoom out and
      zoom in back. This causes a wrong row cursor range that restrict user to
      move down anymore.
      
      This bug can be reproduced as follows:
      
        $ perf record -g -e syscalls:* ls
        $ perf report
      
          Available samples
        ================================================================
          2 syscalls:sys_enter_mprotect <= [enter one of the entries]
          2 syscalls:sys_exit_mprotect
          13 syscalls:sys_enter_brk
          ...
      
      In the hists brower, unfold some of the items, now the cursor can reach
      to any rows:
      
          Children      Self  Command  Shared Object          Symbol
        ================================================================
        -  100.00%   100.00%  ls       libuClibc-0.9.33.2.so  [.] lstat64
        - lstat64
             16.67% 0x6469702e64
             8.33% 0x646970
             8.33% 0x617461
             8.33% 0x65
        -   16.67%     0.00%  ls       [unknown]              [.]0x6469702e64
           0x6469702e64 <= [cursor can reach to bottom line, everything is ok]
      
      Now, zoom back to "Available samples" and enter again:
      
          Children      Self  Command  Shared Object          Symbol
        ================================================================
        -  100.00%   100.00%  ls       libuClibc-0.9.33.2.so  [.] lstat64
        - lstat64
             16.67% 0x6469702e64
             8.33% 0x646970
             8.33% 0x617461 <= [cursor may stop here, can't move down anymore]
             8.33% 0x65
        -   16.67%     0.00%  ls       [unknown]              [.]0x6469702e64
           0x6469702e64
      
      This patch recalculates hb->nr_callchain_rows to fix the bug.
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1426144909-18951-1-git-send-email-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4fabf3d1
  9. 03 3月, 2015 1 次提交
    • A
      perf tools: Reference count struct thread · f3b623b8
      Arnaldo Carvalho de Melo 提交于
      We need to do that to stop accumulating entries in the dead_threads
      linked list, i.e. we were keeping references to threads in struct hists
      that continue to exist even after a thread exited and was removed from
      the machine threads rbtree.
      
      We still keep the dead_threads list, but just for debugging, allowing us
      to iterate at any given point over the threads that still are referenced
      by things like struct hist_entry.
      
      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: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-3ejvfyed0r7ue61dkurzjux4@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f3b623b8
  10. 08 1月, 2015 1 次提交
    • N
      perf hists browser: Fix segfault when showing callchain · c09e31cc
      Namhyung Kim 提交于
      When perf report on TUI shows callchain it checks first node has
      siblings to determine whether it needs to print percentage value.
      
      But it missed a case that first node is NULL.  So sometimes it segfaults
      like below:
      
        $ perf top -g
        perf: Segmentation fault
        -------- backtrace --------
        perf[0x4fcefb]
        /usr/lib/libc.so.6(+0x33b20)[0x7f2a35839b20]
        perf(rb_next+0x8)[0x47d3d8]
        perf[0x4f6058]
        perf[0x4f833b]
        perf[0x4f8610]
        perf[0x4f209e]
        perf(ui_browser__run+0x3a)[0x4f2e6a]
        perf[0x4f94ee]
        perf(perf_evlist__tui_browse_hists+0x94)[0x4fbbf4]
        perf[0x444d10]
        /usr/lib/libpthread.so.0(+0x7314)[0x7f2a37070314]
        /usr/lib/libc.so.6(clone+0x6d)[0x7f2a358ee5bd]
      
        $ addr2line -e `which perf` 0x4f6058
        /home/namhyung/project/linux/tools/perf/ui/browsers/hists.c:553
      
      I don't know why the backtrace didn't print some symbols..
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Fixes: 4087d11c ("perf hists browser: Print overhead percent value for first-level callchain")
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1419401076-21700-1-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c09e31cc
  11. 09 12月, 2014 1 次提交
  12. 24 11月, 2014 2 次提交
    • N
      perf tools: Collapse first level callchain entry if it has sibling · a7444af6
      Namhyung Kim 提交于
      If first level callchain has more than single path like when -g caller
      option is given, it should show only first one in the path and hide
      others.  But it didn't do it properly and just hindered the output.
      
      Before:
        -   80.33%    11.11%  abc2     abc2              [.] main
           + 86.18% main
             13.82% __libc_start_main
                main
      
      After:
        -   80.33%    11.11%  abc2     abc2              [.] main
           + 86.18% main
           + 13.82% __libc_start_main
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1416816807-6495-2-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a7444af6
    • N
      perf hists browser: Print overhead percent value for first-level callchain · 4087d11c
      Namhyung Kim 提交于
      Currently perf report on TUI doesn't print percent for first-level
      callchain entry.
      
      I guess it (wrongly) assumes that there's only a single callchain in the
      first level.
      
      This patch fixes it by handling the first level callchains same as
      others - if it's not 100% it should print the percent value.
      
      Also it'll affect other callchains in the other way around - if it's
      100% (single callchain) it should not print the percentage.
      
      Before:
        -   30.95%     6.84%  abc2     abc2              [.] a
           - a
              - 70.00% c
                 - 100.00% apic_timer_interrupt
                      smp_apic_timer_interrupt
                      local_apic_timer_interrupt
                      hrtimer_interrupt
                      ...
              + 30.00% b
           + __libc_start_main
      
      After:
        -   30.95%     6.84%  abc2     abc2              [.] a
           - 77.90% a
              - 70.00% c
                 - apic_timer_interrupt
                   smp_apic_timer_interrupt
                   local_apic_timer_interrupt
                   hrtimer_interrupt
                   ...
              + 30.00% b
           + 22.10% __libc_start_main
      Reported-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1416816807-6495-1-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4087d11c
  13. 19 11月, 2014 1 次提交
  14. 16 10月, 2014 1 次提交
  15. 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
  16. 26 9月, 2014 1 次提交
  17. 24 8月, 2014 1 次提交
  18. 23 8月, 2014 1 次提交
    • N
      perf hists browser: Cleanup callchain print functions · c09a7e75
      Namhyung Kim 提交于
      The hist_browser__show_callchain() and friends don't need to be that
      complex.  They're splitted in 3 pieces - one for traversing top-level
      tree, other one for special casing first chains in the top-level
      entries, and last one for recursive traversing inner trees.  It led to
      code duplication and unnecessary complexity IMHO.
      
      Simplify the function and consolidate the logic into a single function
      - it can recursively call itself.  A little difference in printing
        callchains in top-level tree can be handled with a small change.
      
      It should have no functional change.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1408583746-5540-2-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c09a7e75
  19. 20 8月, 2014 2 次提交
  20. 14 8月, 2014 2 次提交
  21. 12 8月, 2014 4 次提交
  22. 08 7月, 2014 1 次提交