Skip to content

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Sep 26, 2025

We previously tried to introduce a more gentle version of this hack in github.com//pull/129714, but that wasn't enough because the problem was re-reported in #131960 (comment). So this increases the magic number from 2 to 8. Surely nobody will complain that they have a type whose depth grows more than 8 times faster than its call graph depth.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 26, 2025
@saethlin
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 26, 2025
…try>

Make the inliner recursion depth hack stronger
@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 26, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Sep 26, 2025

☀️ Try build successful (CI)
Build commit: 84baca6 (84baca666cf52534bd50188bd7c20b504018eace, parent: 5b9007bfc358817cf066ee27c6b440440727d3a7)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (84baca6): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.1%, 1.1%] 7
Improvements ✅
(primary)
-1.2% [-1.3%, -1.1%] 2
Improvements ✅
(secondary)
-0.5% [-1.4%, -0.1%] 10
All ❌✅ (primary) -1.2% [-1.3%, -1.1%] 2

Max RSS (memory usage)

Results (primary -3.5%, secondary 3.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.9% [1.0%, 5.4%] 12
Improvements ✅
(primary)
-3.5% [-5.4%, -2.3%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.5% [-5.4%, -2.3%] 3

Cycles

Results (primary -4.2%, secondary -4.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.4% [2.3%, 4.1%] 3
Improvements ✅
(primary)
-4.2% [-10.3%, -2.1%] 22
Improvements ✅
(secondary)
-5.7% [-19.9%, -1.0%] 26
All ❌✅ (primary) -4.2% [-10.3%, -2.1%] 22

Binary size

Results (primary 0.2%, secondary 0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.3% [0.0%, 1.5%] 5
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 37
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 2
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 1
All ❌✅ (primary) 0.2% [-0.1%, 1.5%] 7

Bootstrap: 478.827s -> 470.051s (-1.83%)
Artifact size: 388.10 MiB -> 388.49 MiB (0.10%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 26, 2025
@Kobzol
Copy link
Member

Kobzol commented Sep 26, 2025

(the cycle changes and bootstrap time are noise returning to normal).

@saethlin saethlin force-pushed the geoarrow-inliner-recursion-hack branch from 049731c to 9e379ff Compare September 26, 2025 20:16
@saethlin saethlin marked this pull request as ready for review September 26, 2025 20:16
@rustbot
Copy link
Collaborator

rustbot commented Sep 26, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 26, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 26, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 26, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@petrochenkov
Copy link
Contributor

So this increases the magic number from 2 to 8

4 wasn't enough to fix the crash? :D

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 29, 2025

📌 Commit 9e379ff has been approved by petrochenkov

It is now in the queue for this repository.

@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 Sep 29, 2025
bors added a commit that referenced this pull request Sep 30, 2025
…etrochenkov

Make the inliner recursion depth hack stronger

We previously tried to introduce a more gentle version of this hack in github.com//pull/129714, but that wasn't enough because the problem was re-reported in #131960 (comment). So this increases the magic number from 2 to 8. Surely nobody will complain that they have a type whose depth grows more than 8 times faster than its call graph depth.
@bors
Copy link
Collaborator

bors commented Sep 30, 2025

⌛ Testing commit 9e379ff with merge 0ec7cf7...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-rust-for-linux failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling log v0.4.28
error[E0391]: cycle detected when whether the item should be made inlinable across crates
##[error]    --> /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.106/src/gen/eq.rs:1508:5
     |
1508 |     fn eq(&self, other: &Self) -> bool {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
note: ...which requires optimizing MIR for `gen::eq::<impl at /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.106/src/gen/eq.rs:1507:1: 1507:35>::eq`...
    --> /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.106/src/gen/eq.rs:1508:5
     |
1508 |     fn eq(&self, other: &Self) -> bool {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires whether the item should be made inlinable across crates...
    --> /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.106/src/gen/eq.rs:1473:5
     |
1473 |     fn eq(&self, other: &Self) -> bool {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires optimizing MIR for `gen::eq::<impl at /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.106/src/gen/eq.rs:1472:1: 1472:30>::eq`...
    --> /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.106/src/gen/eq.rs:1473:5
     |
1473 |     fn eq(&self, other: &Self) -> bool {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     = note: ...which again requires whether the item should be made inlinable across crates, completing the cycle
     = note: cycle used when reachability
     = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

For more information about this error, try `rustc --explain E0391`.
error: could not compile `syn` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `bindgen-cli v0.65.1`, intermediate artifacts can be found at `/tmp/cargo-install1OgzOd`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
  local time: Tue Sep 30 02:28:20 UTC 2025
  network time: Tue, 30 Sep 2025 02:28:20 GMT
****************************************************************************
To find more information about this job, visit the following URL:

For more information how to resolve CI failures of this job, visit this link.

@bors
Copy link
Collaborator

bors commented Sep 30, 2025

💔 Test failed - checks-actions

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

That is hilarious

@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 30, 2025
@saethlin saethlin closed this Oct 4, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants