Skip to content
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

Inline before merging cgus #112695

Merged
merged 4 commits into from
Jun 22, 2023
Merged

Conversation

nnethercote
Copy link
Contributor

Because CGU merging relies on CGU sizes, but the CGU sizes before inlining aren't accurate.

This change doesn't have much effect on compile perf, but it makes follow-on changes that involve more sophisticated reasoning about CGU sizes much easier.

r? @wesleywiser

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 16, 2023
@nnethercote
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 16, 2023
@bors
Copy link
Contributor

bors commented Jun 16, 2023

⌛ Trying commit e33faed6f2008464fb05a2950a650618acc860c7 with merge 48e47fb2e55e4d8be243b32435a7df261fa7d5e2...

@bors
Copy link
Contributor

bors commented Jun 16, 2023

☀️ Try build successful - checks-actions
Build commit: 48e47fb2e55e4d8be243b32435a7df261fa7d5e2 (48e47fb2e55e4d8be243b32435a7df261fa7d5e2)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (48e47fb2e55e4d8be243b32435a7df261fa7d5e2): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

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 may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.8% [0.3%, 6.0%] 6
Regressions ❌
(secondary)
2.9% [0.2%, 47.4%] 20
Improvements ✅
(primary)
-0.3% [-0.6%, -0.1%] 26
Improvements ✅
(secondary)
-0.8% [-1.0%, -0.7%] 3
All ❌✅ (primary) 0.1% [-0.6%, 6.0%] 32

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
5.6% [2.3%, 10.9%] 4
Regressions ❌
(secondary)
4.7% [4.3%, 5.1%] 2
Improvements ✅
(primary)
-5.1% [-7.9%, -1.9%] 7
Improvements ✅
(secondary)
-2.5% [-2.6%, -2.4%] 2
All ❌✅ (primary) -1.2% [-7.9%, 10.9%] 11

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
4.1% [3.1%, 5.0%] 2
Regressions ❌
(secondary)
25.2% [3.3%, 47.1%] 2
Improvements ✅
(primary)
-1.0% [-1.0%, -1.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.4% [-1.0%, 5.0%] 3

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.3% [0.0%, 1.8%] 18
Regressions ❌
(secondary)
19.4% [1.1%, 55.1%] 3
Improvements ✅
(primary)
-0.4% [-1.3%, -0.0%] 24
Improvements ✅
(secondary)
-0.7% [-1.5%, -0.1%] 5
All ❌✅ (primary) -0.1% [-1.3%, 1.8%] 42

Bootstrap: 647.175s -> 650.881s (0.57%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jun 16, 2023
@nnethercote
Copy link
Contributor Author

I bet I can fix those terrible results for issue-46449 by tweaking the minimum CGU size threshold a tiny bit. I'll look into it on Monday.

@nnethercote nnethercote 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 Jun 16, 2023
@nnethercote nnethercote force-pushed the inline-before-merging-cgus branch from e33faed to 1bf78f6 Compare June 19, 2023 00:12
@nnethercote
Copy link
Contributor Author

I changed the minimum size to 2500, which gave good results locally.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 19, 2023
@bors
Copy link
Contributor

bors commented Jun 19, 2023

⌛ Trying commit 1bf78f64646a33c92f51d291a2539ffc0ef06f77 with merge bf804a36bcebc22d1b7558fe1e8ed711ba78e36f...

@bors
Copy link
Contributor

bors commented Jun 19, 2023

☀️ Try build successful - checks-actions
Build commit: bf804a36bcebc22d1b7558fe1e8ed711ba78e36f (bf804a36bcebc22d1b7558fe1e8ed711ba78e36f)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bf804a36bcebc22d1b7558fe1e8ed711ba78e36f): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

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 may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.6% [0.2%, 4.3%] 71
Regressions ❌
(secondary)
0.6% [0.3%, 2.6%] 29
Improvements ✅
(primary)
-0.8% [-1.6%, -0.3%] 10
Improvements ✅
(secondary)
-0.9% [-1.2%, -0.4%] 9
All ❌✅ (primary) 0.4% [-1.6%, 4.3%] 81

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.1% [2.1%, 4.0%] 2
Regressions ❌
(secondary)
3.3% [2.8%, 4.0%] 3
Improvements ✅
(primary)
-3.8% [-9.5%, -1.7%] 6
Improvements ✅
(secondary)
-4.3% [-4.3%, -4.3%] 1
All ❌✅ (primary) -2.1% [-9.5%, 4.0%] 8

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.3% [1.4%, 4.4%] 4
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
-1.8% [-2.5%, -1.0%] 4
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) 0.2% [-2.5%, 4.4%] 8

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.3% [0.0%, 1.8%] 20
Regressions ❌
(secondary)
1.2% [1.0%, 1.5%] 2
Improvements ✅
(primary)
-0.9% [-4.2%, -0.0%] 22
Improvements ✅
(secondary)
-2.1% [-7.5%, -0.2%] 6
All ❌✅ (primary) -0.3% [-4.2%, 1.8%] 42

