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

propagate TIME_DEPTH to the helper threads for -Z time-passes #38645

Merged
merged 1 commit into from
Dec 29, 2016

Conversation

nikomatsakis
Copy link
Contributor

@nikomatsakis nikomatsakis commented Dec 28, 2016

Currently, the timing measurements for LLVM passes and the like don't come out indented, which messes up perf.rust-lang.org.

r? @nrc

@nrc
Copy link
Member

nrc commented Dec 28, 2016

@bors: r+

@bors
Copy link
Contributor

bors commented Dec 28, 2016

📌 Commit ad747c5 has been approved by nrc

@nikomatsakis
Copy link
Contributor Author

@bors p=1

Time-sensitive, needed to fix perf results for incr. comp. tests.

@bors
Copy link
Contributor

bors commented Dec 28, 2016

⌛ Testing commit ad747c5 with merge 26366b2...

@bors
Copy link
Contributor

bors commented Dec 28, 2016

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Dec 28, 2016

⌛ Testing commit ad747c5 with merge 8ad040c...

@bors
Copy link
Contributor

bors commented Dec 28, 2016

💔 Test failed - status-travis

thread_local!(static TIME_DEPTH: Cell<usize> = Cell::new(0));

/// Read the current depth of `time()` calls. This is used to
/// encourage indentation across threads.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment seems to be nonsensical given that TIME_DEPTH is a thread-local static. Perhaps it should be an AtomicUsize and shared across threads instead?

/// `set_time_depth()` with the result from `time_depth()` in the
/// parent thread.
pub fn set_time_depth(depth: usize) {
TIME_DEPTH.with(|slot| slot.set(depth));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh.

@alexcrichton
Copy link
Member

alexcrichton commented Dec 28, 2016 via email

@bors
Copy link
Contributor

bors commented Dec 29, 2016

⌛ Testing commit ad747c5 with merge 07fdfe6...

@bors
Copy link
Contributor

bors commented Dec 29, 2016

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

@bors: retry

  • because it's normal for linkers to segfault, right?

@nagisa
Copy link
Member

nagisa commented Dec 29, 2016

because it's normal for linkers to segfault, right?

Yes.

@bors
Copy link
Contributor

bors commented Dec 29, 2016

⌛ Testing commit ad747c5 with merge ae38ba2...

@bors
Copy link
Contributor

bors commented Dec 29, 2016

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member

@bors
Copy link
Contributor

bors commented Dec 29, 2016

⌛ Testing commit ad747c5 with merge ebc293b...

bors added a commit that referenced this pull request Dec 29, 2016
propagate TIME_DEPTH to the helper threads for -Z time-passes

Currently, the timing measurements for LLVM passes and the like don't come out indented, which messes up `perf.rust-lang.org`.

r? @nrc
@bors
Copy link
Contributor

bors commented Dec 29, 2016

☀️ Test successful - status-appveyor, status-travis
Approved by: nrc
Pushing ebc293b to master...

@bors bors merged commit ad747c5 into rust-lang:master Dec 29, 2016
@nikomatsakis nikomatsakis deleted the incr-comp-fix-time-depth branch April 14, 2017 10:12
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.

5 participants