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] rustc: move debug info from LocalDecl and UpvarDecl into a dedicated VarDebugInfo. #56231

Open
wants to merge 10 commits into
base: master
from

Conversation

Projects
None yet
7 participants
@eddyb
Member

eddyb commented Nov 26, 2018

This is my WIP attempt at introducing a MIR debuginfo system.
The last commit isn't done (or even properly rebased), previous ones should be reviewable already.

I wanted to put this up because #48300 and further optimizations are blocked on being able to describe complex debuginfo transformations (see #48300 (comment)), and I didn't want this to get lost in a local branch of mine.

This PR itself is likely blocked on reverting #53239, as that hack is annoying/impossible to generalize.
(cc @alexcrichton when, if ever, can we bump minimum LLVM to 6?)

cc @nikomatsakis @michaelwoerister

@rust-highfive

This comment has been minimized.

Collaborator

rust-highfive commented Nov 26, 2018

r? @matthewjasper

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

@rust-highfive

This comment has been minimized.

Collaborator

rust-highfive commented Nov 26, 2018

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:0292afca:start=1543228378764120239,finish=1543228379805831659,duration=1041711420
$ 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:02:55] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:02:56] tidy error: /checkout/src/librustc_mir/build/mod.rs:162: line longer than 100 chars
[00:02:56] tidy error: /checkout/src/librustc_mir/build/mod.rs:704: trailing whitespace
[00:02:57] some tidy checks failed
[00:02:57] 
[00:02:57] 
[00:02:57] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:02:57] 
[00:02:57] 
[00:02:57] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:02:57] Build completed unsuccessfully in 0:00:54
[00:02:57] Build completed unsuccessfully in 0:00:54
[00:02:57] Makefile:79: recipe for target 'tidy' failed
[00:02:57] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:19400979
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Nov 26 10:36:06 UTC 2018
---
travis_time:end:141cb790:start=1543228566660476901,finish=1543228566664620771,duration=4143870
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:10f87697
$ 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:07be49e1
travis_time:start:07be49e1
$ 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:2cebc585
$ 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)

@eddyb eddyb force-pushed the eddyb:mir-debuginfo branch from 99561dd to d3aa119 Nov 27, 2018

@rust-highfive

This comment has been minimized.

Collaborator

rust-highfive commented Nov 27, 2018

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:07f1bc18:start=1543316636517541716,finish=1543316638760867822,duration=2243326106
$ 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:21:51]    Compiling syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
[00:21:56]    Compiling rustc_errors v0.0.0 (/checkout/src/librustc_errors)
[00:23:28]    Compiling proc_macro v0.0.0 (/checkout/src/libproc_macro)
[00:23:37]    Compiling syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
[00:25:17] error: variable does not need to be mutable
[00:25:17]   --> src/librustc/infer/canonical/query_response.rs:70:14
[00:25:17]    |
[00:25:17] 70 |             |ref infcx, key, canonical_inference_vars| {
[00:25:17]    |              |
[00:25:17]    |              help: remove this `mut`
[00:25:17]    |
[00:25:17]    = note: `-D unused-mut` implied by `-D warnings`
[00:25:17]    = note: `-D unused-mut` implied by `-D warnings`
[00:25:17] 
[00:25:24] error: variable does not need to be mutable
[00:25:24]    --> src/librustc/traits/error_reporting.rs:500:79
[00:25:24]     |
[00:25:24] 500 |         let normalize = |candidate| self.tcx.global_tcx().infer_ctxt().enter(|ref infcx| {
[00:25:24]     |                                                                               |
[00:25:24]     |                                                                               help: remove this `mut`
[00:25:24] 
[00:25:24] error: variable does not need to be mutable
[00:25:24] error: variable does not need to be mutable
[00:25:24]    --> src/librustc/traits/object_safety.rs:560:34
[00:25:24]     |
[00:25:24] 560 |         self.infer_ctxt().enter(|ref infcx| {
[00:25:24]     |                                  |
[00:25:24]     |                                  help: remove this `mut`
[00:25:24] 
[00:25:33] error: aborting due to 3 previous errors
---
[00:25:33] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:25:33] expected success, got: exit code: 101
[00:25:33] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:25:33] Build completed unsuccessfully in 0:22:17
[00:25:33] make: *** [all] Error 1
[00:25:33] Makefile:28: recipe for target 'all' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:192529ae
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Nov 27 11:29:41 UTC 2018
---
travis_time:end:1d336d6c:start=1543318181619762227,finish=1543318181626161724,duration=6399497
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:1cb23ad8
$ 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_fo

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

This comment has been minimized.

Contributor

bors commented Dec 2, 2018

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

@Dylan-DPC

This comment has been minimized.

Member

Dylan-DPC commented Dec 10, 2018

ping from triage @eddyb @matthewjasper what's the update on this? is this blocked on anything?

@eddyb eddyb added S-blocked and removed S-waiting-on-review labels Dec 10, 2018

@eddyb

This comment has been minimized.

Member

eddyb commented Dec 10, 2018

Blocked on #56278. Also, r? @nikomatsakis

@cuviper

This comment has been minimized.

Member

cuviper commented Dec 11, 2018

when, if ever, can we bump minimum LLVM to 6?

See #56642.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment