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

self-profiling: Add events for everything except trait selection. #65208

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

michaelwoerister
Copy link
Member

This is the followup PR to #64840.

Trait selection events are still missing (at least those not covered by regular queries).

r? @wesleywiser (or @Mark-Simulacrum if @wesleywiser is not available at the moment)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 8, 2019
@Mark-Simulacrum
Copy link
Member

Just to make sure -- this won't run into the problem we hit earlier with non-contained events, right? I think the answer is no, because all added events are scope-specific. But I'd like to ask to make sure.

r=me modulo that concern

@@ -295,6 +299,9 @@ pub fn collect_crate_mono_items(
let mut inlining_map = MTLock::new(InliningMap::new());

{
let _prof_timer = tcx.prof
.generic_activity("monomorphization_collector_graph_walk");
Copy link
Member

Choose a reason for hiding this comment

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

I could be wrong -- but I think we already have events with spaces in them, in which case this can probably be nicer if we just use spaces directly (both in this event and generally).

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we do. Unless there's a strong reason to use underscores (for instance, if this activity was just the name of the enclosing function), I'd recommend using spaces as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure. In my opinion it's more like: unless there is a strong reason for doing otherwise, it's better to keep any kind of identifiers as simple as possible (e.g. allowing only things that would also make valid Rust identifiers). Otherwise one might end up with headaches down the road, like having to weirdly escape things in commandline strings, or not knowing if trailing whitespace is significant or not. The identifiers emitted here will go through various processing tools (many of which we don't now about yet). I'd rather keep things simple.

Copy link
Member

Choose a reason for hiding this comment

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

Seems reasonable to me.

// In the first step, we place all regular monomorphizations into their
// respective 'home' codegen unit. Regular monomorphizations are all
// functions and statics defined in the local crate.
let mut initial_partitioning = place_root_mono_items(tcx, mono_items);
let mut initial_partitioning = {
let _prof_timer = tcx.prof.generic_activity("cgu_partitioning_place_roots");
Copy link
Member

Choose a reason for hiding this comment

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

cgu partitioning: place roots perhaps?

@bors
Copy link
Contributor

bors commented Oct 9, 2019

☔ The latest upstream changes (presumably #65223) made this pull request unmergeable. Please resolve the merge conflicts.

@wesleywiser
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 9, 2019

📌 Commit 38e0b5c15d4195be42298cb361316c4c350da957 has been approved by wesleywiser

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 9, 2019
@wesleywiser
Copy link
Member

Woops... missed the merge conflict message.

@bors r-

r=me with merge resolved

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 9, 2019
@michaelwoerister
Copy link
Member Author

Just to make sure -- this won't run into the problem we hit earlier with non-contained events, right? I think the answer is no, because all added events are scope-specific. But I'd like to ask to make sure.

Yes, the RAII-based API should make sure that something like that can't happen.

@michaelwoerister
Copy link
Member Author

@bors r=wesleywiser

@bors
Copy link
Contributor

bors commented Oct 9, 2019

📌 Commit ceb1a9c has been approved by wesleywiser

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 9, 2019
@michaelwoerister
Copy link
Member Author

Thanks for the review!

@bors
Copy link
Contributor

bors commented Oct 9, 2019

⌛ Testing commit ceb1a9c with merge 321ccbe...

bors added a commit that referenced this pull request Oct 9, 2019
…iser

self-profiling: Add events for everything except trait selection.

This is the followup PR to #64840.

Trait selection events are still missing (at least those not covered by regular queries).

r? @wesleywiser (or @Mark-Simulacrum if @wesleywiser is not available at the moment)
@bors
Copy link
Contributor

bors commented Oct 9, 2019

☀️ Test successful - checks-azure
Approved by: wesleywiser
Pushing 321ccbe to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 9, 2019
@bors bors merged commit ceb1a9c into rust-lang:master Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants