Re: [RFC] perf report: Implement symbol filtering on TUI

From: Arun Sharma
Date: Thu Mar 15 2012 - 17:46:53 EST


On 3/14/12 5:44 PM, Namhyung Kim wrote:

Thanks for reviewing and sending the patch.

However this was already fixed on my new patch set. Please see below:

https://lkml.org/lkml/2012/3/13/73


I still get different behaviors with and without my two line patch.

Try:

perf record -g
perf report c -G -g graph,0.5,caller -s inclusive --stdio

I don't see where hists__filter_by_symbol() gets called when using --stdio.

But let's examine what I think is a more important general issue (not specific to your patch):

Here's the behavior my coworkers are requesting. With the test program I mailed earlier with this callgraph:

./perf report -G -g graph,0.5,caller -s pid --stdio

100.00% foo:30804
|
--- __libc_start_main
|
--99.87%-- main
|
|--50.01%-- a
| |
| --42.71%-- c
| |
| |--14.36%-- e
| | |
| | --7.09%-- f
| |
| --14.33%-- d
| |
| --6.81%-- f
|
--49.86%-- b
|
--42.72%-- c
|
|--14.43%-- d
| |
| --7.30%-- f
|
--14.13%-- e
|
--7.05%-- f

If the user filters by "d", we should:

a) Construct a callgraph that has only callchains containing "d"
b) Express percentages as a fraction of the unfiltered total_period
c) Allow users to expand callchains and see both the callers and callees of d.

Right now, I can do this in two steps:

# Get the callgraph leading to "d"
perf report -S d -G -g graph,0.5,callee

100.00% foo foo
|
--- __libc_start_main
main
|
|--51.37%-- a
| c
| d
|
--48.63%-- b
c
d

# Get the callgraph below "d" (i.e. where d is the caller)

perf report d -G -g graph,0.5,caller -s inclusive

95.56% [.] d
|
--- d
|
--46.88%-- f

and the percentages are not expressed as a percentages of the total_period.

I'll send out a RFC patch next.

-Arun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/