bpftrace
bpftrace copied to clipboard
High-level tracing language for Linux eBPF - development moved to https://github.com/iovisor/bpftrace
Given an address, resolve to the user level symbol string. Will be used by ustack as well.
User statically-defined tracing events (user-level tracepoints). They are in some libraries, databases, and runtimes. Something like this should be possible: ``` bpftrace -e 'usdt:pthread:pthread_create { printf("created thread\n"); }' ``` bcc...
quantize() gives us power-of-2, but there's also a need for custom linear. args: min, max, step.
This is for performance monitoring counter events. bcc has an example tool: llcstat. An interface might look like this: ``` bpftrace -e 'perf:cpu-cycles:10000000 { @[tid] = count(); }' ``` That...
Something like this should work (inspired by bcc's trace): ``` bpftrace -e 'tracepoint:block:block_rq_insert { printf("sectors: %d\n", args->nr_sector); }' ```
``` # ./bpftrace -e 'kprobe:sys_read { @who[ustack] = count(); }' Attaching 1 probe... ^C @who[ 0x7f572d91b230 0x7f572dfc1282 0x652f74656e2f7373 ]: 1 @who[ 0x7fd85a3da500 0x17ccf70 0x17c20f0 0x80100007ffffff2 [...] ``` At least some...
Debian packaging? I'm not an expert, just filing this as a todo.
e.g. provider = "kprobe" for kprobe:sys_read target = "/lib/libc-2.25.so" for uprobe:/lib/libc-2.25.so:malloc