I was recently poking around at https://github.com/bytecodealliance/cranelift/issues/1318 and it was a case where the crox graphs in Chrome clearly showed that one CGU was massively slower compared to the rest, and I was curious to try to dig into the CGU and see what functions were inside there to translate it to source. I ended up finding a bit of a roundabout method to do it but was curious, is there a better way nowadays to correlate CGUs in cros with actual bitcode files?
Last time that I was looking at some thing like this I used the debug traces that I have updated in https://github.com/rust-lang/rust/pull/65175
Do not think that there is any way to get that from crox logs
Is that an incremental build? If so that would explain why CGUs are unbalanced
I hope I'll get around to adding support for CGU names some time this week.
Hi! I have a profile where a couple of CGUs seem to take a lot of time to ThinLTO (there's a 21s one). I suppose there's no much to do it, but does anyone want to take a look? I haven't seen many of these profiles, so perhaps there's something interesting in there. I uploaded it to https://send.firefox.com/download/3d3511db0db3ed98/#ZYyoAH_gSESkAvnyVzwWoQ. The link expires in 7 days, but I can upload it again after that.
@Alex Crichton this should work now with
-Z self-profile -Z self-profile-events=default,function-args.
you can also do
-Z self-profile -Z self-profile-events=default,args. That will give you query-keys too.
Let me know if you see things showing up as
<unknown> in the output. I think there might be a bug somewhere. At least I've seen two separate reports so far.