I've summarized my work on Userspace, Statically Defined Tracing support for Bitcoin Core in my Coinbase grant half-time report.
@0xb10c Absolutely, sounds good. I will have to read it before CoreDev then if you're doing a workshop. It still hasn't clicked with me when it makes sense to use tracing over debugging (or vice versa). I guess if I was a more experienced debugger I'd encounter more problems where I hit the limits of what a debugger can do.
@michaelfolkson I'm not sure if I'd see reading "BPF Performance Tools" as a requirement. The tools are very specific for tracepoints in the Linux kernel. We don't use any of these tools or tracepoints.
We just implement our own tracepoints in our userspace application (Bitcoin Core) and write custom scripts to get insights into the parts we find important.
Additionally, I think 'tracing' via USDT and debugging are two very different things. You can use tracing via USDT as part of the search for a bug, but you can't replace debugging with tracing.
Sometimes debugging, as in stepping through code and looking at state with e.g. GDB, is something you do manually.
The tracing done with USDT allows you to use internal state programatically. You can automatically react to some state.
@0xb10c Thanks for this. This still sounds to me like USDT tracing is something you do once you hit the limits of what a debugger can do? Like deeper, richer debugging? The stop, start nature of breakpoints versus allowing the code to run continuously and still manipulate it? Or maybe you locate the bug using debugging and then you want to explore the impact of the bug with USDT tracing?
@michaelfolkson Yes, debugging is definitely one of the USDT applications. Also developers can be use the tracepoints to evaluate/review changes like I do with the erlay vs master nodes dashboard. Or for general monitoring, anomaly detection, benchmarking, and testing.
@0xb10c Added a StackExchange post with the above, thanks! https://bitcoin.stackexchange.com/questions/109484/when-would-i-use-usdt-tracing-over-debugging-how-do-they-compare-and-complement/
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!