-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Do not inline finish_grow #78682
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Do not inline finish_grow #78682
Conversation
If I look at libgkrust.a in Firefox, the
So in terms of size, at least in the case of Firefox, this patch more than undoes the regression. I don't think it should affect performance, but we'll see. |
Would it make sense to instead mark |
Oh I missed #78483, sorry. |
This looks like the right inlining boundary as intended by @nnethercote. #78471 reported |
It may only happen with -Clto. |
Ah, that looks like it: I need both -Clto and a sufficiently large inline-threshold (larger than the opt-level=3 default). Can you build your libgkrust.a with an inlining boundary at |
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 068782448bdf657c6be701c14835d03e1d322c90 with merge 452835b56923f7ef0f8d102f1e96c939cec7af07... |
☀️ Try build successful - checks-actions |
Queued 452835b56923f7ef0f8d102f1e96c939cec7af07 with parent 7b5a9e9, future comparison URL. |
It happens in Firefox with
That would likely make things slower, similarly to #78483. |
Finished benchmarking try commit (452835b56923f7ef0f8d102f1e96c939cec7af07): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
I'm betting that |
I tried a number of things in and around This patch seems fine, though. I'm a little surprised I didn't never-inline @bors r+ |
📌 Commit 068782448bdf657c6be701c14835d03e1d322c90 has been approved by |
⌛ Testing commit 068782448bdf657c6be701c14835d03e1d322c90 with merge 1052db144c002891ffbd4517ea0071a222b52070... |
💔 Test failed - checks-actions |
How can one work around that? |
@alexcrichton do you understand why this change could have broken the test? |
FTR, I already validated that it still optimizes the |
Should we queue another round of perf tests for the SpecFromIterNested change? |
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 76bd145 with merge 1618e13494fc48a6834838c2d90011e29f0434ea... |
☀️ Try build successful - checks-actions |
Queued 1618e13494fc48a6834838c2d90011e29f0434ea with parent c16d52d, future comparison URL. |
Finished benchmarking try commit (1618e13494fc48a6834838c2d90011e29f0434ea): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
Wow, that is a really large savings in max-rss 🎉 |
max-rss is really noisy, compare to the noise run which shows similarly-sized fluctuations on other crates. |
i'm a bit out of the loop here, sry It looks like it is fine to land this PR as is rn and I would be fine with landing if #78682 (comment) is still up to date. It might even make sense to move that summary into the PR description so that it's added to the merge commit. @bors delegate+ |
✌️ @glandium can now approve this pull request |
I'll get new numbers and paste them in the PR message. I've never used bors myself, do I @-it with "rollup" when I'm done? |
@glandium you would say |
📌 Commit 76bd145 has been approved by |
damn it bors @bors r- |
@bors r=lcnr rollup=never |
📌 Commit 76bd145 has been approved by |
☀️ Test successful - checks-actions |
Fixes #78471.
Looking at libgkrust.a in Firefox, the sizes for the
gkrust.*.o
file is:#[inline(never)]
ongrow_amortized
andgrow_exact
, but that has some performance consequencesSo in terms of size, at least in the case of Firefox, this patch more than undoes the regression. I don't think it should affect performance, but we'll see.