Bootstrap: 657.452s -> 659.079s (0.25%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 19, 2023
@nnethercote nnethercote force-pushed the inline-before-merging-cgus branch from 1bf78f6 to 7448144 Compare June 19, 2023 04:10
@nnethercote
Copy link
Contributor Author

Let's try 1800.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@nnethercote
Copy link
Contributor Author

I added a couple of additional refactoring commits.

Because CGU merging relies on CGU sizes, but the CGU sizes before
inlining aren't accurate.

This requires tweaking how the sizes are updated during merging: if CGU
A and B both have an inlined function F, then `size(A + B)` will be a
little less than `size(A) + size(B)`, because `A + B` will only have one
copy of F. Also, the minimum CGU size is increased because it now has to
account for inlined functions.

This change doesn't have much effect on compile perf, but it makes
follow-on changes that involve more sophisticated reasoning about CGU
sizes much easier.
There's no longer any need for them to be separate, and putting them
together reduces the amount of code.
Copy link
Member

@wesleywiser wesleywiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

compiler/rustc_middle/src/mir/mono.rs Show resolved Hide resolved
- Rename `create_size_estimate` as `compute_size_estimate`, because that
  makes more sense for the second and subsequent calls for each CGU.
- Change `CodegenUnit::size_estimate` from `Option<usize>` to `usize`.
  We can still assert that `compute_size_estimate` is called first.
- Move the size estimation for `place_mono_items` inside the function,
  for consistency with `merge_codegen_units`.
@nnethercote nnethercote force-pushed the inline-before-merging-cgus branch from 76e27ce to abde9ba Compare June 21, 2023 23:41
@nnethercote
Copy link
Contributor Author

I addressed the nit.

@bors r=wesleywiser

@bors
Copy link
Contributor

bors commented Jun 21, 2023

📌 Commit abde9ba has been approved by wesleywiser

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 Jun 21, 2023
@bors
Copy link
Contributor

bors commented Jun 22, 2023

⌛ Testing commit abde9ba with merge bb08fa4bf942bd019b0156a317f6d48291b52963...

@rust-log-analyzer
Copy link
Collaborator

The job dist-mips64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling git2-curl v0.18.0
[RUSTC-TIMING] git2_curl test:false 1.298
[RUSTC-TIMING] gix test:false 17.151
[RUSTC-TIMING] git2 test:false 12.551
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0xd29733)[0x7fd96fb2f733]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fd96ea91520]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x1d1a292)[0x7fd970b20292]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x1d38075)[0x7fd970b3e075]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x1d4d749)[0x7fd970b53749]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x1c5b6ca)[0x7fd970a616ca]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x1c678a5)[0x7fd970a6d8a5]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x1c68d3f)[0x7fd970a6ed3f]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x1d5fe72)[0x7fd970b65e72]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x1d62dba)[0x7fd970b68dba]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x1d651f6)[0x7fd970b6b1f6]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x388727f)[0x7fd97268d27f]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x1fa7a94)[0x7fd970dada94]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x2f8b260)[0x7fd971d91260]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x2f8b3d4)[0x7fd971d913d4]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0x2f8bdd4)[0x7fd971d91dd4]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0xfdfd88)[0x7fd96fde5d88]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0xf8b751)[0x7fd96fd91751]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0xf8f5c4)[0x7fd96fd955c4]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0xebdc86)[0x7fd96fcc3c86]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0xf81cf8)[0x7fd96fd87cf8]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-0b6e3bc4164c08e0.so(+0xf48f32)[0x7fd96fd4ef32]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/libstd-6f19547925a6316f.so(rust_metadata_std_a5c7b794c3e8f1ab+0xb3225)[0x7fd96ed2d225]
/lib/x86_64-linux-gnu/libc.so.6(+0x94b43)[0x7fd96eae3b43]
/lib/x86_64-linux-gnu/libc.so.6(+0x126a00)[0x7fd96eb75a00]
[RUSTC-TIMING] cargo test:false 58.179
rustc exited with signal: 11 (SIGSEGV) (core dumped)

Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name cargo --edition=2021 src/cargo/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 --cfg 'feature="all-static"' --cfg 'feature="openssl"' --cfg 'feature="vendored-openssl"' -Zunstable-options --check-cfg 'values(feature, "all-static", "openssl", "pretty-env-logger", "pretty_env_logger", "vendored-libgit2", "vendored-openssl")' --check-cfg 'names()' --check-cfg 'values()' -C metadata=eaf5907be75624d1 -C extra-filename=-eaf5907be75624d1 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps --target mips64-unknown-linux-gnuabi64 -C linker=mips64-unknown-linux-gnu-gcc -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps --extern anyhow=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libanyhow-ca52a3b58ef8e770.rmeta --extern base64=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libbase64-4972e633235082f6.rmeta --extern bytesize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libbytesize-7b0fe47b0abeffcf.rmeta --extern cargo_platform=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libcargo_platform-2758e918a82d52a1.rmeta --extern cargo_util=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libcargo_util-5113280f627a9feb.rmeta --extern clap=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libclap-462530d29a2be036.rmeta --extern crates_io=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libcrates_io-69cdc9e5f6573927.rmeta --extern curl=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libcurl-527e008269d7304a.rmeta --extern curl_sys=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libcurl_sys-4661d3e61bff8001.rmeta --extern env_logger=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libenv_logger-6ae5e7a02895f550.rmeta --extern filetime=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libfiletime-762b9099dc65c74d.rmeta --extern flate2=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libflate2-a9da85322ee08cbb.rmeta --extern git2=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libgit2-2d08d508a1283b35.rmeta --extern git2_curl=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libgit2_curl-fe102e00ad723d5b.rmeta --extern gix=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libgix-cb2f2eecc02357a3.rmeta --extern gix_features_for_configuration_only=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libgix_features-7d487b338a46640d.rmeta --extern glob=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libglob-6fa49347ea036911.rmeta --extern hex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libhex-a323e6791f0cb75b.rmeta --extern hmac=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libhmac-e62a85a67b4a3d00.rmeta --extern home=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libhome-8941a6f6a5c7318c.rmeta --extern http_auth=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libhttp_auth-5e0c781068101e9f.rmeta --extern humantime=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libhumantime-3aa0fad50caad2ab.rmeta --extern ignore=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libignore-8f8056e8b1f1ca28.rmeta --extern im_rc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libim_rc-1433f1d5ee129ad4.rmeta --extern indexmap=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libindexmap-09692627a802a7e2.rmeta --extern itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libitertools-d908bbadcd525655.rmeta --extern jobserver=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libjobserver-4bd5290c8d787e8b.rmeta --extern lazycell=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/liblazycell-96512583cc2512ff.rmeta --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/liblibc-6abe107547b48408.rmeta --extern libgit2_sys=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/liblibgit2_sys-c0875feb5ac17d7d.rmeta --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/liblog-3a684b866f40c67b.rmeta --extern memchr=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libmemchr-4dd8d37b68029955.rmeta --extern opener=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libopener-78d530fc43ce8c9b.rmeta --extern openssl=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libopenssl-d06794ffff6eb97c.rmeta --extern os_info=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libos_info-ccfb19465f64848c.rmeta --extern pasetors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libpasetors-374737a2360eacf4.rmeta --extern pathdiff=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libpathdiff-77ca474fe6ad3f74.rmeta --extern pulldown_cmark=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libpulldown_cmark-e9f6104c7737852b.rmeta --extern rand=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/librand-cc90d78df1885a87.rmeta --extern rustfix=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/librustfix-4e8a52beb3be53f2.rmeta --extern semver=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libsemver-3ffc983edc395607.rmeta --extern serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libserde-8bc8e62346026196.rmeta --extern serde_value=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libserde_value-76e3beb4208b66e4.rmeta --extern serde_ignored=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libserde_ignored-7d62b658d50e6a72.rmeta --extern serde_json=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libserde_json-4b2f68a5f177a83c.rmeta --extern sha1=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libsha1-aef462ab3a120079.rmeta --extern shell_escape=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libshell_escape-028f5ce049ada9ad.rmeta --extern strip_ansi_escapes=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libstrip_ansi_escapes-0bb6bae58ba85b61.rmeta --extern syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libsyn-0fde6f762147fdea.rmeta --extern tar=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libtar-da72b20cf5e9692a.rmeta --extern tempfile=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libtempfile-0c0f86afd76dd8cb.rmeta --extern termcolor=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libtermcolor-9cee8c8a84b42576.rmeta --extern time=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libtime-f279bcab4ca68d75.rmeta --extern toml=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libtoml-d93fcc12151aaf91.rmeta --extern toml_edit=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libtoml_edit-96821f619ce97fb6.rmeta --extern unicode_width=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libunicode_width-da5fe0f99c19b9e9.rmeta --extern unicode_xid=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libunicode_xid-fcd6dac0701ecb1a.rmeta --extern url=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/liburl-1ff74ad2e5a593ff.rmeta --extern walkdir=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/deps/libwalkdir-7f2a71cccf6dbd1e.rmeta --cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(parallel_compiler)' '--check-cfg=values(no_btreemap_remove_entry)' '--check-cfg=values(crossbeam_loom)' '--check-cfg=values(span_locations)' '--check-cfg=values(rustix_use_libc)' '--check-cfg=values(emulate_second_only_system)' '--check-cfg=values(windows_raw_dylib)' -Zdual-proc-macros -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Csplit-debuginfo=off -Z binary-dep-depinfo -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/build/curl-sys-95f2da08240f7b31/out/build -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/build/libnghttp2-sys-370155c484f9f767/out/i/lib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/build/libz-sys-63ec8ffcb4c83643/out/lib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/build/libz-sys-63ec8ffcb4c83643/out/lib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/build/openssl-sys-b57dd46a52a8b6a6/out/openssl-build/install/lib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/build/libgit2-sys-f837fcd7aa9b4939/out/build -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/mips64-unknown-linux-gnuabi64/release/build/libssh2-sys-bd5da5cb4a60741d/out/build` (exit status: 254)

