[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130722101512.GD14350@krava.brq.redhat.com>
Date: Mon, 22 Jul 2013 12:15:12 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Andi Kleen <ak@...ux.intel.com>,
David Ahern <dsahern@...il.com>
Subject: Re: [PATCH 18/23] perf tools: Move synthetizing into single function
On Fri, Jul 19, 2013 at 09:30:50PM +0900, Namhyung Kim wrote:
> On Wed, 17 Jul 2013 19:49:58 +0200, Jiri Olsa wrote:
> > Moving synthetizing into single function, so it
>
> s/synthetizing/synthesizing/
>
> The same goes to the subject line too.
ok
>
>
> > could be reused.
> >
> > Signed-off-by: Jiri Olsa <jolsa@...hat.com>
> > Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
> > Cc: Frederic Weisbecker <fweisbec@...il.com>
> > Cc: Ingo Molnar <mingo@...e.hu>
> > Cc: Namhyung Kim <namhyung@...nel.org>
> > Cc: Paul Mackerras <paulus@...ba.org>
> > Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> > Cc: Andi Kleen <ak@...ux.intel.com>
> > Cc: David Ahern <dsahern@...il.com>
> > ---
> > tools/perf/builtin-record.c | 155 ++++++++++++++++++++++++++------------------
> > 1 file changed, 91 insertions(+), 64 deletions(-)
> >
> > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> > index b67564c..33a5bce 100644
> > --- a/tools/perf/builtin-record.c
> > +++ b/tools/perf/builtin-record.c
> > @@ -317,6 +317,95 @@ static void perf_event__synthesize_guest_os(struct machine *machine, void *data)
> > " relocation symbol.\n", machine->pid);
> > }
> >
> > +static int synthesize_record_pipe(struct perf_record *rec)
> > +{
> > + struct perf_session *session = rec->session;
> > + struct perf_tool *tool = &rec->tool;
> > + struct perf_evlist *evlist = rec->evlist;
> > + int err;
> > +
> > + err = perf_event__synthesize_attrs(tool, session,
> > + process_synthesized_event);
> > + if (err < 0) {
> > + pr_err("Couldn't synthesize attrs.\n");
> > + return err;
> > + }
> > +
> > + if (have_tracepoints(&evlist->entries)) {
> > + /*
> > + * FIXME err <= 0 here actually means that
> > + * there were no tracepoints so its not really
> > + * an error, just that we don't need to
> > + * synthesize anything. We really have to
> > + * return this more properly and also
> > + * propagate errors that now are calling die()
> > + */
>
> I believe that this comment is doubly wrong. First we already check
> whether evlist has tracepoints before calling the below function.
> Secondly I think I got rid of all of the die() calls from the
> tracing_data_get/put path.
>
> So I would suggest simply removing this comment block.
ook
thanks,
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