From: Song Liu <songliubraving@fb.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: open list <linux-kernel@vger.kernel.org>,
Kernel Team <Kernel-team@fb.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"acme@kernel.org" <acme@kernel.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"alexander.shishkin@linux.intel.com"
<alexander.shishkin@linux.intel.com>,
"namhyung@kernel.org" <namhyung@kernel.org>
Subject: Re: [RFC 1/2] perf: support build BPF skeletons with perf
Date: Tue, 24 Nov 2020 23:51:21 +0000 [thread overview]
Message-ID: <E615D7DE-06E4-4903-B47D-40336EB1F184@fb.com> (raw)
In-Reply-To: <20201122233214.GC1902740@krava>
> On Nov 22, 2020, at 3:32 PM, Jiri Olsa <jolsa@redhat.com> wrote:
>
> On Wed, Nov 18, 2020 at 08:50:45PM -0800, Song Liu wrote:
>
> SNIP
>
>> diff --git a/tools/perf/util/bpf_skel/.gitignore b/tools/perf/util/bpf_skel/.gitignore
>> new file mode 100644
>> index 0000000000000..5263e9e6c5d83
>> --- /dev/null
>> +++ b/tools/perf/util/bpf_skel/.gitignore
>> @@ -0,0 +1,3 @@
>> +# SPDX-License-Identifier: GPL-2.0-only
>> +.tmp
>> +*.skel.h
>> \ No newline at end of file
>> diff --git a/tools/perf/util/bpf_skel/Makefile b/tools/perf/util/bpf_skel/Makefile
>> new file mode 100644
>> index 0000000000000..853bece088f4b
>> --- /dev/null
>> +++ b/tools/perf/util/bpf_skel/Makefile
>> @@ -0,0 +1,71 @@
>> +# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
>> +SKEL_OUTPUT := $(abspath .)
>> +TMP_OUTPUT := $(abspath .tmp)
>> +CLANG ?= clang
>> +LLC ?= llc
>> +LLVM_STRIP ?= llvm-strip
>> +DEFAULT_BPFTOOL := $(TMP_OUTPUT)/sbin/bpftool
>> +BPFTOOL ?= $(DEFAULT_BPFTOOL)
>> +LIBBPF_SRC := $(abspath ../../../lib/bpf)
>> +BPFOBJ := $(TMP_OUTPUT)/libbpf.a
>> +BPF_INCLUDE := $(TMP_OUTPUT)
>> +INCLUDES := -I$(TMP_OUTPUT) -I$(BPF_INCLUDE) -I$(abspath ../../../lib) \
>> + -I$(abspath ../../../include/uapi)
>> +CFLAGS := -g -Wall
>> +
>> +# Try to detect best kernel BTF source
>> +KERNEL_REL := $(shell uname -r)
>> +VMLINUX_BTF_PATHS := /sys/kernel/btf/vmlinux /boot/vmlinux-$(KERNEL_REL)
>> +VMLINUX_BTF_PATH := $(or $(VMLINUX_BTF),$(firstword \
>> + $(wildcard $(VMLINUX_BTF_PATHS))))
>> +ifeq ($(V),1)
>> +Q =
>> +msg =
>> +else
>> +Q = @
>> +msg = @printf ' %-8s %s%s\n' "$(1)" "$(notdir $(2))" "$(if $(3), $(3))";
>> +MAKEFLAGS += --no-print-directory
>> +submake_extras := feature_display=0
>> +endif
>
> some of the above should already be defined in the base Makefile.perf
> we should use that, I think it'd fit better in the Makefile.perf itself
Let me try that. OTOH, I think Makefile.perf is a little too big (1k+ lines)..
Thanks,
Song
next prev parent reply other threads:[~2020-11-24 23:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 4:50 [RFC 0/2] Introduce perf-stat -b for BPF programs Song Liu
2020-11-19 4:50 ` [RFC 1/2] perf: support build BPF skeletons with perf Song Liu
2020-11-22 23:27 ` Jiri Olsa
2020-11-24 23:47 ` Song Liu
2020-11-25 16:38 ` Jiri Olsa
2020-11-22 23:32 ` Jiri Olsa
2020-11-24 23:51 ` Song Liu [this message]
2020-11-22 23:35 ` Jiri Olsa
2020-11-24 23:52 ` Song Liu
2020-11-25 16:40 ` Jiri Olsa
2020-11-24 19:51 ` Jiri Olsa
2020-11-24 23:59 ` Song Liu
2020-11-24 19:51 ` Jiri Olsa
2020-11-24 23:53 ` Song Liu
2020-11-19 4:50 ` [RFC 2/2] perf-stat: enable counting events for BPF programs Song Liu
2020-11-23 23:47 ` Jiri Olsa
2020-11-24 23:31 ` Song Liu
2020-11-25 16:42 ` Jiri Olsa
2020-11-24 19:51 ` Jiri Olsa
2020-11-24 23:43 ` Song Liu
2020-11-25 0:02 ` Song Liu
2020-11-25 16:43 ` Jiri Olsa
2020-11-19 14:52 ` [RFC 0/2] Introduce perf-stat -b " Arnaldo Carvalho de Melo
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=E615D7DE-06E4-4903-B47D-40336EB1F184@fb.com \
--to=songliubraving@fb.com \
--cc=Kernel-team@fb.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®