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

Combine input and eval_always query types #59091

Merged
merged 2 commits into from
Mar 29, 2019
Merged

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Mar 11, 2019

Hardcoding Krate as a dependency of eval_always queries doesn't really make sense if we want to use the query system before HIR lowering / hashing. Without that hardcoding they become pretty much identical to input queries, so I combined them to a single type. This will regress the clean incremental scenario, but that isn't terribly common.

r? @michaelwoerister

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 11, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:04b93c88:start=1552292506574220836,finish=1552292580570039258,duration=73995818422
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml
---
[01:09:27] ....................................i............................................................... 600/5445
[01:09:31] .................................................................................................... 700/5445
[01:09:36] .................................................................................................... 800/5445
[01:09:40] .............................................................................................i...... 900/5445
[01:09:45] .........i.............F............................................................................ 1000/5445
[01:09:48] ......................iiiii......................................................................... 1100/5445
[01:09:54] .................................................................................................... 1300/5445
[01:09:57] .................................................................................................... 1400/5445
[01:10:00] .................................................................................................... 1500/5445
[01:10:02] .................................................................................................... 1600/5445
---
[01:12:27] 
[01:12:27] ---- [ui] ui/dep-graph/dep-graph-variance-alias.rs stdout ----
[01:12:27] diff of stderr:
[01:12:27] 
[01:12:27] - error: OK
[01:12:27] + error: no path from `TypeAlias` to `ItemVariances`
[01:12:27] 3    |
[01:12:27] 3    |
[01:12:27] 4 LL | #[rustc_then_this_would_need(ItemVariances)] //~ ERROR OK
[01:12:27] 
[01:12:27] The actual stderr differed from the expected stderr.
[01:12:27] The actual stderr differed from the expected stderr.
[01:12:27] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/dep-graph/dep-graph-variance-alias/dep-graph-variance-alias.stderr
[01:12:27] To update references, rerun the tests and pass the `--bless` flag
[01:12:27] To only update this specific test, also pass `--test-args dep-graph/dep-graph-variance-alias.rs`
[01:12:27] error: 1 errors occurred comparing output.
[01:12:27] status: exit code: 1
[01:12:27] status: exit code: 1
[01:12:27] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/dep-graph/dep-graph-variance-alias.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/dep-graph/dep-graph-variance-alias/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "query-dep-graph" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/dep-graph/dep-graph-variance-alias/auxiliary" "-A" "unused"
[01:12:27] ------------------------------------------
[01:12:27] 
[01:12:27] ------------------------------------------
[01:12:27] stderr:
[01:12:27] stderr:
[01:12:27] ------------------------------------------
[01:12:27] {"message":"no path from `TypeAlias` to `ItemVariances`","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/dep-graph/dep-graph-variance-alias.rs","byte_start":315,"byte_end":359,"line_start":19,"line_end":19,"column_start":1,"column_end":45,"is_primary":true,"text":[{"text":"#[rustc_then_this_would_need(ItemVariances)] //~ ERROR OK","highlight_start":1,"highlight_end":45}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: no path from `TypeAlias` to `ItemVariances`\n  --> /checkout/src/test/ui/dep-graph/dep-graph-variance-alias.rs:19:1\n   |\nLL | #[rustc_then_this_would_need(ItemVariances)] //~ ERROR OK\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[01:12:27] 
[01:12:27] ------------------------------------------
[01:12:27] 
[01:12:27] thread '[ui] ui/dep-graph/dep-graph-variance-alias.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3295:9
---
[01:12:27] 
[01:12:27] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:496:22
[01:12:27] 
[01:12:27] 
[01:12:27] 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/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -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" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:12:27] 
[01:12:27] 
[01:12:27] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:12:27] Build completed unsuccessfully in 0:04:18
[01:12:27] Build completed unsuccessfully in 0:04:18
[01:12:27] Makefile:48: recipe for target 'check' failed
[01:12:27] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:00a43118
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Mar 11 09:35:37 UTC 2019
---
travis_time:end:25fe278a:start=1552296938874870317,finish=1552296938879674241,duration=4803924
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:13197904
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1382efd4
travis_time:start:1382efd4
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:1bbaea80
$ dmesg | grep -i kill

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)

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 12, 2019

