Stream: t-compiler/wg-self-profile

Topic: tying to which part of the code


nikomatsakis (Aug 14 2019 at 16:14, on Zulip):

Hey @WG-self-profile -- so I was talking to some folks yesterday who had been diagnosting a major compilation time issue. They expressed a desire (that I think many of us have) to be able to gain more insight into what parts of their code are causing compilation time explosions. This was an initial goal for the self-profile work. I was wondering if anybody had thought more about it in the meantime?

They also were having trouble finding the docs. As far as I know, the docs are still basically on the measureme crate, right? Maybe we can add some kind of pointer to the rustc book, this seems like a feature that a lot of people would have an interest in.

Wesley Wiser (Aug 14 2019 at 16:18, on Zulip):

Hi niko!

They expressed a desire (that I think many of us have) to be able to gain more insight into what parts of their code are causing compilation time explosions.

You mean what parts of their code are causing rustc to spend a lot of time processing rather than what parts of rustc are taking a long time right?

hey also were having trouble finding the docs. As far as I know, the docs are still basically on the measureme crate, right?

Yeah, that's correct.

Maybe we can add some kind of pointer to the rustc book, this seems like a feature that a lot of people would have an interest in.

This is a good idea. I think there's already a section on profiling which this could be added to.

nikomatsakis (Aug 14 2019 at 18:00, on Zulip):

@Wesley Wiser

You mean what parts of their code are causing rustc to spend a lot of time processing rather than what parts of rustc are taking a long time right?

correct

nikomatsakis (Aug 14 2019 at 18:00, on Zulip):

I think the idea was basically that we could tag the items with the DefId they are "primarily" processing or something

nikomatsakis (Aug 14 2019 at 18:00, on Zulip):

it seems like an oft-requested and very interesting feature to me

Wesley Wiser (Aug 14 2019 at 18:01, on Zulip):

Yeah, I think @mw had some ideas about how to do this (more) efficiently by using the incremental graph and NodeIds but I may be misremembering.

mw (Aug 15 2019 at 14:01, on Zulip):

I could imagine some really interesting tooling here ...

mw (Aug 15 2019 at 14:01, on Zulip):

we are not recording query-keys/function args yet, so at the moment the data will give only limited insight

mw (Aug 15 2019 at 14:03, on Zulip):

regarding the usability of this feature: we are not really at a point where others can use it, I think

mw (Aug 15 2019 at 14:32, on Zulip):

we should record this feature request somewhere (i.e. about making the compiler tell you what part of your code causes compiletime increases)

mw (Aug 15 2019 at 14:33, on Zulip):

it keeps coming up

Wesley Wiser (Aug 15 2019 at 15:12, on Zulip):

I filed https://github.com/rust-lang/measureme/issues/51

mw (Aug 16 2019 at 12:23, on Zulip):

thanks, @Wesley Wiser !

Last update: Nov 17 2019 at 07:45UTC