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

Rollup of 7 pull requests #51406

Closed
wants to merge 20 commits into from

Conversation

Mark-Simulacrum
Copy link
Member

Successful merges:

Failed merges:

Dylan-DPC and others added 20 commits June 2, 2018 17:27
fdio_spawn_etc is the preferred way of creating processes on Fuchsia
now.
This patch adds depth markings to all entries in the `ScopeTree`'s
`parent_map`. This change increases memory usage somewhat, but permits a
much faster algorithm to be used:

- If one scope has a greater depth than the other, the deeper scope is
  moved upward until they are at equal depths.

- Then we move the two scopes upward in lockstep until they match.

This avoids the need to keep track of which scopes have already been
seen, which was the major part of the cost of the old algorithm. It also
reduces the number of child-to-parent moves (which are hash table
lookups) when the scopes start at different levels, because it never
goes past the nearest common ancestor the way the old algorithm did.

Finally, the case where one of the scopes is the root is now handled in
advance, because that is moderately common and lets us skip everything.

This change speeds up runs of several rust-perf benchmarks, the best by
6%.
…are now exactly the same as that produced by AST borrowck. Bravo!
…derr-files, r=oli-obk

Remove two redundant .nll.stderr files

It turns out that the diagnostics generated from NLL for these cases are now exactly the same as that produced by AST borrowck, and thus we can just fallback on those `.stderr` files that already exist for AST-borrowck.

Bravo!

(it is a good idea to remove these files, because it slightly reduces the amount of time humans will spend reviewing the .nll.stderr fileset...)

((it *might* be worthwhile trying to change the `compiletest` code to even issue a warning when two such files have equivalent contents... but I am not going so far as to try to implement that right now...))
…t, r=nikomatsakis

Stabilize unit tests with non-`()` return type

References rust-lang#48854
[fuchsia] Migrate from launchpad to fdio_spawn_etc

fdio_spawn_etc is the preferred way of creating processes on Fuchsia
now.

cc @abarth
…s, r=eddyb

Fix the use of closures within #[panic_implementation]

Fixes rust-lang#51365.
…b, r=QuietMisdreavus

rustdoc: Fix missing stability and src links for inlined external macros

Fixes rust-lang#38951

r? @QuietMisdreavus
Use scope tree depths to speed up `nearest_common_ancestor`.

This patch adds depth markings to all entries in the `ScopeTree`'s
`parent_map`. This change increases memory usage somewhat, but permits a
much faster algorithm to be used:

- If one scope has a greater depth than the other, the deeper scope is
  moved upward until they are at equal depths.

- Then we move the two scopes upward in lockstep until they match.

This avoids the need to keep track of which scopes have already been
seen, which was the major part of the cost of the old algorithm. It also
reduces the number of child-to-parent moves (which are hash table
lookups) when the scopes start at different levels, because it never
goes past the nearest common ancestor the way the old algorithm did.

Finally, the case where one of the scopes is the root is now handled in
advance, because that is moderately common and lets us skip everything.

This change speeds up runs of several rust-perf benchmarks, the best by
6%.

A selection of the bigger improvements:
```
clap-rs-check
        avg: -2.6%      min: -6.6%      max: 0.0%
syn-check
        avg: -2.2%      min: -5.0%      max: 0.0%
style-servo-check
        avg: -2.9%?     min: -4.8%?     max: 0.0%?
cargo-check
        avg: -1.3%      min: -2.8%      max: 0.0%
sentry-cli-check
        avg: -1.0%      min: -2.1%      max: 0.0%
webrender-check
        avg: -0.9%      min: -2.0%      max: 0.0%
style-servo
        avg: -0.9%?     min: -1.8%?     max: -0.0%?
ripgrep-check
        avg: -0.7%      min: -1.8%      max: 0.1%
clap-rs
        avg: -0.9%      min: -1.6%      max: -0.2%
regex-check
        avg: -0.2%      min: -1.3%      max: 0.1%
syn
        avg: -0.6%      min: -1.3%      max: 0.1%
hyper-check
        avg: -0.5%      min: -1.1%      max: 0.0%
```
The idea came from multiple commenters on my blog and on Reddit. Thank you!

r? @nikomatsakis
NLL performance boost

