Get the latest tech news
Exploring a Language Runtime with Bpftrace
So I have been having quite a bit of fun learning about eBPF. It’s been on my todo list for like two or three years, but I’ve finally made the time to actually start to figure it out, and have already found some neat stuff, and had to do some fun hacking.
It’s been on my todo list for like two or three years, but I’ve finally made the time to actually start to figure it out, and have already found some neat stuff, and had to do some fun hacking. Eventually I figured out that actually, there’s a builtin function which behaves pretty much how I want: ustack(n) which returns the top n user stack frames, and can be used as keys to a map. Eventually, with the incredible pointer from Zixian Cai on mastodon I discovered that 1) you need to explicitly print the map, 2) need to do it while the process is alive.
Or read this on Hacker News