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

[wip] Tweak cgu partitioning #71349

Closed

Conversation

wesleywiser
Copy link
Member

r? @ghost

@wesleywiser wesleywiser force-pushed the tweak_cgu_partitioning branch 3 times, most recently from 23a0804 to ded2710 Compare April 20, 2020 13:31
@wesleywiser
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Apr 20, 2020

⌛ Trying commit ded271016b03b48bc73843e36d3c1958c242e24d with merge 0c9e1e2a364ddefe107a4988cacd5900ca232245...

@bors
Copy link
Contributor

bors commented Apr 20, 2020

☀️ Try build successful - checks-azure
Build commit: 0c9e1e2a364ddefe107a4988cacd5900ca232245 (0c9e1e2a364ddefe107a4988cacd5900ca232245)

@rust-timer
Copy link
Collaborator

Queued 0c9e1e2a364ddefe107a4988cacd5900ca232245 with parent 4ca5fd2, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 0c9e1e2a364ddefe107a4988cacd5900ca232245, comparison URL.

@andjo403
Copy link
Contributor

as the server that is running perf do not have that many threads I think that the biggest gains is from getting functions calling the same inline marked functions in the same CGU as described in #65281 (comment).
I still think that this is a good thing to do as it gives better estimates of the functions size. but to be sure to get better perf there needs to be some better algorithm then select the two smallest CGUs and merge them as there sometimes is better to merge CGUs that have many functions in common.
as this can also go the other way and give longer compile time if you are unlucky with the merging

@andjo403
Copy link
Contributor

also this can be part of the solution for #69382

@wesleywiser
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Apr 27, 2020

⌛ Trying commit 9c9726815023031f5fd4e45e9f97a5160e8a8abf with merge 54729123272d6aeceda10eedcdae76fec44d5337...

@bors
Copy link
Contributor

bors commented Apr 27, 2020

☀️ Try build successful - checks-azure
Build commit: 54729123272d6aeceda10eedcdae76fec44d5337 (54729123272d6aeceda10eedcdae76fec44d5337)

@rust-timer
Copy link
Collaborator

Queued 54729123272d6aeceda10eedcdae76fec44d5337 with parent e83f756, future comparison URL.

@andjo403
Copy link
Contributor

Remember that there is also a terminator per basic block that is not part of the statements.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 54729123272d6aeceda10eedcdae76fec44d5337, comparison URL.

@bjorn3
Copy link
Member

bjorn3 commented Apr 27, 2020

There are absolutely no changes in performance.

@crlf0710 crlf0710 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 8, 2020
@Elinvynia Elinvynia 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 20, 2020
@wesleywiser wesleywiser force-pushed the tweak_cgu_partitioning branch from 9c97268 to 5c4c00a Compare May 20, 2020 12:51
@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
##[section]Starting: Linux mingw-check
##[section]Starting: Initialize job
Agent name: 'Azure Pipelines 4'
Agent machine name: 'fv-az578'
Current agent version: '2.168.2'
##[group]Operating System
16.04.6
LTS
LTS
##[endgroup]
##[group]Virtual Environment
Environment: ubuntu-16.04
Version: 20200512.2
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu16/20200512.2/images/linux/Ubuntu1604-README.md
##[endgroup]
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Download all required tasks.
Downloading task: Bash (3.163.2)
Checking job knob settings.
   Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY} 
   Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG} 
Start tracking orphan processes.
##[section]Finishing: Initialize job
##[section]Starting: Configure Job Name
==============================================================================
---
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/0309cbd5-6fd9-42b3-b7b7-882aa2d67dc9.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/71349/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71349/merge:refs/remotes/pull/71349/merge
---
 ---> 3adb0605cc65
Step 6/7 : ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
 ---> Using cache
 ---> 28dbc326cb7f
Step 7/7 : ENV SCRIPT python3 ../x.py test src/tools/expand-yaml-anchors &&            python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu &&            python3 ../x.py build --stage 0 src/tools/build-manifest &&            python3 ../x.py test --stage 0 src/tools/compiletest &&            python3 ../x.py test src/tools/tidy &&            python3 ../x.py doc --stage 0 src/libstd &&            /scripts/validate-toolstate.sh
 ---> 537a01811900
