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

support for printf() formatting widths #21

Closed brendangregg closed 6 years ago

brendangregg commented 6 years ago
# ./src/bpftrace -e 'kprobe:sys_nanosleep { printf("%d %d %s\n", tid, pid, comm); }'
Attaching 1 probe...
1396 1396 iscsid
3669 3645 mysqld

# ./src/bpftrace -e 'kprobe:sys_nanosleep { printf("%-6d %6d %s\n", tid, pid, comm); }'
printf: Too many arguments for format string (3 supplied, 1 expected)

This ticket is for format widths and justification.