ajor / bpftrace

High-level tracing language for Linux eBPF - development moved to https://github.com/iovisor/bpftrace
https://github.com/iovisor/bpftrace
Apache License 2.0
250 stars 15 forks source link

printf() to support type size #24

Closed brendangregg closed 6 years ago

brendangregg commented 6 years ago

Eg, %llu:

# ./src/bpftrace -e 'kprobe:sys_nanosleep { printf("%u: sleep by %d\n", nsecs, tid); }'
Attaching 1 probe...
4040224995: sleep by 3669
5124437: sleep by 1396
754770516: sleep by 3669
1014619814: sleep by 1396
^C

# ./src/bpftrace -e 'kprobe:sys_nanosleep { printf("%llu: sleep by %d\n", nsecs, tid); }'
printf: Unknown format string token: %l