This makes compilation of the [inflate](https://github.com/rust-lang-nursery/rustc-perf/tree/master/collector/benchmarks/inflate) benchmark compile 2 times faster on my computer when NLL is enabled.
This does not fix rust-lang#51377 perfectly, it's still 4-5 times slower than without NLL, but it's a start.
@rust-highfive
Copy link
Collaborator

r? @cramertj

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 7, 2018
@Mark-Simulacrum
Copy link
Member Author

r? @Mark-Simulacrum
@bors r+ p=10

@bors
Copy link
Contributor

bors commented Jun 7, 2018

📌 Commit 9d78241 has been approved by Mark-Simulacrum

@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 7, 2018
@bors
Copy link
Contributor

bors commented Jun 7, 2018

⌛ Testing commit 9d78241 with merge 388f88782785bd7637d0061c97da00a77b472135...

@bors
Copy link
Contributor

bors commented Jun 7, 2018

💔 Test failed - status-travis

@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 7, 2018
@rust-highfive
Copy link
Collaborator

The job dist-various-2 of your PR failed on Travis (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.
[00:45:30] [RUSTC-TIMING] alloc_jemalloc test:false 0.092
[00:45:33] [RUSTC-TIMING] alloc test:false 5.116
[00:45:33]    Compiling panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
[00:45:34] [RUSTC-TIMING] panic_unwind test:false 0.242
[00:45:35] error[E0425]: cannot find value `FDIO_SPAWN_SHARE_JOB` in this scope
[00:45:35]   --> libstd/sys/unix/process/process_fuchsia.rs:97:13
[00:45:35]    |
[00:45:35] 97 |             FDIO_SPAWN_SHARE_JOB | FDIO_SPAWN_CLONE_LDSVC | FDIO_SPAWN_CLONE_NAMESPACE,
[00:45:35]    |             ^^^^^^^^^^^^^^^^^^^^ did you mean `FDIO_SPAWN_CLONE_JOB`?
[00:45:38] error: aborting due to previous error
[00:45:38] 
[00:45:38] For more information about this error, try `rustc --explain E0425`.
[00:45:38] [RUSTC-TIMING] std test:false 4.179
[00:45:38] [RUSTC-TIMING] std test:false 4.179
[00:45:38] error: Could not compile `std`.
[00:45:38] 
[00:45:38] Caused by:
[00:45:38]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name std libstd/lib.rs --color always --error-format json --crate-type dylib --crate-type rlib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 --cfg feature="alloc_jemalloc" --cfg feature="backtrace" --cfg feature="jemalloc" --cfg feature="panic-unwind" --cfg feature="panic_unwind" -C metadata=17dd438e5d184cbf -C extra-filename=-17dd438e5d184cbf --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps --target x86_64-unknown-fuchsia -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/deps --extern unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libunwind-1aa1c22034f50983.rlib --extern panic_abort=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libpanic_abort-188ece4b27241321.rlib --extern std_unicode=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libstd_unicode-39f4ce861fcffd4b.rlib --extern alloc_system=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/liballoc_system-f14987dbf40b5a04.rlib --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/liblibc-62ac5dd3ecae39a9.rlib --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libcompiler_builtins-658dfdd7590d59a4.rlib --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libcore-add11f9db7b34fd0.rlib --extern alloc_jemalloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/liballoc_jemalloc-a4122c6c45d0cdc6.rlib --extern panic_unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libpanic_unwind-01fe06fcbc0bcf6c.rlib --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/liballoc-0e7fccf2d675931b.rlib -l backtrace -l zircon -l fdio -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/build/compiler_builtins-838ed0d7521287fa/out` (exit code: 101)
[00:45:38] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-fuchsia" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:45:38] expected success, got: exit code: 101
[00:45:38] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:45:38] travis_fold:end:stage2-std

[00:45:38] travis_time:end:stage2-std:start=1528339597057569295,finish=1528339655027496323,duration=57969927028

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 @TimNN. (Feature Requests)

1 similar comment
@rust-highfive
Copy link
Collaborator

The job dist-various-2 of your PR failed on Travis (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.
[00:45:30] [RUSTC-TIMING] alloc_jemalloc test:false 0.092
[00:45:33] [RUSTC-TIMING] alloc test:false 5.116
[00:45:33]    Compiling panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
[00:45:34] [RUSTC-TIMING] panic_unwind test:false 0.242
[00:45:35] error[E0425]: cannot find value `FDIO_SPAWN_SHARE_JOB` in this scope
[00:45:35]   --> libstd/sys/unix/process/process_fuchsia.rs:97:13
[00:45:35]    |
[00:45:35] 97 |             FDIO_SPAWN_SHARE_JOB | FDIO_SPAWN_CLONE_LDSVC | FDIO_SPAWN_CLONE_NAMESPACE,
[00:45:35]    |             ^^^^^^^^^^^^^^^^^^^^ did you mean `FDIO_SPAWN_CLONE_JOB`?
[00:45:38] error: aborting due to previous error
[00:45:38] 
[00:45:38] For more information about this error, try `rustc --explain E0425`.
[00:45:38] [RUSTC-TIMING] std test:false 4.179
[00:45:38] [RUSTC-TIMING] std test:false 4.179
[00:45:38] error: Could not compile `std`.
[00:45:38] 
[00:45:38] Caused by:
[00:45:38]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name std libstd/lib.rs --color always --error-format json --crate-type dylib --crate-type rlib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 --cfg feature="alloc_jemalloc" --cfg feature="backtrace" --cfg feature="jemalloc" --cfg feature="panic-unwind" --cfg feature="panic_unwind" -C metadata=17dd438e5d184cbf -C extra-filename=-17dd438e5d184cbf --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps --target x86_64-unknown-fuchsia -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/deps --extern unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libunwind-1aa1c22034f50983.rlib --extern panic_abort=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libpanic_abort-188ece4b27241321.rlib --extern std_unicode=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libstd_unicode-39f4ce861fcffd4b.rlib --extern alloc_system=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/liballoc_system-f14987dbf40b5a04.rlib --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/liblibc-62ac5dd3ecae39a9.rlib --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libcompiler_builtins-658dfdd7590d59a4.rlib --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libcore-add11f9db7b34fd0.rlib --extern alloc_jemalloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/liballoc_jemalloc-a4122c6c45d0cdc6.rlib --extern panic_unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libpanic_unwind-01fe06fcbc0bcf6c.rlib --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/liballoc-0e7fccf2d675931b.rlib -l backtrace -l zircon -l fdio -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/build/compiler_builtins-838ed0d7521287fa/out` (exit code: 101)
[00:45:38] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-fuchsia" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:45:38] expected success, got: exit code: 101
[00:45:38] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:45:38] travis_fold:end:stage2-std

[00:45:38] travis_time:end:stage2-std:start=1528339597057569295,finish=1528339655027496323,duration=57969927028

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 @TimNN. (Feature Requests)

@kennytm
Copy link
Member

kennytm commented Jun 7, 2018

#51359 has been modified.

@kennytm kennytm closed this Jun 7, 2018
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.