lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 1 Dec 2020 20:43:50 +0000
From:   Song Liu <songliubraving@...com>
To:     Jiri Olsa <jolsa@...hat.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Kernel Team <Kernel-team@...com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "acme@...nel.org" <acme@...nel.org>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "alexander.shishkin@...ux.intel.com" 
        <alexander.shishkin@...ux.intel.com>,
        "namhyung@...nel.org" <namhyung@...nel.org>
Subject: Re: [RFC v2 0/2] Introduce perf-stat -b for BPF programs



> On Dec 1, 2020, at 12:16 PM, Jiri Olsa <jolsa@...hat.com> wrote:
> 
> 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

The fix looks great to me. I will fold it in. 

Thanks!
Song

> 
> 
> ---
> 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)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