-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rewrite Windows compat_fn
macro
#99553
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
eb80f18
to
f0eada2
Compare
Hm, I'm not sure who best to review this. The diff for compat.rs isn't particularly helpful so it might be best reviewed as a new thing. Maybe... But feel very free to re-roll. |
8038fee
to
53f47ed
Compare
r=me with some squashing @bors rollup=iffy |
This allows using most delay loaded functions before the init code initializes them. It also only preloads a select few functions, rather than all functions. Co-Authored-By: Mark Rousskov <mark.simulacrum@gmail.com>
53f47ed
to
698d4a8
Compare
@bors r=Mark-Simulacrum |
⌛ Testing commit 698d4a8 with merge 9f9b76c027709b96b04ceadc2c19588248755cb3... |
💥 Test timed out |
@bors retry dist-aarch64-apple spurious timeout |
☀️ Test successful - checks-actions |
Tested on commit rust-lang/rust@76822a2. Direct link to PR: <rust-lang/rust#99553> 💔 miri on windows: test-pass → test-fail (cc @oli-obk @RalfJung).
Finished benchmarking commit (76822a2): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
This allows using most delay loaded functions before the init code initializes them. It also only preloads a select few functions, rather than all functions.
This is optimized for the common case where a function is used after already being loaded (or failed to load). The only change in codegen at the call site is to use an atomic load instead of a plain load, which should have negligible or no impact.
I've split the old
compat_fn
macro in two so as not to mix two different use cases. If/when Windows 7 support is droppedcompat_fn_optional
can be removed entirely.r? rust-lang/libs