Successfully built 537a01811900
Successfully tagged rust-ci:latest
Built container sha256:537a018119009dc218456238dec90b5530050db1e2a1e166550c218003f6159d
---
    Checking rustc_feature v0.0.0 (/checkout/src/librustc_feature)
    Checking fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
    Checking rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
    Checking rustc_hir v0.0.0 (/checkout/src/librustc_hir)
    Checking rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
    Checking chalk-rust-ir v0.10.0
    Checking rustc_parse v0.0.0 (/checkout/src/librustc_parse)
    Checking rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
    Checking rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
configure: dist.missing-tools   := True
configure: llvm.ccache          := sccache
configure: build.cargo-native-static := True
configure: rust.dist-src        := False
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 
---
Hugepagesize:       2048 kB
DirectMap4k:      139200 kB
DirectMap2M:     5103616 kB
DirectMap1G:     4194304 kB
+ python3 ../x.py test src/tools/expand-yaml-anchors
Ensuring the YAML anchors in the GitHub Actions config were expanded
Ensuring the YAML anchors in the GitHub Actions config were expanded
Building stage0 tool expand-yaml-anchors (x86_64-unknown-linux-gnu)
   Compiling unicode-xid v0.2.0
   Compiling syn v1.0.11
   Compiling linked-hash-map v0.5.2
   Compiling lazy_static v1.4.0
   Compiling lazy_static v1.4.0
   Compiling yaml-rust v0.4.3
   Compiling quote v1.0.2
   Compiling thiserror-impl v1.0.5
   Compiling thiserror v1.0.5
   Compiling yaml-merge-keys v0.4.0
   Compiling expand-yaml-anchors v0.1.0 (/checkout/src/tools/expand-yaml-anchors)
Build completed successfully in 0:00:27
+ python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu
    Finished dev [unoptimized] target(s) in 0.20s
Checking rustdoc artifacts (x86_64-unknown-linux-gnu -> i686-pc-windows-gnu)
---
    Checking rustc_feature v0.0.0 (/checkout/src/librustc_feature)
    Checking fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
    Checking rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
    Checking rustc_hir v0.0.0 (/checkout/src/librustc_hir)
    Checking rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
    Checking chalk-rust-ir v0.10.0
    Checking rustc_parse v0.0.0 (/checkout/src/librustc_parse)
    Checking rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
    Checking rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
skip untracked path cpu-usage.csv during rustfmt invocations
skip untracked path src/doc/book/ during rustfmt invocations
skip untracked path src/doc/rust-by-example/ during rustfmt invocations
skip untracked path src/llvm-project/ during rustfmt invocations
Diff in /checkout/src/librustc_mir/monomorphize/partitioning.rs at line 155:
     // local functions the definition of which is marked with `#[inline]`.
     let mut post_inlining = {
         let _prof_timer = tcx.prof.generic_activity("cgu_partitioning_place_inline_items");
-        let is_debug_incremental = tcx.sess.opts.optimize == OptLevel::No && tcx.sess.opts.incremental.is_some();
+        let is_debug_incremental =
+            tcx.sess.opts.optimize == OptLevel::No && tcx.sess.opts.incremental.is_some();
         place_inlined_mono_items(initial_partitioning, inlining_map, is_debug_incremental)
 
Diff in /checkout/src/librustc_mir/monomorphize/partitioning.rs at line 228:
             InstantiationMode::LocalCopy => continue,
         }
         }
 