@bors
Copy link
Contributor

bors commented Jun 22, 2023

💔 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 Jun 22, 2023
@nnethercote
Copy link
Contributor Author

Not sure if this is an intermittent crash, or if my changes have triggered something latent. Lets try again

@bors retry

@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 Jun 22, 2023
@bors
Copy link
Contributor

bors commented Jun 22, 2023

⌛ Testing commit abde9ba with merge fa06a37...

@bors
Copy link
Contributor

bors commented Jun 22, 2023

☀️ Test successful - checks-actions
Approved by: wesleywiser
Pushing fa06a37 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 22, 2023
@bors bors merged commit fa06a37 into rust-lang:master Jun 22, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 22, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fa06a37): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.5% [0.2%, 3.6%] 98
Regressions ❌
(secondary)
0.5% [0.3%, 2.7%] 37
Improvements ✅
(primary)
-1.0% [-1.2%, -0.9%] 2
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 2
All ❌✅ (primary) 0.5% [-1.2%, 3.6%] 100

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.4% [0.5%, 5.4%] 7
Regressions ❌
(secondary)
2.5% [1.3%, 3.5%] 5
Improvements ✅
(primary)
-2.7% [-3.5%, -2.1%] 5
Improvements ✅
(secondary)
-2.6% [-2.6%, -2.6%] 1
All ❌✅ (primary) 0.3% [-3.5%, 5.4%] 12

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.0% [1.2%, 3.1%] 5
Regressions ❌
(secondary)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
-1.3% [-1.4%, -1.1%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [-1.4%, 3.1%] 8

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.5% [0.0%, 1.3%] 16
Regressions ❌
(secondary)
1.4% [1.1%, 1.9%] 3
Improvements ✅
(primary)
-0.4% [-1.4%, -0.0%] 31
Improvements ✅
(secondary)
-0.7% [-0.8%, -0.2%] 4
All ❌✅ (primary) -0.1% [-1.4%, 1.3%] 47

Bootstrap: 659.903s -> 661.846s (0.29%)

@nnethercote nnethercote deleted the inline-before-merging-cgus branch June 22, 2023 21:59
@nnethercote
Copy link
Contributor Author

The instructions results here look bad, but this was expected. Walltimes are less bad, though a little worse than the pre-merge CI run, which is annoying. This change is a necessary prerequisite for follow-up work to improve CGU formation: CGU merging is entirely driven by CGU size estimates, but when inlining happens after merging, those estimates are unavoidably inaccurate.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants