Stream: t-compiler/wg-parallel-rustc

Topic: cargo -Ztiming for parallel codegen


simulacrum (Sep 30 2019 at 19:33, on Zulip):

@Alex Crichton do you perhaps have some insight into how hard it'd be to hook up parallel codegen "steps" to -Ztiming graphs from Cargo? In particular, I'd like to get some insight into how much parallelism we're getting in the codegen stage today

Alex Crichton (Sep 30 2019 at 19:33, on Zulip):

@simulacrum not necessarily the hardest thing in the world but also probably not the easiest

simulacrum (Sep 30 2019 at 19:33, on Zulip):

Basically wondering if it makes sense to try and invest 3-4 hours or so to get that for the parallel data graphs so we can compare more easily, or if it's probably relatively hard and not worth it

Alex Crichton (Sep 30 2019 at 19:34, on Zulip):

the way to do it would be to have rustc emit more json blobs

Alex Crichton (Sep 30 2019 at 19:34, on Zulip):

and cargo reads those and records what time it reads those

Alex Crichton (Sep 30 2019 at 19:34, on Zulip):

tbh using -Z self-profile was pretty good for this purpose

Alex Crichton (Sep 30 2019 at 19:34, on Zulip):

although seeing parallelism is hard you can see when cgus are produced

simulacrum (Sep 30 2019 at 19:35, on Zulip):

yeah, the parallelism is of particular interest to this concern

simulacrum (Sep 30 2019 at 19:35, on Zulip):

but sounds like it wouldn't be the hardest thing so I might take a stab and see if I can get anywhere in a couple hours and if not give up for now

simulacrum (Sep 30 2019 at 19:35, on Zulip):

I think it might be worth it

simulacrum (Sep 30 2019 at 19:36, on Zulip):

(depending on how "interesting" the data is, I guess)

Alex Crichton (Sep 30 2019 at 19:36, on Zulip):

there was a really old option for this

Alex Crichton (Sep 30 2019 at 19:36, on Zulip):

like -Z timings-graph

Alex Crichton (Sep 30 2019 at 19:36, on Zulip):

but I think it's since been gutted and turned off

Alex Crichton (Sep 30 2019 at 19:37, on Zulip):

-Z codegen-time-graph

Alex Crichton (Sep 30 2019 at 19:37, on Zulip):

I don't think it does anything any more though

simulacrum (Sep 30 2019 at 19:40, on Zulip):

Yeah, it does nothing today

simulacrum (Sep 30 2019 at 19:40, on Zulip):

I'd want the data on the cargo graph anyway

Santiago Pastorino (Oct 02 2019 at 17:42, on Zulip):

@simulacrum just saw https://perf.rust-lang.org/compare.html?start=702b45e409495a41afcccbe87a251a692b0cefab&end=dc78b8ba143915e07375e9d7f05838222cb1db3e&stat=wall-time doesn't look too bad for a first bench :)

Santiago Pastorino (Oct 02 2019 at 17:43, on Zulip):

did you open a PR and run perf using bots?

simulacrum (Oct 02 2019 at 17:43, on Zulip):

yeah, it's not terrible -- I'll be doing some more benchmarking in the next few days as well, but was pretty happy with that. 5-20% regressions in the "worst" case (locks w/o threads) is pretty good

simulacrum (Oct 02 2019 at 17:43, on Zulip):

yeah, that's a normal perf run (https://github.com/rust-lang/rust/pull/64936) -- I'll be rerunning it to get self profile data as well

Santiago Pastorino (Oct 02 2019 at 17:44, on Zulip):

yeah, I wonder how would it look like as soon as you do -Zthreads=more_than_one parallel

Last update: Nov 17 2019 at 07:55UTC