kennytm / cargo-kcov

Cargo subcommand to run kcov to get coverage report on Linux
127 stars 19 forks source link

Performance regression with rustc 1.30.0-nightly (2ab3eba30 2018-09-14) #35

Open asomers opened 5 years ago

asomers commented 5 years ago

Running cargo kcov is much slower with recent compilers. For example, asomers/futures-locks takes:

nightly-2018-09-06-x86_64: 18.38s nightly-2018-10-01-x86_64: 61.46s nightly-2018-10-15-x86_64: 61.14s 1.30.0 (da5f414c2 2018-10-24): 60.08s

I don't know if this is a problem with rustc or cargo-kcov, but I haven't noticed any problems except when using kcov.

kennytm commented 5 years ago

Thanks for the report. Which OS are you using, and are the cargo-kcov version between 09-06 and 10-01 the same?

asomers commented 5 years ago

I'm using FreeBSD 11.2 amd64. I haven't checked any nightly compilers between 09-06 and 10-01.

kennytm commented 5 years ago

Thanks.

I haven't checked any compiles between 09-06 and 10-01

I mean the version of cargo-kcov itself, not the compiler 😅

asomers commented 5 years ago

Oh, sorry. I'm using cargo-kcov 0.5.0.

asomers commented 5 years ago

Same results with cargo-kcov 0.5.2.

asomers commented 5 years ago

I bisected the compiler version. The slowdown was introduced in rustc 1.30.0-nightly (2ab3eba30 2018-09-14). It was not present in rustc 1.30.0-nightly (90d36fb59 2018-09-13).

kennytm commented 5 years ago

Thanks. The range https://github.com/rust-lang/rust/compare/90d36fb59...2ab3eba30 contains quite many PRs, but I think it's caused by cargo-kcov not updated to properly handle rust-lang/rust#53829.

asomers commented 5 years ago

Wow! Cool that you found it so quickly. I'm going to leave it to you then, unless you need any more help from me.

asomers commented 5 years ago

Hm, it looks like upstream may have fixed things already. The problem is gone with the latest compiler. In fact, it's faster than ever before. Version rustc 1.31.0-nightly (de9666f12 2018-10-31) takes 6.08s.