So I’ve been thinking a lot about profiling and understanding the compiler recently. For example, I added a simple hack to enable profiling rustc queries with perf, which I’ve found very useful. But that was just based on a regexp applied to the symbol names, it’d be cool to be able to do deeper introspection.
Recently I stumbled across the concept of dtrace “application providers” – I was thinking it’d be really neat to integrate some of these into rustc! For starters, we could trigger on rustc queries, but we could also trigger for other kinds of events (e.g., red/green for incremental, etc). I’ve not looked that deeply yet, does anybody have experience with these?
(There are also language providers that rustc could emit to help users get more insight.)