-        let characteristic_def_id = characteristic_def_id_of_mono_item(tcx, mono_item, is_debug_incremental);
+        let characteristic_def_id =
+            characteristic_def_id_of_mono_item(tcx, mono_item, is_debug_incremental);
         let is_volatile = is_incremental_build && mono_item.is_generic_fn();
 
         let codegen_unit_name = match (characteristic_def_id, mono_item.is_local()) {
Diff in /checkout/src/librustc_mir/monomorphize/partitioning.rs at line 235:
             (Some(def_id), false) if is_debug_incremental => {
                 let crate_name = tcx.crate_name(def_id.krate);
-                cgu_name_builder.build_cgu_name(LOCAL_CRATE, &[&*crate_name.as_str(), if mono_item.has_closure_generic_argument() { "has_closure" } else { "" }], Some("cgu"))
-            },
+                cgu_name_builder.build_cgu_name(
+                    &[
+                    &[
+                        &*crate_name.as_str(),
+                        if mono_item.has_closure_generic_argument() { "has_closure" } else { "" },
+                    ],
+                    Some("cgu"),
+            }
             (Some(def_id), _) => compute_codegen_unit_name(
                 tcx,
                 tcx,
                 cgu_name_builder,
Diff in /checkout/src/librustc_mir/monomorphize/partitioning.rs at line 468:
     assert!(target_cgu_count >= 1);
     let codegen_units = &mut initial_partitioning.codegen_units;
 
-    if tcx.is_compiler_builtins(LOCAL_CRATE) || (tcx.dep_graph.is_fully_enabled() && tcx.sess.opts.optimize == OptLevel::No) {
+    if tcx.is_compiler_builtins(LOCAL_CRATE)
+        || (tcx.dep_graph.is_fully_enabled() && tcx.sess.opts.optimize == OptLevel::No)
+    {
         // Compiler builtins require some degree of control over how mono items
         // are partitioned into compilation units. Provide it by keeping the
         // original partitioning when compiling the compiler builtins crate.
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt" "--config-path" "/checkout" "--edition" "2018" "--unstable-features" "--skip-children" "--check" "/checkout/src/librustc_mir/monomorphize/partitioning.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
Build completed unsuccessfully in 0:00:36
== clock drift check ==
  local time: Wed May 20 13:32:30 UTC 2020
  network time: Wed, 20 May 2020 13:32:30 GMT
  network time: Wed, 20 May 2020 13:32:30 GMT
== end clock drift check ==

##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/71349/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/71349/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (3591) (python)
##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-8 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
##[section]Starting: Linux x86_64-gnu-llvm-8
##[section]Starting: Initialize job
Agent name: 'Azure Pipelines 6'
Agent machine name: 'fv-az578'
Current agent version: '2.168.2'
##[group]Operating System
16.04.6
LTS
LTS
##[endgroup]
##[group]Virtual Environment
Environment: ubuntu-16.04
Version: 20200512.2
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu16/20200512.2/images/linux/Ubuntu1604-README.md
##[endgroup]
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Download all required tasks.
Downloading task: Bash (3.163.2)
Checking job knob settings.
   Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY} 
   Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG} 
Start tracking orphan processes.
##[section]Finishing: Initialize job
##[section]Starting: Configure Job Name
==============================================================================
---
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/0336a291-567d-4115-8da0-88d7aa56f0ed.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/71349/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71349/merge:refs/remotes/pull/71349/merge
---
 ---> cb2676f08729
Step 5/8 : ENV RUST_CONFIGURE_ARGS       --build=x86_64-unknown-linux-gnu       --llvm-root=/usr/lib/llvm-8       --enable-llvm-link-shared       --set rust.thin-lto-import-instr-limit=10
 ---> Using cache
 ---> df25ce111862
Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy &&            python2.7 ../x.py test src/test/mir-opt --pass=build                                   --target=armv5te-unknown-linux-gnueabi &&            python2.7 ../x.py test src/tools/tidy
 ---> 599b9ac96b27
Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
 ---> Using cache
 ---> 091087e35a36
---
   Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
   Compiling chalk-rust-ir v0.10.0
   Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
   Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
   Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
   Compiling chalk-solve v0.10.0
   Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
   Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
   Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
   Compiling chalk-rust-ir v0.10.0
   Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
   Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
   Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
   Compiling chalk-solve v0.10.0
   Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
   Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
..........................................................................i......................... 1800/10201
.................................................................................................... 1900/10201
.............................................................................................i..i... 2000/10201
.................................................................................................... 2100/10201
...................................................................................iiiii............ 2200/10201
.................................................................................................... 2400/10201
.................................................................................................... 2500/10201
.................................................................................................... 2600/10201
.................................................................................................... 2700/10201
---
...............i.................................................................................... 5200/10201
.................................................................................................... 5300/10201
..............................................i..................................................... 5400/10201
.......................................i............................................................ 5500/10201
................................................ii.ii........i...i.................................. 5600/10201
..................................................................................................i. 5800/10201
.................................................................................................... 5900/10201
..................................................ii.....................................i.......... 6000/10201
.................................................................................................... 6100/10201
.................................................................................................... 6100/10201
.................................................................................................... 6200/10201
.................................................................................................... 6300/10201
...........ii...i..ii...........i................................................................... 6400/10201
.................................................................................................... 6600/10201
.................................................................................................... 6700/10201
.................................................................................................... 6700/10201
............................................i..ii................................................... 6800/10201
.................................................................................................... 7000/10201
..................................................................................................i. 7100/10201
.................................................................................................... 7200/10201
.................................................................................................... 7300/10201
---
.................................................................................................... 8100/10201
.................................................................................................... 8200/10201
.................................................................................................... 8300/10201
.....................i.............................................................................. 8400/10201
...........................................................................iiiiii.iiiiii.i.......... 8500/10201
..............................i..................................................................... 8700/10201
.................................................................................................... 8800/10201
.................................................................................................... 8900/10201
.................................................................................................... 9000/10201
---
Suite("src/test/codegen") not skipped for "bootstrap::test::Codegen" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 190 tests
iiii......i..............ii.i..........i...............................i..i..................i....i. 100/190
...........i.i.i...iii..iiiiiiiiiiiiiiii.......................i.ii...............ii......

 finished in 5.926
Suite("src/test/codegen-units") not skipped for "bootstrap::test::CodegenUnits" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
---- [codegen-units] codegen-units/partitioning/extern-drop-glue.rs stdout ----

The following items were assigned to wrong codegen units:

fn core::ptr[0]::drop_in_place[0]<cgu_extern_drop_glue::Struct[0]>
  expected: extern_drop_glue-fallback.cgu[External] 
  actual:   extern_drop_glue-core-.cgu[External] 

fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::LocalStruct[0]>
  expected: extern_drop_glue-fallback.cgu[External] 
  actual:   extern_drop_glue-core-.cgu[External] 

fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::mod1[0]::LocalStruct[0]>
  expected: extern_drop_glue-fallback.cgu[External] 
  actual:   extern_drop_glue-core-.cgu[External] 
thread '[codegen-units] codegen-units/partitioning/extern-drop-glue.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2489:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- [codegen-units] codegen-units/partitioning/local-drop-glue.rs stdout ----
---- [codegen-units] codegen-units/partitioning/local-drop-glue.rs stdout ----

The following items were assigned to wrong codegen units:

fn core::ptr[0]::drop_in_place[0]<(u32, local_drop_glue::Struct[0])>
  expected: local_drop_glue-fallback.cgu[Internal] 
  actual:   local_drop_glue-core-.cgu[Internal] 

fn core::ptr[0]::drop_in_place[0]<local_drop_glue::Outer[0]>
  expected: local_drop_glue-fallback.cgu[External] 
  actual:   local_drop_glue-core-.cgu[External] 

fn core::ptr[0]::drop_in_place[0]<local_drop_glue::Struct[0]>
  expected: local_drop_glue-fallback.cgu[External] 
  actual:   local_drop_glue-core-.cgu[External] 

fn core::ptr[0]::drop_in_place[0]<local_drop_glue::mod1[0]::Struct2[0]>
  expected: local_drop_glue-fallback.cgu[External] 
  actual:   local_drop_glue-core-.cgu[External] 

fn local_drop_glue::{{impl}}[0]::drop[0]
  expected: local_drop_glue-fallback.cgu[External] 
  actual:   local_drop_glue[External] 
thread '[codegen-units] codegen-units/partitioning/local-drop-glue.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2489:13

---- [codegen-units] codegen-units/partitioning/shared-generics.rs stdout ----


The following items were assigned to wrong codegen units:

fn shared_generics_aux::generic_fn[0]<u16>
  expected: shared_generics_aux-in-shared_generics.volatile[External] 
  actual:   shared_generics-shared_generics_aux-.cgu[External] 
thread '[codegen-units] codegen-units/partitioning/shared-generics.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2489:13


failures:
---
test result: FAILED. 35 passed; 3 failed; 3 ignored; 0 measured; 0 filtered out



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/codegen-units" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-units" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "codegen-units" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-8/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "8.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"


thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
Build completed unsuccessfully in 1:01:46
== clock drift check ==
  local time: Wed May 20 22:51:36 UTC 2020
  network time: Wed, 20 May 2020 22:51:36 GMT
== end clock drift check ==

##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/71349/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/71349/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (3701) (python)
##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@wesleywiser
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented May 20, 2020

⌛ Trying commit 7b86e2a with merge 35fdb7107589ab8f0cce89e7a5790f12c40ca662...

@bors
Copy link
Contributor

bors commented May 21, 2020

☀️ Try build successful - checks-azure
Build commit: 35fdb7107589ab8f0cce89e7a5790f12c40ca662 (35fdb7107589ab8f0cce89e7a5790f12c40ca662)

@rust-timer
Copy link
Collaborator

Queued 35fdb7107589ab8f0cce89e7a5790f12c40ca662 with parent 0aa6751, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 35fdb7107589ab8f0cce89e7a5790f12c40ca662, comparison URL.

| StatementKind::Nop => false,
_ => true,
})
.count()
Copy link
Contributor

Choose a reason for hiding this comment

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

shall there maybe be something like

let term = blk.terminator();
let mut is_drop = false;
match term.kind {
TerminatorKind::Drop { ref location, target, unwind }
| TerminatorKind::DropAndReplace { ref location, target, unwind, .. } => {
is_drop = true;
work_list.push(target);
// If the location doesn't actually need dropping, treat it like
// a regular goto.
let ty = location.ty(callee_body, tcx).subst(tcx, callsite.substs).ty;
if ty.needs_drop(tcx, param_env) {
cost += CALL_PENALTY;
if let Some(unwind) = unwind {
cost += LANDINGPAD_PENALTY;
work_list.push(unwind);
}
} else {
cost += INSTR_COST;
}
}
TerminatorKind::Unreachable | TerminatorKind::Call { destination: None, .. }
if first_block =>
{
// If the function always diverges, don't inline
// unless the cost is zero
threshold = 0;
}
TerminatorKind::Call { func: Operand::Constant(ref f), cleanup, .. } => {
if let ty::FnDef(def_id, _) = f.literal.ty.kind {
// Don't give intrinsics the extra penalty for calls
let f = tcx.fn_sig(def_id);
if f.abi() == Abi::RustIntrinsic || f.abi() == Abi::PlatformIntrinsic {
cost += INSTR_COST;
} else {
cost += CALL_PENALTY;
}
} else {
cost += CALL_PENALTY;
}
if cleanup.is_some() {
cost += LANDINGPAD_PENALTY;
}
}
TerminatorKind::Assert { cleanup, .. } => {
cost += CALL_PENALTY;
if cleanup.is_some() {
cost += LANDINGPAD_PENALTY;
}
}
TerminatorKind::Resume => cost += RESUME_PENALTY,
_ => cost += INSTR_COST,
}

or at least a +1 so the terminator is counted in some way

Copy link
Contributor

Choose a reason for hiding this comment

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

can maybe be simplified to only add extra for landingpads(10 llvm ir instructions) and resume (9 llvm ir instructions)

@crlf0710 crlf0710 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 30, 2020
@JohnCSimon JohnCSimon 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 6, 2020
@Elinvynia Elinvynia 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants