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 query code for performance #56509

Closed
wants to merge 30 commits into from
Closed

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Dec 4, 2018

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 4, 2018
@Zoxc Zoxc force-pushed the query-perf branch 2 times, most recently from 37f7864 to 4d35ddf Compare December 4, 2018 15:43
@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 4, 2018

@bors try

@bors
Copy link
Contributor

bors commented Dec 4, 2018

⌛ Trying commit 4d35ddf with merge da5ac1d...

bors added a commit that referenced this pull request Dec 4, 2018
[WIP] Tweak query code for performance

r? @michaelwoerister
@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 4, 2018

@bors try

@bors
Copy link
Contributor

bors commented Dec 4, 2018

⌛ Trying commit 3b29d34f54ec958c69e0a24ff780154520217ad3 with merge 43d2894e0f981b4365a12b95cdb3b44716d2fa0b...

@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 4, 2018

@rust-timer build 43d2894e0f981b4365a12b95cdb3b44716d2fa0b

@rust-timer
Copy link
Collaborator

Success: Queued 43d2894e0f981b4365a12b95cdb3b44716d2fa0b with parent 431e0ab, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 43d2894e0f981b4365a12b95cdb3b44716d2fa0b

@rust-highfive

This comment has been minimized.

@Zoxc Zoxc force-pushed the query-perf branch 2 times, most recently from f762447 to 475cafe Compare December 5, 2018 03:48
@rust-highfive

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Dec 6, 2018

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

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 7, 2018

@bors try

@bors
Copy link
Contributor

bors commented Dec 7, 2018

⌛ Trying commit 9107948 with merge fb2bcaf...

bors added a commit that referenced this pull request Dec 7, 2018
[WIP] Tweak query code for performance

r? @michaelwoerister
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.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:1a3f10b0:start=1544161593915828770,finish=1544161664792372575,duration=70876543805
$ 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
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
[00:29:15]    Compiling arena v0.0.0 (/checkout/src/libarena)
[00:29:15]    Compiling syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
[00:29:21]    Compiling rustc_errors v0.0.0 (/checkout/src/librustc_errors)
[00:30:51]    Compiling syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
[00:31:03] thread 'main' panicked at 'type must lift when substs do', src/libcore/option.rs:1008:5
[00:31:04] 
[00:31:04] error: internal compiler error: unexpected panic
[00:31:04] 
[00:31:04] note: the compiler unexpectedly panicked. this is a bug.
[00:31:04] note: the compiler unexpectedly panicked. this is a bug.
[00:31:04] 
[00:31:04] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:31:04] 
[00:31:04] note: rustc 1.32.0-dev running on x86_64-unknown-linux-gnu
[00:31:04] 
[00:31:04] note: compiler flags: -Z force-unstable-if-unmarked -C prefer-dynamic -C opt-level=2 -C prefer-dynamic -C debug-assertions=y -C link-args=-Wl,-rpath,$ORIGIN/../lib --crate-type dylib
[00:31:04] note: some of the compiler flags provided by cargo are hidden
[00:31:04] 
[00:31:04] error: Could not compile `rustc`.
[00:31:04] warning: build failed, waiting for other jobs to finish...
---
travis_time:end:196f9801:start=1544163555915219709,finish=1544163555920186128,duration=4966419
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:06c35ab6
$ 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:0fac

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)

@bors
Copy link
Contributor

bors commented Dec 7, 2018

💔 Test failed - status-travis

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 7, 2018
@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 7, 2018

@bors try

@bors
Copy link
Contributor

bors commented Dec 7, 2018

⌛ Trying commit f0c9eec with merge 264b63a...

bors added a commit that referenced this pull request Dec 7, 2018
[WIP] Tweak query code for performance

r? @michaelwoerister
@rust-highfive
Copy link
Collaborator

The job mingw-check 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:1d47cbf6:start=1544187673569784372,finish=1544187675898480269,duration=2328695897
$ 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
Setting environment variables from .travis.yml
$ export IMAGE=mingw-check
---
[00:04:28]     Checking arena v0.0.0 (/checkout/src/libarena)
[00:04:29]     Checking syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
[00:04:30]     Checking rustc_errors v0.0.0 (/checkout/src/librustc_errors)
[00:04:45]     Checking syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
[00:04:47] error[E0432]: unresolved import `ty::query::job::QueryResult`
[00:04:47]    --> src/librustc/ty/query/plumbing.rs:816:13
[00:04:47]     |
[00:04:47] 816 |           use ty::query::job::QueryResult;
[00:04:47]     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `QueryResult` in `ty::query::job`
[00:04:47]     | 
[00:04:47]    ::: src/librustc/ty/query/mod.rs:106:1
[00:04:47]     |
[00:04:47] 106 | / define_queries! { <'tcx>
[00:04:47] 107 | |     Other {
[00:04:47] 108 | |         /// Records the type of every item.
[00:04:47] 109 | |         [] fn type_of: TypeOfItem(DefId) -> Ty<'tcx>,
[00:04:47] 698 | |     },
[00:04:47] 699 | | }
[00:04:47]     | |_- in this macro invocation
[00:04:47] 
[00:04:47] 
[00:05:11] error: aborting due to previous error
[00:05:11] 
[00:05:11] For more information about this error, try `rustc --explain E0432`.
[00:05:11] error: Could not compile `rustc`.
[00:05:11] 
[00:05:11] To learn more, run the command again with --verbose.
[00:05:11] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:05:11] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
[00:05:11] Build completed unsuccessfully in 0:03:07
travis_time:end:02fb5403:start=1544187684949644919,finish=1544187996855895432,duration=311906250513
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
---
travis_time:end:1177f928:start=1544187997318949468,finish=1544187997326050627,duration=7101159
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:021450ed
$ 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:00f7f57e
travis_time:start:00f7f57e
$ 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:00eef080
$ 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)

@bors
Copy link
Contributor

bors commented Dec 7, 2018

☀️ Test successful - status-travis
State: approved= try=True

@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 7, 2018

@rust-timer build 264b63a

@rust-timer
Copy link
Collaborator

Success: Queued 264b63a with parent fc84f5f, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 264b63a

@michaelwoerister
Copy link
Member

This looks very promising :) Ping me when it's not work-in-progress anymore.

cc @rust-lang/wg-compiler-performance

@nnethercote
Copy link
Contributor

Indeed, looks good! @Zoxc, can you edit this PR's description with some brief details of what the 30 commits do? Thanks.

@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 7, 2018

I'll probably split this out in smaller PRs when I clean things up

@michaelwoerister
Copy link
Member

I'll probably split this out in smaller PRs when I clean things up

Yes, that's a good idea!

@bors
Copy link
Contributor

bors commented Dec 7, 2018

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

bors added a commit that referenced this pull request Dec 10, 2018
Tweak query code for performance

Split from #56509

r? @michaelwoerister
bors added a commit that referenced this pull request Dec 10, 2018
Replace LockCell with atomic types

Split from #56509

r? @michaelwoerister
bors added a commit that referenced this pull request Dec 19, 2018
bors added a commit that referenced this pull request Jan 9, 2019
Replace LockCell with atomic types

Split from #56509

r? @michaelwoerister
@XAMPPRocky
Copy link
Member

Triage; @Zoxc Hello, have you been able to get back to this PR?

@Zoxc Zoxc closed this Jan 21, 2019
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.

7 participants