linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What do mean children of top ?
@ 2015-03-02 17:04 TaeWoong Song
  2015-03-03 16:23 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 4+ messages in thread
From: TaeWoong Song @ 2015-03-02 17:04 UTC (permalink / raw)
  To: linux-perf-users

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. 


Thanks,
Taeung--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What do mean children of 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
  0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03 16:23 UTC (permalink / raw)
  To: TaeWoong Song; +Cc: linux-perf-users, Namhyung Kim

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. 

Namhyung?

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What do mean children of top ?
  2015-03-03 16:23 ` Arnaldo Carvalho de Melo
@ 2015-03-03 23:46   ` Namhyung Kim
  2015-03-05  1:20     ` taeung
  0 siblings, 1 reply; 4+ messages in thread
From: Namhyung Kim @ 2015-03-03 23:46 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: TaeWoong Song, linux-perf-users

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What do mean children of top ?
  2015-03-03 23:46   ` Namhyung Kim
@ 2015-03-05  1:20     ` taeung
  0 siblings, 0 replies; 4+ messages in thread
From: taeung @ 2015-03-05  1:20 UTC (permalink / raw)
  To: Namhyung Kim, Arnaldo Carvalho de Melo; +Cc: linux-perf-users


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-05  1:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-03-05  1:20     ` taeung

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