-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
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"); |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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?
☔ The latest upstream changes (presumably #65223) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r+ |
📌 Commit 38e0b5c15d4195be42298cb361316c4c350da957 has been approved by |
Woops... missed the merge conflict message. @bors r- r=me with merge resolved |
Yes, the RAII-based API should make sure that something like that can't happen. |
38e0b5c
to
ceb1a9c
Compare
@bors r=wesleywiser |
📌 Commit ceb1a9c has been approved by |
Thanks for the review! |
…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)
☀️ Test successful - checks-azure |
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)