Our great sponsors
-
bpftrace
Discontinued High-level tracing language for Linux eBPF [Moved to: https://github.com/bpftrace/bpftrace]
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I went to use bpftrace to solve a real problem recently, and unfortunately found I had to resort to systemtap.
I wanted to print a debug log as it was being saved in a kernel module - that's fine, the module has an equivalent of save_log(char* foo), just probe on entrance and print that, right?
...except bpftrace has a hard cap of 200-odd bytes for getting char *s out with str() at a time. [1]
Fine, so you just do some pointer math and print foo, foo+200, etc, right?
No strlen, no printf return value, so you don't know where the end of the string is.
At that point, I said "sod it" and broke out systemtap.
[1] - https://github.com/iovisor/bpftrace/issues/305