On 03/04/2015 08:46 AM, Namhyung Kim wrote:
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.
Thank you very much.
I've clearly understanded about children in perf.
Thanks,
Taeung
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html