On Mon, Oct 09, 2017 at 11:09:44AM -0300, Arnaldo Carvalho de Melo wrote: SNIP
> [root@jouet bpf]# cat sys_read.c > #define SEC(NAME) __attribute__((section(NAME), used)) > SEC("func=sys_read") > int bpf_func__sys_read(void *ctx) > { > return 1; > } > char _license[] SEC("license") = "GPL"; > int _version SEC("version") = LINUX_VERSION_CODE; > [root@jouet bpf]# perf trace --no-syscalls -e sys_read.c/max-stack=5/ sleep 1 > bpf: builtin compilation failed: -95, try external compiler > 0.000 perf_bpf_probe:func:(ffffffffb7263190)) > sys_read ([kernel.kallsyms]) > entry_SYSCALL_64_fastpath > ([kernel.kallsyms]) > __read (/usr/lib64/ld-2.25.so) > _dl_map_object (/usr/lib64/ld-2.25.so) > [root@jouet bpf]# perf trace --no-syscalls -e sys_read.c sleep 1 > bpf: builtin compilation failed: -95, try external compiler > 0.000 perf_bpf_probe:func:(ffffffffb7263190)) > [root@jouet bpf]# is this ok? > > [root@jouet bpf]# perf stat -e UOPS_EXECUTED.CORE sleep 1 > > Performance counter stats for 'sleep 1': > > 1,205,347 UOPS_EXECUTED.CORE > > > 1.001694225 seconds time elapsed > > But I noticed this problem: > > [root@jouet bpf]# perf stat -e > cpu/uops_executed.core/,uops_executed.core,cpu/UOPS_EXECUTED.CORE sleep 1 > event syntax error: > '..d=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=01;05;37;41:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:IY�' > \___ parser error > Run 'perf list' for a list of valid events > mama mia, this looks like unhandled case of error printing.. I'll check jirka