$ strace -p ${PID} -T -ttt -f 2> >(grep -v epoll_wait)
The above command is the same as:
$ strace -p ${PID} -T -ttt -f 2> /tmp/stderr.out
$ apt-get source linux
bpf_trace_printk
is defined in bpf_helpers.h
which is not distributed with linux kernel.
When compile BPF programs, you may occur following warning:
foo.c:4:5: warning: implicit declaration of function 'bpf_trace_printk' is invalid in C99 [-Wimplicit-function-declaration]
bpf_trace_printk(msg, sizeof(msg));
^
1 warning generated.
$ echo global > /sys/kernel/debug/tracing/trace_clock
$ echo 'p:kprobes/tcp_reset tcp_reset port=+12(%di):u16 dst=+0(%di):u32 state=+18(%di):u8' >> /sys/kernel/debug/tracing/kprobe_events
$ echo 1 > /sys/kernel/debug/tracing/events/kprobes/tcp_reset/enable
$ echo 'p:kprobes/tcp_retransmit tcp_retransmit_skb port=+12(%di):u16 dst=+0(%di):u32 state=+18(%di):u8' >> /sys/kernel/debug/tracing/kprobe_events
$ echo 1 > /sys/kernel/debug/tracing/events/kprobes/tcp_retransmit/enable
System call number and return value
Arch/ABI Instruction System Ret Ret Error Notes
call # val val2
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