On Mon, Jan 06, 2014 at 05:03:22PM +0900, Namhyung Kim wrote:
> On Sun, 5 Jan 2014 16:55:10 +0100, Jiri Olsa wrote:
> > On Tue, Dec 24, 2013 at 05:22:07PM +0900, Namhyung Kim wrote:
> >> From: Namhyung Kim
> >
> > SNIP
> >
> >> +
> >> +out:
> >> + iter->curr++;
> >> + return err;
> >> +}
> >> +
On Sun, 5 Jan 2014 16:55:10 +0100, Jiri Olsa wrote:
> On Tue, Dec 24, 2013 at 05:22:07PM +0900, Namhyung Kim wrote:
>> From: Namhyung Kim
>
> SNIP
>
>> +
>> +out:
>> +iter->curr++;
>> +return err;
>> +}
>> +
>> +static int
>> +iter_finish_branch_entry(struct add_entry_iter *iter,
>> +
On Sun, 5 Jan 2014 16:28:15 +0100, Jiri Olsa wrote:
> On Tue, Dec 24, 2013 at 05:22:07PM +0900, Namhyung Kim wrote:
>> From: Namhyung Kim
>> +iter->rep = rep;
>> +ret = perf_evsel__add_entry(evsel, &al, sample, machine, iter);
>
> you dont need to pass machine pointer, it's already in 'al'
On Sun, 5 Jan 2014 15:55:42 +0100, Jiri Olsa wrote:
> On Tue, Dec 24, 2013 at 05:22:07PM +0900, Namhyung Kim wrote:
>> From: Namhyung Kim
>> +static int
>> +iter_finish_branch_entry(struct add_entry_iter *iter,
>> + struct addr_location *al __maybe_unused)
>> +{
>> +free(it
On Tue, Dec 24, 2013 at 05:22:07PM +0900, Namhyung Kim wrote:
> From: Namhyung Kim
SNIP
> +
> +out:
> + iter->curr++;
> + return err;
> +}
> +
> +static int
> +iter_finish_branch_entry(struct add_entry_iter *iter,
> + struct addr_location *al __maybe_unused)
> +{
> +
On Tue, Dec 24, 2013 at 05:22:07PM +0900, Namhyung Kim wrote:
> From: Namhyung Kim
SNIP
> @@ -239,6 +426,7 @@ static int process_sample_event(struct perf_tool *tool,
> {
> struct report *rep = container_of(tool, struct report, tool);
> struct addr_location al;
> + struct add_ent
On Tue, Dec 24, 2013 at 05:22:07PM +0900, Namhyung Kim wrote:
> From: Namhyung Kim
SNIP
> - return err;
> + goto out;
> +
> + err = addr_map_symbol__inc_samples(&bx->to, evsel->idx);
> + if (err)
> + goto out;
> +
> + evsel->hists.stats.total_perio
From: Namhyung Kim
There're some duplicate code when adding hist entries. They are
different in that some have branch info or mem info but generally do
same thing. So introduce new struct add_entry_iter and add callbacks
to customize each case in general way.
The new perf_evsel__add_entry() fu
8 matches
Mail list logo