[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <28b9718b-0677-cc23-4c6f-c21169e38c90@fb.com>
Date: Thu, 3 Aug 2017 08:22:51 -0700
From: Yonghong Song <yhs@...com>
To: Peter Zijlstra <peterz@...radead.org>
CC: <ast@...com>, <daniel@...earbox.net>, <netdev@...r.kernel.org>,
<kernel-team@...com>, Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH net-next v2 1/2] bpf: add support for sys_enter_* and
sys_exit_* tracepoints
On 8/3/17 1:08 AM, Peter Zijlstra wrote:
> On Wed, Aug 02, 2017 at 10:28:27PM -0700, Yonghong Song wrote:
>> Currently, bpf programs cannot be attached to sys_enter_* and sys_exit_*
>> style tracepoints. The iovisor/bcc issue #748
>> (https://github.com/iovisor/bcc/issues/748) documents this issue.
>> For example, if you try to attach a bpf program to tracepoints
>> syscalls/sys_enter_newfstat, you will get the following error:
>> # ./tools/trace.py t:syscalls:sys_enter_newfstat
>> Ioctl(PERF_EVENT_IOC_SET_BPF): Invalid argument
>> Failed to attach BPF to tracepoint
>>
>> The main reason is that syscalls/sys_enter_* and syscalls/sys_exit_*
>> tracepoints are treated differently from other tracepoints and there
>> is no bpf hook to it.
>>
>> This patch adds bpf support for these syscalls tracepoints by
>> . permitting bpf attachment in ioctl PERF_EVENT_IOC_SET_BPF
>> . calling bpf programs in perf_syscall_enter and perf_syscall_exit
>>
>> Signed-off-by: Yonghong Song <yhs@...com>
>
> Ack for the perf bits, but you should've Cc'ed steve too I suppose.
Thanks, Peter. This is first time I posted for tracing related changes.
Will for sure remember this next time.
There is a build error:
======
kernel/events/core.c: In function 'perf_event_set_bpf_prog':
>> kernel/events/core.c:8073:18: error: implicit declaration of
function 'is_syscall_trace_event' [-Werror=implicit-function-declaration]
is_syscall_tp = is_syscall_trace_event(event->tp_event);
======
Will address this and send another patch soon.
Powered by blists - more mailing lists