public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	Brendan Gregg <brendan.d.gregg@gmail.com>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Andi Kleen <andi@firstfloor.org>, Kan Liang <kan.liang@intel.com>
Subject: Re: [PATCHSET 0/4] perf report: Support folded callchain output (v4)
Date: Tue, 3 Nov 2015 11:40:53 -0300	[thread overview]
Message-ID: <20151103144053.GL21609@kernel.org> (raw)
In-Reply-To: <1446555131-25495-1-git-send-email-namhyung@kernel.org>

Em Tue, Nov 03, 2015 at 09:52:07PM +0900, Namhyung Kim escreveu:
> 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.
> 
>  * changes in v4)
>   - add missing doc update
>   - cleanup/fix callchain value print code
>   - add Acked-by from Brendan and Jiri

Do those Acked-by stand? Things changed, the values moved from the end
of the line to the start, etc.

You said you would consider having a --no-hists, but I see nothing about
it in this patchkit.

Some more comments below.

- Arnaldo

>  * changes in v3)
>   - put the value before callchains
>   - fix compile error
> 
> 
> At first, 'folded' output mode was added.  The folded output puts the
> value, a space and all calchain nodes separated by semicolons.  Now it
> only supports --stdio as other UI provides some way of folding and/or
> 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
>   57 intel_idle;cpuidle_enter_state;cpuidle_enter;call_cpuidle;cpu_startup_entry;start_secondary
>   23 intel_idle;cpuidle_enter_state;cpuidle_enter;call_cpuidle;cpu_startup_entry;rest_init;...
> 
> 
>   $ perf report --no-children --stdio -g percent

So, in this first one you show the percent in both

>   ...
>     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
>   ...

then here you _add_ the period to the hist_entry line, but...

>     39.93%   13018705  swapper  [kernel.vmlinux]  [k] intel_idel
>             |
>             ---intel_idle
>                cpuidle_enter_state
>                cpuidle_enter
>                call_cpuidle
>                cpu_startup_entry
>                |

_replace_ the percentage with the period in the callchains.

Can't we have the same effect in both? I.e. I would expect the 39.93% to
simply be replaced with that 13018705.

>                |--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

Ditto for count

>             |
>             ---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-v4' 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               | 93 ++++++++++++++++++++++++++------
>  tools/perf/util/callchain.c              | 87 +++++++++++++++++++++++++++++-
>  tools/perf/util/callchain.h              | 24 ++++++++-
>  tools/perf/util/util.c                   |  3 +-
>  8 files changed, 205 insertions(+), 35 deletions(-)
> 
> -- 
> 2.6.2

  parent reply	other threads:[~2015-11-03 14:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03 12:52 [PATCHSET 0/4] perf report: Support folded callchain output (v4) Namhyung Kim
2015-11-03 12:52 ` [PATCH v4 1/4] perf report: Support folded callchain mode on --stdio Namhyung Kim
2015-11-03 12:52 ` [PATCH v4 2/4] perf callchain: Abstract callchain print function Namhyung Kim
2015-11-03 12:52 ` [PATCH v4 3/4] perf callchain: Add count fields to struct callchain_node Namhyung Kim
2015-11-03 12:52 ` [PATCH v4 4/4] perf report: Add callchain value option Namhyung Kim
2015-11-03 14:40 ` Arnaldo Carvalho de Melo [this message]
2015-11-03 21:33   ` [PATCHSET 0/4] perf report: Support folded callchain output (v4) Brendan Gregg
2015-11-04  1:54     ` Namhyung Kim
2015-11-04  6:02       ` Brendan Gregg
2015-11-04 14:51         ` Arnaldo Carvalho de Melo
2015-11-04 15:34           ` Namhyung Kim
2015-11-04 18:08             ` Arnaldo Carvalho de Melo
2015-11-05 11:33               ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151103144053.GL21609@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=andi@firstfloor.org \
    --cc=brendan.d.gregg@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox