public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Song Liu <songliubraving@meta.com>,
	Yang Jihong <yangjihong1@huawei.com>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tom Rix <trix@redhat.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org, bpf@vger.kernel.org,
	llvm@lists.linux.dev
Subject: Re: [PATCH v1] perf build: Add system include paths to BPF builds
Date: Wed, 10 May 2023 14:34:54 -0300	[thread overview]
Message-ID: <ZFvVvp0tYqxHWFsB@kernel.org> (raw)
In-Reply-To: <20230506021450.3499232-1-irogers@google.com>

Em Fri, May 05, 2023 at 07:14:50PM -0700, Ian Rogers escreveu:
> There are insufficient headers in tools/include to satisfy building
> BPF programs and their header dependencies. Add the system include
> paths from the non-BPF clang compile so that these headers can be
> found.
> 
> This code was taken from:
> tools/testing/selftests/bpf/Makefile
> 
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/Makefile.perf | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 61c33d100b2b..37befdfa8ac8 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -1057,7 +1057,25 @@ $(SKEL_TMP_OUT) $(LIBAPI_OUTPUT) $(LIBBPF_OUTPUT) $(LIBPERF_OUTPUT) $(LIBSUBCMD_
>  
>  ifndef NO_BPF_SKEL

So this patch was done before the reverts, I adjusted it to what is
upstream and to another patch that makes the build use the headers from
the perf sources instead of the system's (linux/bpf.h and
linux/perf_event.h, from vmlinux.h), please take a look at the patch
below, I'm also trying to figure out that other problem you pointed with
linux/types.s :-\

What I have now in tmp.perf-tools:

⬢[acme@toolbox perf-tools]$ git log --oneline torvalds/master..
a2af0f6b8ef7ea40 (HEAD -> perf-tools) perf build: Add system include paths to BPF builds
5be6cecda0802f23 perf bpf skels: Make vmlinux.h use bpf.h and perf_event.h in source directory
7d161165d9072dcb perf parse-events: Do not break up AUX event group
a468085011ea8bba perf test test_intel_pt.sh: Test sample mode with event with PMU name
123361659fa405de perf evsel: Modify group pmu name for software events
34e82891d995ab89 tools arch x86: Sync the msr-index.h copy with the kernel sources
705049ca4f5b7b00 tools headers kvm: Sync uapi/{asm/linux} kvm.h headers with the kernel sources
8d6a41c8065e1120 tools include UAPI: Sync the sound/asound.h copy with the kernel sources
92b8e61e88351091 tools headers UAPI: Sync the linux/const.h with the kernel headers
e7ec3a249c38a9c9 tools headers UAPI: Sync the i915_drm.h with the kernel sources
e6232180e524e112 tools headers UAPI: Sync the drm/drm.h with the kernel sources
5d1ac59ff7445e51 tools headers UAPI: Sync the linux/in.h with the kernel sources
b0618f38e2ab8ce3 perf build: Gracefully fail the build if BUILD_BPF_SKEL=1 is specified and clang isn't available
5f0b89e632ed81b6 perf test java symbol: Remove needless debuginfod queries
327daf34554d20a6 perf parse-events: Don't reorder ungrouped events by PMU
ccc66c6092802d68 perf metric: JSON flag to not group events if gathering a metric group
1b114824106ca468 perf stat: Introduce skippable evsels
2a939c8695035b11 perf metric: Change divide by zero and !support events behavior
⬢[acme@toolbox perf-tools]$

Please help me test this,

Regards,

- Arnaldo



  parent reply	other threads:[~2023-05-10 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06  2:14 [PATCH v1] perf build: Add system include paths to BPF builds Ian Rogers
2023-05-07  2:56 ` Namhyung Kim
2023-05-10 17:34 ` Arnaldo Carvalho de Melo [this message]
2023-05-11  0:05   ` Ian Rogers

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=ZFvVvp0tYqxHWFsB@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bpf@vger.kernel.org \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=peterz@infradead.org \
    --cc=songliubraving@meta.com \
    --cc=trix@redhat.com \
    --cc=yangjihong1@huawei.com \
    /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