Re: [PATCH v6 tip 3/8] tracing: allow BPF programs to call bpf_ktime_get_ns()

2015-03-13 Thread Alexei Starovoitov
On 3/13/15 4:24 AM, He Kuang wrote: Hi, Alexei I've followed up your bpf version. In bpf filter, sometimes we need to get 'pid' and some other context informations to decide whether to filter or not. For example, to trace a vfs read procedure, we can insert bpf program to '__vfs_read(struct

Re: [PATCH v6 tip 3/8] tracing: allow BPF programs to call bpf_ktime_get_ns()

2015-03-13 Thread He Kuang
Hi, Alexei I've followed up your bpf version. In bpf filter, sometimes we need to get 'pid' and some other context informations to decide whether to filter or not. For example, to trace a vfs read procedure, we can insert bpf program to '__vfs_read(struct file *file, char __user *buf ...)',

Re: [PATCH v6 tip 3/8] tracing: allow BPF programs to call bpf_ktime_get_ns()

2015-03-13 Thread He Kuang
Hi, Alexei I've followed up your bpf version. In bpf filter, sometimes we need to get 'pid' and some other context informations to decide whether to filter or not. For example, to trace a vfs read procedure, we can insert bpf program to '__vfs_read(struct file *file, char __user *buf ...)',

Re: [PATCH v6 tip 3/8] tracing: allow BPF programs to call bpf_ktime_get_ns()

2015-03-13 Thread Alexei Starovoitov
On 3/13/15 4:24 AM, He Kuang wrote: Hi, Alexei I've followed up your bpf version. In bpf filter, sometimes we need to get 'pid' and some other context informations to decide whether to filter or not. For example, to trace a vfs read procedure, we can insert bpf program to '__vfs_read(struct

[PATCH v6 tip 3/8] tracing: allow BPF programs to call bpf_ktime_get_ns()

2015-03-10 Thread Alexei Starovoitov
bpf_ktime_get_ns() is used by programs to compue time delta between events or as a timestamp Signed-off-by: Alexei Starovoitov --- include/uapi/linux/bpf.h |1 + kernel/trace/bpf_trace.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/include/uapi/linux/bpf.h

[PATCH v6 tip 3/8] tracing: allow BPF programs to call bpf_ktime_get_ns()

2015-03-10 Thread Alexei Starovoitov
bpf_ktime_get_ns() is used by programs to compue time delta between events or as a timestamp Signed-off-by: Alexei Starovoitov a...@plumgrid.com --- include/uapi/linux/bpf.h |1 + kernel/trace/bpf_trace.c | 11 +++ 2 files changed, 12 insertions(+) diff --git