public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	Ian Rogers <irogers@google.com>, Jiri Olsa <jolsa@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] perf augmented_raw_syscalls.bpf: Move 'struct timespec64' to vmlinux.h
Date: Fri, 16 Feb 2024 14:48:48 -0300	[thread overview]
Message-ID: <Zc-gAKByhLBV_X59@x1> (raw)
In-Reply-To: <CAM9d7cgPAuY=R2FTOc8ffZpe_O9iaosZ7FNHvpB-aCk9pj1N4A@mail.gmail.com>

On Mon, Feb 05, 2024 at 03:16:25PM -0800, Namhyung Kim wrote:
> On Fri, Feb 2, 2024 at 6:01 PM Namhyung Kim <namhyung@kernel.org> wrote:
> > On Fri, Feb 2, 2024 at 11:35 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > If we instead decide to generate vmlinux.h from BTF info, it will be
> > > there:

> > >   $ pahole timespec64
> > >   struct timespec64 {
> > >         time64_t                   tv_sec;               /*     0     8 */
> > >         long int                   tv_nsec;              /*     8     8 */
> > >   };

> > Acked-by: Namhyung Kim <namhyung@kernel.org>
 
> Hmm.. but it makes it fail to build with GEN_VMLINUX_H=1.
 
>   CLANG   linux/tools/perf/util/bpf_skel/.tmp/augmented_raw_syscalls.bpf.o
> In file included from util/bpf_skel/augmented_raw_syscalls.bpf.c:10:
> linux/tools/include/uapi/linux/bpf.h:55:2: error: redefinition of
> enumerator 'BPF_REG_0'
>         BPF_REG_0 = 0,
>         ^
> linux/tools/perf/util/bpf_skel/.tmp/../vmlinux.h:46833:2: note:
> previous definition is here
>         BPF_REG_0 = 0,
>         ^

Right, the following oneliner fixes it (the minimalistic pre-built
vmlinux.h we carry when not using GEN_VMLINUX_H=1 already has it), I'll
squash it, do some container test builds and resend.

- Arnaldo

diff --git a/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c b/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
index d3b672593c540259..0acbd74e8c760956 100644
--- a/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
+++ b/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
@@ -7,7 +7,6 @@
  */
 
 #include "vmlinux.h"
-#include <linux/bpf.h>
 #include <bpf/bpf_helpers.h>
 #include <linux/limits.h>
 

      reply	other threads:[~2024-02-16 17:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-02 19:35 [PATCH 1/1] perf augmented_raw_syscalls.bpf: Move 'struct timespec64' to vmlinux.h Arnaldo Carvalho de Melo
2024-02-03  2:01 ` Namhyung Kim
2024-02-05 23:16   ` Namhyung Kim
2024-02-16 17:48     ` 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=Zc-gAKByhLBV_X59@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox