Re: [PATCH 18/21] perf top: Support callchain accumulation

From: Namhyung Kim
Date: Mon Jan 06 2014 - 03:34:43 EST


On Sun, 5 Jan 2014 19:01:54 +0100, Jiri Olsa wrote:
> On Tue, Dec 24, 2013 at 05:22:24PM +0900, Namhyung Kim wrote:
>> From: Namhyung Kim <namhyung.kim@xxxxxxx>
>>
>> Enable cumulation of callchain of children in perf top.
>>
>> Cc: Arun Sharma <asharma@xxxxxx>
>> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
>> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
>> ---
>> tools/perf/builtin-top.c | 106 +++++++++++++++++++++++++++++++++++++++++++++--
>> 1 file changed, 103 insertions(+), 3 deletions(-)
>>
>> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
>> index 48c527a0f4c8..6a7a76496c94 100644
>> --- a/tools/perf/builtin-top.c
>> +++ b/tools/perf/builtin-top.c
>> @@ -657,6 +657,99 @@ static int symbol_filter(struct map *map __maybe_unused, struct symbol *sym)
>> return 0;
>> }
>>
>> +static int process_cumulative_entry(struct perf_top *top,
>> + struct hist_entry *he,
>> + struct perf_evsel *evsel,
>> + struct addr_location *al,
>> + struct perf_sample *sample,
>> + struct symbol *parent)
>> +{
>
> hum, I wonder how hard would it be to export the iterator
> stuff out of the report command and export it to be usable
> from here as well.. to much code dusplicated below :-\

Yeah, I should find a way to reuse the code.

Thanks,
Namhyung
--
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/