Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1260609

[RFC/PATCH 0/4] perf report: Support folded callchain output (v2)

From Namhyung Kim <namhyung@kernel.org>
Newsgroups linux.kernel
Subject [RFC/PATCH 0/4] perf report: Support folded callchain output (v2)
Date 2015-11-02 14:00 +0100
Message-ID <qqmSl-5qi-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

This is what Brendan requested on the perf-users mailing list [1] to
support FlameGraphs [2] more efficiently.  This patchset adds a few
more callchain options to adjust the output for it.

At first, 'folded' output mode was added.  The folded output puts all
calchain nodes in a line separated by semicolons, a space and the
value.  Now it only supports --stdio as other UI provides some way of
folding/expanding callchains dynamically.

The value is now can be one of 'percent', 'period', or 'count'.  The
percent is current default output and the period is the raw number of
sample periods.  The count is the number of samples for each callchain.

Here's an example:

  $ perf report --no-children --show-nr-samples --stdio -g folded,count
  ...
    39.93%     80  swapper  [kernel.vmlinux]  [k] intel_idel
  intel_idle;cpuidle_enter_state;cpuidle_enter;call_cpuidle;cpu_startup_entry;start_secondary 57
  intel_idle;cpuidle_enter_state;cpuidle_enter;call_cpuidle;cpu_startup_entry;rest_init;... 23


  $ perf report --no-children --stdio -g percent
  ...
    39.93%  swapper  [kernel.vmlinux]  [k] intel_idel
            |
            ---intel_idle
               cpuidle_enter_state
               cpuidle_enter
               call_cpuidle
               cpu_startup_entry
               |
               |--28.63%-- start_secondary
               |
                --11.30%-- rest_init


  $ perf report --no-children --stdio --show-total-period -g period
  ...
    39.93%   13018705  swapper  [kernel.vmlinux]  [k] intel_idel
            |
            ---intel_idle
               cpuidle_enter_state
               cpuidle_enter
               call_cpuidle
               cpu_startup_entry
               |
               |--9334403-- start_secondary
               |
                --3684302-- rest_init


  $ perf report --no-children --stdio --show-nr-samples -g count
  ...
    39.93%     80  swapper  [kernel.vmlinux]  [k] intel_idel
            |
            ---intel_idle
               cpuidle_enter_state
               cpuidle_enter
               call_cpuidle
               cpu_startup_entry
               |
               |--57-- start_secondary
               |
                --23-- rest_init


You can get it from 'perf/callchain-fold-v2' branch on my tree:

  git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Any comments are welcome, thanks
Namhyung


[1] http://www.spinics.net/lists/linux-perf-users/msg02498.html
[2] http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html


Namhyung Kim (4):
  perf report: Support folded callchain mode on --stdio
  perf callchain: Abstract callchain print function
  perf callchain: Add count fields to struct callchain_node
  perf report: Add callchain value option

 tools/perf/Documentation/perf-report.txt | 13 +++--
 tools/perf/builtin-report.c              |  4 +-
 tools/perf/ui/browsers/hists.c           |  8 +--
 tools/perf/ui/gtk/hists.c                |  8 +--
 tools/perf/ui/stdio/hist.c               | 91 ++++++++++++++++++++++++++------
 tools/perf/util/callchain.c              | 87 +++++++++++++++++++++++++++++-
 tools/perf/util/callchain.h              | 24 ++++++++-
 tools/perf/util/util.c                   |  3 +-
 8 files changed, 204 insertions(+), 34 deletions(-)

-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Namhyung Kim <namhyung@kernel.org> - 2015-11-02 14:00 +0100
  [RFC/PATCH v2 4/4] perf report: Add callchain value option Namhyung Kim <namhyung@kernel.org> - 2015-11-02 14:00 +0100
  [RFC/PATCH v2 3/4] perf callchain: Add count fields to struct callchain_node Namhyung Kim <namhyung@kernel.org> - 2015-11-02 14:00 +0100
  Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Brendan Gregg <brendan.d.gregg@gmail.com> - 2015-11-02 21:40 +0100
    Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-02 22:40 +0100
      Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Namhyung Kim <namhyung@kernel.org> - 2015-11-02 23:20 +0100
        Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-02 23:30 +0100
          Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Namhyung Kim <namhyung@kernel.org> - 2015-11-02 23:50 +0100
            Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-03 00:10 +0100
              Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Namhyung Kim <namhyung@kernel.org> - 2015-11-03 00:50 +0100
                Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-03 01:50 +0100
                Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Namhyung Kim <namhyung@kernel.org> - 2015-11-03 02:40 +0100
                Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-03 02:50 +0100
                Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Namhyung Kim <namhyung@kernel.org> - 2015-11-03 04:20 +0100
        Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Brendan Gregg <brendan.d.gregg@gmail.com> - 2015-11-02 23:50 +0100

csiph-web