From: Jiri Olsa <jolsa@redhat.com>
To: Song Liu <songliubraving@fb.com>
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
namhyung@kernel.org
Subject: Re: [RFC v2 0/2] Introduce perf-stat -b for BPF programs
Date: Tue, 1 Dec 2020 21:16:54 +0100 [thread overview]
Message-ID: <20201201201654.GD3169083@krava> (raw)
In-Reply-To: <20201201073647.753079-1-songliubraving@fb.com>
On Mon, Nov 30, 2020 at 11:36:45PM -0800, Song Liu wrote:
> This set introduces perf-stat -b option to count events for BPF programs.
> This is similar to bpftool-prog-profile. But perf-stat makes it much more
> flexible.
>
> Sending as RFC because I haven't addressed some known limitations:
> 1. Only counting events for one BPF program at a time.
> 2. Need extra logic in target__validate().
hi,
I'm getting this eror:
CLANG /home/jolsa/linux-perf/tools/perf/util/bpf_skel/.tmp/dummy.bpf.o
util/bpf_skel/dummy.bpf.c:4:10: fatal error: 'bpf/bpf_helpers.h' file not found
#include <bpf/bpf_helpers.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
I added change below to fix it, but not sure it's the best fix
jirka
---
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index d926f0c35ed4..c8f012132d19 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -1022,7 +1022,7 @@ BPFTOOL_CFLAGS := $(filter-out -D_GNU_SOURCE,$(CFLAGS))
BPFTOOL := $(SKEL_TMP_OUT)/bpftool-bootstrap
LIBBPF_SRC := $(abspath ../lib/bpf)
BPFOBJ := $(SKEL_TMP_OUT)/libbpf.a
-BPF_INCLUDE := $(SKEL_TMP_OUT)
+BPF_INCLUDE := -I$(LIBBPF_SRC)/..
submake_extras := feature_display=0
$(SKEL_TMP_OUT):
@@ -1034,7 +1034,7 @@ $(BPFTOOL): | $(SKEL_TMP_OUT)
$(SKEL_TMP_OUT)/%.bpf.o: util/bpf_skel/%.bpf.c $(BPFOBJ) | $(SKEL_TMP_OUT)
$(call QUIET_CLANG, $@)
- $(Q)$(CLANG) -g -O2 -target bpf -c $(filter util/bpf_skel/%.bpf.c,$^) -o $@ && \
+ $(Q)$(CLANG) -g -O2 -target bpf $(BPF_INCLUDE) -c $(filter util/bpf_skel/%.bpf.c,$^) -o $@ && \
$(LLVM_STRIP) -g $@
$(SKEL_OUT)/%.skel.h: $(SKEL_TMP_OUT)/%.bpf.o | $(BPFTOOL)
next prev parent reply other threads:[~2020-12-01 20:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 7:36 [RFC v2 0/2] Introduce perf-stat -b for BPF programs Song Liu
2020-12-01 7:36 ` [RFC v2 1/2] perf: support build BPF skeletons with perf Song Liu
2020-12-01 20:54 ` Jiri Olsa
2020-12-01 22:47 ` Song Liu
2020-12-03 22:20 ` Jiri Olsa
2020-12-01 7:36 ` [RFC v2 2/2] perf-stat: enable counting events for BPF programs Song Liu
2020-12-01 20:16 ` Jiri Olsa [this message]
2020-12-01 20:43 ` [RFC v2 0/2] Introduce perf-stat -b " Song Liu
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=20201201201654.GD3169083@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=songliubraving@fb.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 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.