Re: [PATCH 18/27] perf tools: Add callback function to hist_entry_iter

From: Namhyung Kim
Date: Fri May 30 2014 - 00:50:50 EST


On Thu, 29 May 2014 15:16:51 +0200, Jiri Olsa wrote:
> On Thu, May 29, 2014 at 12:58:21PM +0900, Namhyung Kim wrote:
>> +static int hist_iter__report_callback(struct hist_entry_iter *iter,
>> + struct addr_location *al, void *arg)
>> +{
>> + int err = 0;
>> + struct hist_entry *he = iter->he;
>> + struct perf_evsel *evsel = iter->evsel;
>> + struct report *rep = arg;
>> +
>> + if (ui__has_annotation())
>> + err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr);
>
> if we put the annotation stats in here, shouldn't we remove all other
> instancies of above call from:
>
> iter_finish_normal_entry
> iter_add_single_cumulative_entry
> iter_finish_mem_entry

Right, they were double counted.. :-/ I changed this as below and push
to perf/cumulate-v12. Would you please check it again?

Thanks,
Namhyung