@bors try

@bors
Copy link
Contributor

bors commented Mar 12, 2019

⌛ Trying commit fcedb610a838198094138faf12791c65a8e72a90 with merge 9a5ed20247c2dec758878205c5208cf1916f93c7...

@michaelwoerister
Copy link
Member

As a possible alternative I also want to test the impact of replacing eval_always queries with just regular ones. Maybe the overhead of that is not big in practice.

@bors
Copy link
Contributor

bors commented Mar 12, 2019

☀️ Try build successful - checks-travis
Build commit: 9a5ed20247c2dec758878205c5208cf1916f93c7

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 12, 2019

@rust-timer build 9a5ed20247c2dec758878205c5208cf1916f93c7

@rust-timer
Copy link
Collaborator

Success: Queued 9a5ed20247c2dec758878205c5208cf1916f93c7 with parent 7486b9c, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 9a5ed20247c2dec758878205c5208cf1916f93c7

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 16, 2019

@rust-lang/compiler Any objections to this approach? We can turn these eval_always queries into regular queries later if that turns out to be beneficial for performance.

@oli-obk oli-obk added I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 19, 2019
@pnkfelix
Copy link
Member

discussed at T-compiler meeting. @nikomatsakis may take a closer look , but the immediate reaction was "this sounds okay; it just needs a normal review process"

@michaelwoerister
Copy link
Member

I'll try to take a closer look at this this week.

@michaelwoerister
Copy link
Member

OK, so this looks good to me. The clean rebuild case is rather unrealistic (it models a rebuild after no source code and no dependencies have changed, something that is usually covered by cargo already).

I'm a bit sad that the term input is removed here but eval_always is the more general term.

@bors r+

@bors
Copy link
Contributor

bors commented Mar 26, 2019

📌 Commit 3f9c1cb1f33dca173c4ace458165dd0592182574 has been approved by michaelwoerister

@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 Mar 26, 2019
@michaelwoerister
Copy link
Member

Heads up, @rust-lang/wg-compiler-performance, this is expected to regress all clean incremental benchmarks. I think that's OK because these benchmarks are (as @Zoxc already said) not realistic.

@bors
Copy link
Contributor

bors commented Mar 26, 2019

☔ The latest upstream changes (presumably #59433) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 26, 2019
@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 27, 2019

@bors r=michaelwoerister

@bors
Copy link
Contributor

bors commented Mar 27, 2019

📌 Commit 629e3a3 has been approved by michaelwoerister

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 27, 2019
Centril added a commit to Centril/rust that referenced this pull request Mar 28, 2019
Combine input and eval_always query types

Hardcoding `Krate` as a dependency of `eval_always` queries doesn't really make sense if we want to use the query system before HIR lowering / hashing. Without that hardcoding they become pretty much identical to `input` queries, so I combined them to a single type. This will regress the `clean` incremental scenario, but that isn't terribly common.

r? @michaelwoerister
bors added a commit that referenced this pull request Mar 28, 2019
Rollup of 10 pull requests

Successful merges:

 - #58717 (Add FromStr impl for NonZero types)
 - #59091 (Combine input and eval_always query types)
 - #59216 (Type dependent defs wrappers)
 - #59318 (rustc: Update linker flavor inference from filename)
 - #59320 (rustc: Allow using `clang` for wasm32 targets)
 - #59363 (#59361 Moved rustc edition opt to short list)
 - #59371 (ffi: rename VaList::copy to VaList::with_copy)
 - #59398 (Add a way to track Rustfix UI test coverage)
 - #59408 (compiletest: make path normalization smarter)
 - #59429 (When moving out of a for loop head, suggest borrowing it in nll mode)

Failed merges:

r? @ghost
@bors bors merged commit 629e3a3 into rust-lang:master Mar 29, 2019
@Zoxc Zoxc deleted the eval_always branch March 29, 2019 01:19
@nnethercote
Copy link
Contributor

For the record, here are the perf results from the landing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

8 participants