1. 18 3月, 2015 2 次提交
  2. 17 3月, 2015 2 次提交
  3. 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
  4. 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
  5. 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
  6. 09 12月, 2014 1 次提交
  7. 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
  8. 19 11月, 2014 1 次提交
  9. 16 10月, 2014 1 次提交
  10. 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
  11. 26 9月, 2014 1 次提交
  12. 24 8月, 2014 1 次提交
  13. 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
  14. 20 8月, 2014 2 次提交
  15. 14 8月, 2014 2 次提交
  16. 12 8月, 2014 4 次提交
  17. 08 7月, 2014 1 次提交
  18. 07 7月, 2014 5 次提交
  19. 20 6月, 2014 2 次提交
  20. 04 6月, 2014 1 次提交
    • J
      perf tools: Move elide bool into perf_hpp_fmt struct · f2998422
      Jiri Olsa 提交于
      After output/sort fields refactoring, it's expensive
      to check the elide bool in its current location inside
      the 'struct sort_entry'.
      
      The perf_hpp__should_skip function gets highly noticable in
      workloads with high number of output/sort fields, like for:
      
        $ perf report -i perf-test.data -F overhead,sample,period,comm,pid,dso,symbol,cpu --stdio
      
      Performance report:
         9.70%  perf  [.] perf_hpp__should_skip
      
      Moving the elide bool into the 'struct perf_hpp_fmt', which
      makes the perf_hpp__should_skip just single struct read.
      
      Got speedup of around 22% for my test perf.data workload.
      The change should not harm any other workload types.
      
      Performance counter stats for (10 runs):
        before:
         358,319,732,626      cycles                    ( +-  0.55% )
         467,129,581,515      instructions              #    1.30  insns per cycle          ( +-  0.00% )
      
           150.943975206 seconds time elapsed           ( +-  0.62% )
      
        now:
         278,785,972,990      cycles                    ( +-  0.12% )
         370,146,797,640      instructions              #    1.33  insns per cycle          ( +-  0.00% )
      
           116.416670507 seconds time elapsed           ( +-  0.31% )
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      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/20140601142622.GA9131@krava.brq.redhat.comSigned-off-by: NJiri Olsa <jolsa@kernel.org>
      f2998422
  21. 01 6月, 2014 2 次提交
  22. 21 5月, 2014 5 次提交