From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: TaeWoong Song <treeze.taeung@gmail.com>,
linux-perf-users@vger.kernel.org
Subject: Re: What do mean children of top ?
Date: Wed, 4 Mar 2015 08:46:29 +0900 [thread overview]
Message-ID: <20150303234629.GE27046@danjae> (raw)
In-Reply-To: <20150303162348.GL5187@kernel.org>
Hi Arnaldo and Taewoong,
On Tue, Mar 03, 2015 at 01:23:48PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Mar 03, 2015 at 02:04:47AM +0900, TaeWoong Song escreveu:
> > Hi, perf users
> >
> > About
> > The function perf_top_config() on builtin-top.c:
> > It depend on whether top.children is ’true’ in perfconfig
> > that whether ‘symbol_conf.cumulate_callchain’ is ’true’ or not.
> > (when ‘top' only work with ‘—call-graph' )
> >
> > The output of ’top —call-graph fp’ is changed depending on a boolean value of ‘symbol_conf.cumulate_callchain’.
> >
> > Do mean children of top relationship of calling functions which are parents or children ?
> > Linked-ring of invoking functions ?
> >
> > I wanna exactly explain the effect of ‘top.children’ in perfconfig.
> > Can anybody tell me the different between true and false on top.children ?
> >
> > If anybody a bit give hints me, I’ll appreciate it.
The effect of top.children is same as report.children but just for perf top.
The children here means that functions called from another function.
Let me give you an example:
void foo(void) {
/* do something */
}
void 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'.
When you record with callchain you'll see something like this:
Overhead Symbol
........ .....................
60.00% foo
|
--- foo
bar
main
__libc_start_main
40.00% bar
|
--- bar
main
__libc_start_main
These percentage are 'self' overhead that came from the samples of the
function themselves. If you use --children, the overhead of children
will be add to all of parents to calculate 'children' overhead. In
this case we'll see somethink like below:
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
The first percentage is the children overhead and second is the self
overhead. As you can see, the children overhead is a sum of the self
overhead and all (self) overhead of children. It gives you an higher
level view which function (including children) consumes cpu cycles (or
other event) more. And with '--call-graph caller', you'll see which
children are called from this function.
Thanks,
Namhyung
next prev parent reply other threads:[~2015-03-03 23:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 17:04 What do mean children of top ? TaeWoong Song
2015-03-03 16:23 ` Arnaldo Carvalho de Melo
2015-03-03 23:46 ` Namhyung Kim [this message]
2015-03-05 1:20 ` taeung
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=20150303234629.GE27046@danjae \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=linux-perf-users@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).