Skip to content
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

Don't print profiling information twice #5319

Merged
merged 1 commit into from
Apr 8, 2018
Merged

Conversation

matklad
Copy link
Member

@matklad matklad commented Apr 8, 2018

It's important to .clear the messages so that we don't print them
again for the next "profiling session". It might be argued that really
we should have a single "profiling session" for Cargo, but we don't at
the moment.

And, while we are at it, let's lock stdout as well, so that we won't
get confused when Cargo becomes multi-threaded and prints profiling info
from several threads simultaneously.

It's important to `.clear` the messages so that we don't print them
again for the next "profiling session". It might be argued that really
we should have a single "profiling session" for Cargo, but we don't at
the moment.

And, while we are at it, let's lock stdout as well, so that we won't
get confused when Cargo becomes multi-threaded and prints profiling info
from several threads simultaneously.
@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@matklad
Copy link
Member Author

matklad commented Apr 8, 2018

@bors delegate=Eh2406

Let's merge this, if it looks reasonable? Should help us to troubleshoot current perf problems a little bit better :-)

@bors
Copy link
Contributor

bors commented Apr 8, 2018

✌️ @Eh2406 can now approve this pull request

@Eh2406
Copy link
Contributor

Eh2406 commented Apr 8, 2018

I have not used cargos built in profiling before, I just run WPA while cargo is running, but it looks good to me.

@bors r+

@bors
Copy link
Contributor

bors commented Apr 8, 2018

📌 Commit 1549488 has been approved by Eh2406

@bors
Copy link
Contributor

bors commented Apr 8, 2018

⌛ Testing commit 1549488 with merge 9a56660...

bors added a commit that referenced this pull request Apr 8, 2018
Don't print profiling information twice

It's important to `.clear` the messages so that we don't print them
again for the next "profiling session". It might be argued that really
we should have a single "profiling session" for Cargo, but we don't at
the moment.

And, while we are at it, let's lock stdout as well, so that we won't
get confused when Cargo becomes multi-threaded and prints profiling info
from several threads simultaneously.
@bors
Copy link
Contributor

bors commented Apr 8, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: Eh2406
Pushing 9a56660 to master...

@bors bors merged commit 1549488 into rust-lang:master Apr 8, 2018
@matklad matklad deleted the fix-profiler branch April 8, 2018 17:39
@ehuss ehuss added this to the 1.27.0 milestone Feb 6, 2022
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.

6 participants