[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140105152815.GA8720@krava.brq.redhat.com>
Date: Sun, 5 Jan 2014 16:28:15 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung.kim@....com>,
LKML <linux-kernel@...r.kernel.org>,
Arun Sharma <asharma@...com>,
Frederic Weisbecker <fweisbec@...il.com>,
Rodrigo Campos <rodrigo@...g.com.ar>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 01/21] perf tools: Introduce struct add_entry_iter
On Tue, Dec 24, 2013 at 05:22:07PM +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@....com>
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_entry_iter *iter;
> int ret;
>
> if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
> @@ -253,22 +441,22 @@ static int process_sample_event(struct perf_tool *tool,
> if (rep->cpu_list && !test_bit(sample->cpu, rep->cpu_bitmap))
> return 0;
>
> - if (sort__mode == SORT_MODE__BRANCH) {
> - ret = report__add_branch_hist_entry(tool, &al, sample, evsel);
> - if (ret < 0)
> - pr_debug("problem adding lbr entry, skipping event\n");
> - } else if (rep->mem_mode == 1) {
> - ret = report__add_mem_hist_entry(tool, &al, sample, evsel, event);
> - if (ret < 0)
> - pr_debug("problem adding mem entry, skipping event\n");
> - } else {
> - if (al.map != NULL)
> - al.map->dso->hit = 1;
> -
> - ret = report__add_hist_entry(tool, evsel, &al, sample);
> - if (ret < 0)
> - pr_debug("problem incrementing symbol period, skipping event\n");
> - }
> + if (sort__mode == SORT_MODE__BRANCH)
> + iter = &branch_iter;
> + else if (rep->mem_mode == 1) {
> + iter = &mem_iter;
> + iter->priv = event;
> + } else
> + iter = &normal_iter;
> +
> + if (al.map != NULL)
> + al.map->dso->hit = 1;
> +
> + 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'
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists