lkml.org 
[lkml]   [2018]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/48] perf tools: Remove perf_tool from event_op3
On Tue, Sep 18, 2018 at 05:56:09PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Sep 13, 2018 at 02:54:04PM +0200, Jiri Olsa escreveu:
> > Now when we keep perf_tool pointer inside perf_session,
> > there's no need to have perf_tool argument in the
> > event_op3 callback. Removing it.
> >
> > Link: http://lkml.kernel.org/n/tip-78u9m0jbre3bn16l6guqfyrf@git.kernel.org
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> > tools/perf/builtin-inject.c | 6 +++---
> > tools/perf/util/auxtrace.c | 7 +++----
> > tools/perf/util/auxtrace.h | 5 ++---
> > tools/perf/util/session.c | 8 +++-----
> > tools/perf/util/tool.h | 4 +---
> > 5 files changed, 12 insertions(+), 18 deletions(-)
> >
> > diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
> > index d77ed2aea95a..03fc65da0657 100644
> > --- a/tools/perf/builtin-inject.c
> > +++ b/tools/perf/builtin-inject.c
> > @@ -131,10 +131,10 @@ static int copy_bytes(struct perf_inject *inject, int fd, off_t size)
> > return 0;
> > }
> >
> > -static s64 perf_event__repipe_auxtrace(struct perf_tool *tool,
> > - union perf_event *event,
> > - struct perf_session *session)
> > +static s64 perf_event__repipe_auxtrace(struct perf_session *session,
> > + union perf_event *event)
> > {
> > + struct perf_tool *tool = session->tool;
> > struct perf_inject *inject = container_of(tool, struct perf_inject,
> > tool);
> > int ret;
>
> You forgot the !HAVE_AUXTRACE_SUPPORT case, fixed with:

oops, thanks ;-)

jirka

>
>
> diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
> index 03fc65da0657..b4a29f435b06 100644
> --- a/tools/perf/builtin-inject.c
> +++ b/tools/perf/builtin-inject.c
> @@ -172,9 +172,8 @@ static s64 perf_event__repipe_auxtrace(struct perf_session *session,
> #else
>
> static s64
> -perf_event__repipe_auxtrace(struct perf_tool *tool __maybe_unused,
> - union perf_event *event __maybe_unused,
> - struct perf_session *session __maybe_unused)
> +perf_event__repipe_auxtrace(struct perf_session *session __maybe_unused,
> + union perf_event *event __maybe_unused)
> {
> pr_err("AUX area tracing not supported\n");
> return -EINVAL;

\
 
 \ /
  Last update: 2018-09-23 21:46    [W:0.245 / U:2.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site