-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Avoid copies while creating the metadata object file #89980
Conversation
r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit e94f6d53199fb5057549a7ac40d6789234627853 with merge 004de1ed6e374e4d0b15f135c005f65181a65388... |
@@ -4984,7 +4993,7 @@ dependencies = [ | |||
"hermit-abi", | |||
"libc", | |||
"miniz_oxide", | |||
"object", | |||
"object 0.26.2", |
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.
Consider updating this 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.
The backtrace crate will need to be updated first. While object 0.27 is mostly compatible with 0.26 I don't want to risk it breaking due to the backtrace crate depending on 0.26, but libstd then giving it the 0.27 version.
☀️ Try build successful - checks-actions |
Queued 004de1ed6e374e4d0b15f135c005f65181a65388 with parent 1d6f242, future comparison URL. |
Finished benchmarking commit (004de1ed6e374e4d0b15f135c005f65181a65388): comparison url. Summary: This change led to moderate relevant mixed results 🤷 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never |
e94f6d5
to
22abfca
Compare
This avoids a clone of the section data
22abfca
to
2e42950
Compare
In the last commit I forgot to replace an occurrence of @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 2e42950 with merge 1d2e2ee78a3c9f24af580e6d95c9ee90ff366a43... |
☀️ Try build successful - checks-actions |
Queued 1d2e2ee78a3c9f24af580e6d95c9ee90ff366a43 with parent 6f53ddf, future comparison URL. |
file | ||
}; | ||
let out_file = match fs::File::create(out_filename) { | ||
Ok(out_file) => io::BufWriter::new(out_file), |
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.
could this be an Result::and_then()
chain? to deduplicate the error messages... or are the messages going to be "improved" somehow to be being different?
Finished benchmarking commit (1d2e2ee78a3c9f24af580e6d95c9ee90ff366a43): comparison url. Summary: This change led to moderate relevant mixed results 🤷 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never |
This reverts commit 02f1adf.
Let's try only the @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a3a8a2b with merge 2129c06d54db38da7d32318e20dd5b9b4bedf6b9... |
☀️ Try build successful - checks-actions |
Queued 2129c06d54db38da7d32318e20dd5b9b4bedf6b9 with parent 56694b0, future comparison URL. |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a3a8a2b with merge 3342d61e41045577b63c09dc68e4d2385b8a8e6e... |
☀️ Try build successful - checks-actions |
@rust-timer check 3342d61e41045577b63c09dc68e4d2385b8a8e6e |
@rust-timer build 3342d61e41045577b63c09dc68e4d2385b8a8e6e |
Queued 3342d61e41045577b63c09dc68e4d2385b8a8e6e with parent 84c2a85, future comparison URL. |
Finished benchmarking commit (3342d61e41045577b63c09dc68e4d2385b8a8e6e): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf. @bors rollup=never |
|
@bjorn3 do you think we should still land this despite no significant performance improvements? The changes seem non-intrusive enough that I'm happy to see this landing either way. (r=me, your call if you want to land this or not) |
I think it is worth it. It should wait for backtrace-rs to update it's object dependency first to avoid multiple versions of object being used I think. |
This is now possible thanks to gimli-rs/object#369 and gimli-rs/object#370.