summaryrefslogtreecommitdiff
path: root/samples/bpf/parse_ldabs.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2016-04-06 18:43:31 -0700
committerMichael Bestas <mkbestas@lineageos.org>2022-04-19 00:50:29 +0300
commit13c0c1c8097401289fe258ef7dc8fd4b76c9060d (patch)
treead0e002c66be0a999bebbc1de103777376134e72 /samples/bpf/parse_ldabs.c
parent24b5be775fbea29819a57a939b76945c1d5d5482 (diff)
samples/bpf: add tracepoint vs kprobe performance tests
the first microbenchmark does fd=open("/proc/self/comm"); for() { write(fd, "test"); } and on 4 cpus in parallel: writes per sec base (no tracepoints, no kprobes) 930k with kprobe at __set_task_comm() 420k with tracepoint at task:task_rename 730k For kprobe + full bpf program manully fetches oldcomm, newcomm via bpf_probe_read. For tracepint bpf program does nothing, since arguments are copied by tracepoint. 2nd microbenchmark does: fd=open("/dev/urandom"); for() { read(fd, buf); } and on 4 cpus in parallel: reads per sec base (no tracepoints, no kprobes) 300k with kprobe at urandom_read() 279k with tracepoint at random:urandom_read 290k bpf progs attached to kprobe and tracepoint are noop. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'samples/bpf/parse_ldabs.c')
0 files changed, 0 insertions, 0 deletions