All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: John Fastabend <john.fastabend@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org, Song Liu <song@kernel.org>,
	bpf@vger.kernel.org
Subject: Re: [PATCH] perf bpf filter: Fix a broken perf sample data naming in BPF
Date: Fri, 26 May 2023 15:22:01 -0300	[thread overview]
Message-ID: <ZHD4yTkysn5LJZA6@kernel.org> (raw)
In-Reply-To: <64705755d6ae_2023020859@john.notmuch>

Em Thu, May 25, 2023 at 11:53:09PM -0700, John Fastabend escreveu:
> Namhyung Kim wrote:
> > BPF CO-RE requires 3 underscores for the ignored suffix rule but it
> > mistakenly used only 2.  Let's fix it.
> > 
> > Fixes: 3a8b8fc31748 ("perf bpf filter: Support pre-5.16 kernels where 'mem_hops' isn't in 'union perf_mem_data_src'")
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> >  tools/perf/util/bpf_skel/sample_filter.bpf.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/tools/perf/util/bpf_skel/sample_filter.bpf.c b/tools/perf/util/bpf_skel/sample_filter.bpf.c
> > index cffe493af1ed..fb94f5280626 100644
> > --- a/tools/perf/util/bpf_skel/sample_filter.bpf.c
> > +++ b/tools/perf/util/bpf_skel/sample_filter.bpf.c
> > @@ -25,7 +25,7 @@ struct perf_sample_data___new {
> >  } __attribute__((preserve_access_index));
> >  
> >  /* new kernel perf_mem_data_src definition */
> > -union perf_mem_data_src__new {
> > +union perf_mem_data_src___new {
> >  	__u64 val;
> >  	struct {
> >  		__u64   mem_op:5,	/* type of opcode */
> > @@ -108,7 +108,7 @@ static inline __u64 perf_get_sample(struct bpf_perf_event_data_kern *kctx,
> >  		if (entry->part == 7)
> >  			return kctx->data->data_src.mem_blk;
> >  		if (entry->part == 8) {
> > -			union perf_mem_data_src__new *data = (void *)&kctx->data->data_src;
> > +			union perf_mem_data_src___new *data = (void *)&kctx->data->data_src;
> >  
> >  			if (bpf_core_field_exists(data->mem_hops))
> >  				return data->mem_hops;
> > -- 
> > 2.41.0.rc0.172.g3f132b7071-goog
> > 
> > 
> 
> Acked-by: John Fastabend <john.fastabend@gmail.com>

Thanks, applied.

- Arnaldo


      reply	other threads:[~2023-05-26 18:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25  0:03 [PATCH] perf bpf filter: Fix a broken perf sample data naming in BPF Namhyung Kim
2023-05-25 17:54 ` Andrii Nakryiko
2023-05-26  6:53 ` John Fastabend
2023-05-26 18:22   ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZHD4yTkysn5LJZA6@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=irogers@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=song@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.