I would like to see the fraction of time spent in a function and all its descendants using perf report. That is, if I have something like
void foo()
{
biz(); // 3,300 cycles
baz(); // 3,300 cycles
// ... 100 cycles
}
int main()
{
foo();
bar(); // 3,300 cycles
return 0;
}
and the functions bar
, baz
, and biz
took 3,300 cycles each, foo
itself took only 100 cycles, then I would like to see a graph like:
main 100%
|
+--- foo 67.0% (1.0%)
| |
| +--- biz 33.0%
| +--- baz 33.0%
|
+--- bar 33.0%