Skip to content

Avoid collecting extraneous stuff on eprintln runs. #726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

nnethercote
Copy link
Contributor

Currently, collector eprintln collects stderr output for the cargo rustc command. This means it will collect rustc's stderr output for the
leaf crate, but also rustc's stderr output for build scripts that run
for the leaf crate, and also for Cargo's stderr output for all of the
above.

This means it is different to all the other profilers, which only
profile rustc on the leaf crate.

With this change, collector eprintln now only collects rustc's stderr
output for the leaf crate, so it matches the other profiler's behaviour.

The commit also changes time-passes to use the same collection
strategy as eprintln. This wasn't actually necessary, but I did it for
consistency.

Finally, the commit does some minor clean-ups.

Currently, `collector eprintln` collects stderr output for the `cargo
rustc` command. This means it will collect rustc's stderr output for the
leaf crate, but *also* rustc's stderr output for build scripts that run
for the leaf crate, and *also* for Cargo's stderr output for all of the
above.

This means it is different to all the other profilers, which only
profile rustc on the leaf crate.

With this change, `collector eprintln` now only collects rustc's stderr
output for the leaf crate, so it matches the other profiler's behaviour.

The commit also changes `time-passes` to use the same collection
strategy as `eprintln`. This wasn't actually necessary, but I did it for
consistency.

Finally, the commit does some minor clean-ups.
@Mark-Simulacrum Mark-Simulacrum merged commit e1236d9 into rust-lang:master Jul 27, 2020
@nnethercote nnethercote deleted the wrap-eprintln branch July 27, 2020 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants