All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@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>,
	Taeung Song <treeze.taeung@gmail.com>
Subject: Re: [PATCH] perf tools: Document --children option in more detail
Date: Sun, 19 Apr 2015 11:11:14 -0600	[thread overview]
Message-ID: <5533E1B2.7080008@gmail.com> (raw)
In-Reply-To: <1429378397-8467-1-git-send-email-namhyung@kernel.org>

On 4/18/15 11:33 AM, Namhyung Kim wrote:
> +It might confusing that the sum of the all children overhead exceeds
> +100%.  But with this enabled, users can find which function has most
> +overhead even if samples are spread over the children.

Can you add more detail on why the sum can exceed 100%?

> +
> +Let me see you an example; there’re three functions like below.

That sentence needs some work and should stay in 3rd person. Maybe 
something like this:

"Consider the following example:"

> +
> +-----------------------
> +void foo(void) {
> +    /* something */
> +}
> +
> +bar(void) {
> +    /* do something */
> +    foo();
> +}
> +
> +int main(void) {
> +    bar()
> +    return 0;
> +}
> +-----------------------
> +
> +In this case 'foo' is a child of 'bar', and 'bar' is an immediate
> +child of 'main' so 'foo' also is a child of 'main'.  In other words,
> +'main' is a parent of 'foo' and 'bar'. and 'bar' is a parent of 'foo'.
> +
> +Suppose all samples are recorded in the 'foo' and 'bar' only.  When
> +you record with callchain you'll see something like below in the usual
> +(self-overhead-only) output of the perf report:
> +
> +----------------------------------
> +Overhead  Symbol
> +........  .....................
> +  60.00%  foo
> +          |
> +          --- foo
> +              bar
> +              main
> +              __libc_start_main
> +
> +  40.00%  bar
> +          |
> +          --- bar
> +              main
> +              __libc_start_main
> +----------------------------------
> +
> +When --children option is enabled, the (self) overhead of children (in
> +this case foo and bar) will be added to its parent to calculate the
> +children overhead.  In this case we'll see somethink like below:

Man pages should avoid contractions, should be in 3rd person and
s/somethink/something/.

"When --children option is enabled, the (self) overhead of children (in 
this case foo and bar) are added to the parent to calculate the children 
overhead. In this case the report could display as:"

> +
> +-------------------------------------------
> +Children      Self  Symbol
> +........  ........  ....................
> + 100.00%     0.00%  __libc_start_main
> +          |
> +          --- __libc_start_main
> +
> + 100.00%     0.00%  main
> +          |
> +          --- main
> +              __libc_start_main
> +
> + 100.00%    40.00%  bar
> +          |
> +          --- bar
> +              main
> +              __libc_start_main
> +
> +  60.00%    60.00%  foo
> +          |
> +          --- foo
> +              bar
> +              main
> +              __libc_start_main
> +-------------------------------------------
> +
> +Please note that since v3.16 the children overhead will be shown by
> +default and the output will be sorted by the values, users can disable
> +it by specifing --no-children option on the command line, or by adding
> ++report.children = false+ or +top.children = false+ config option.

Maintain tense. Something like:

"Since v3.16 the children overhead is shown by default and the output is 
sorted by the values. Children overhead is disabled by specifying 
--no-children option on the command line or by adding 'report.children = 
false' or 'top.children = false' in the perfconfig file.

Overall nicely done. Thanks for taking the time to write this up.

David

  reply	other threads:[~2015-04-19 17:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-18 17:33 [PATCH] perf tools: Document --children option in more detail Namhyung Kim
2015-04-19 17:11 ` David Ahern [this message]
2015-04-20 11:44   ` 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=5533E1B2.7080008@gmail.com \
    --to=dsahern@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=treeze.taeung@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.