Re: [PATCH v3 26/30] perf clang: Link BPF functions declaration into perf

2016-11-30 Thread Arnaldo Carvalho de Melo
Em Sat, Nov 26, 2016 at 09:40:41AM -0800, Alexei Starovoitov escreveu: > On Sat, Nov 26, 2016 at 07:03:50AM +, Wang Nan wrote: > > + * } bpf_funcs[] = { > > + * EOF > > + * grep '^[[:space:]]BPF_FUNC_[^ ]*,' $KERNEL_DIR/include/uapi/linux/bpf.h > > | \ > > + * sed -e 's/.*BPF_FUNC_\([^

Re: [PATCH v3 26/30] perf clang: Link BPF functions declaration into perf

2016-11-26 Thread Alexei Starovoitov
On Sat, Nov 26, 2016 at 07:03:50AM +, Wang Nan wrote: > Use a shell script to generate BPF functions declarations from kernel > source code, embed the generated header into a C string. Following > commits will utilizes clang's virtual file system to automatically > include this header to all BP

[PATCH v3 26/30] perf clang: Link BPF functions declaration into perf

2016-11-25 Thread Wang Nan
Use a shell script to generate BPF functions declarations from kernel source code, embed the generated header into a C string. Following commits will utilizes clang's virtual file system to automatically include this header to all BPF scripts. The generated header is wrapped by a BUILTIN_CLANG_NO_