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

[do not merge] Benchmark ignoring span hashes during incr. comp. for getting a lower bound for #47389 #56287

Conversation

michaelwoerister
Copy link
Member

I figured that ignoring changes to span values might give a useful lower bound on compile times with the optimizations described in #47389 applied. Keep in mind that any improvements shown with this PR could only be achieved if we could update object files in place, which would be the "stretch goal" for #47389.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(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 Nov 27, 2018
@michaelwoerister
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Nov 27, 2018

⌛ Trying commit 135e763 with merge 5280d23...

bors added a commit that referenced this pull request Nov 27, 2018
[do not merge] Benchmark ignoring span hashes during incr. comp. for getting a lower bound for #47389

I figured that ignoring changes to span values might give a useful lower bound on compile times with the optimizations described in #47389 applied. Keep in mind that any improvements shown with this PR could only be achieved if we could update object files in place, which would be the "stretch goal" for #47389.
@Mark-Simulacrum
Copy link
Member

@rust-timer build 5280d23

@rust-timer
Copy link
Collaborator

Success: Queued 5280d23 with parent 10e2c72, comparison URL.

@@ -320,7 +320,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for Span {
const TAG_EXPANSION: u8 = 0;
const TAG_NO_EXPANSION: u8 = 1;

if !hcx.hash_spans {
if !hcx.hash_spans && false {
Copy link
Member

Choose a reason for hiding this comment

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

I believe this should be

Suggested change
if !hcx.hash_spans && false {
if !hcx.hash_spans || true {

Right now it doesn't ever do an early-return.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, crap :) That's what you get when you do a PR right before going home...

@bors
Copy link
Contributor

bors commented Nov 27, 2018

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

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 5280d23

@michaelwoerister
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Nov 28, 2018

⌛ Trying commit aa8957e with merge 54d813038fd30724af29a1c438cda175a67ee4dc...

@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:0c2d5274:start=1543407533593435046,finish=1543407590271787832,duration=56678352786
$ 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:47:57] .................................................................................................... 100/5065
[00:48:00] .................................................................................................... 200/5065
[00:48:03] .............................ii............................................ii...................ii.. 300/5065
[00:48:05] ..............................................................................................iii... 400/5065
[00:48:08] .....iiiiiiii.iii............................iii...........................................i........ 500/5065
[00:48:15] .................................................................................................... 700/5065
[00:48:20] ................................................................................................i... 800/5065
[00:48:24] ........i........................................................................................... 900/5065
[00:48:27] ...............iiiii...................iiiiii....................................................... 1000/5065
---
[00:49:05] .................................................................................................... 2300/5065
[00:49:10] .................................................................................................... 2400/5065
[00:49:13] .................................................................................................... 2500/5065
[00:49:17] .................................................................................................... 2600/5065
[00:49:20] ........iiiiiiiii................................................................................... 2700/5065
[00:49:27] .................................................................................................... 2900/5065
[00:49:30] .................................................................................................... 3000/5065
[00:49:33] .......................................................................i............................ 3100/5065
[00:49:36] .................................................................................................... 3200/5065
---
travis_time:start:test_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:02:56] 
[01:02:56] running 117 tests
[01:02:59] i..ii...iii..iiii.....i...i.........i..iii...........i.....i.....ii...i..i.ii..............i...ii..i 100/117
[01:02:59] i.i.....iiii.....
[01:02:59] 
[01:02:59]  finished in 3.400
[01:02:59] travis_fold:end:test_codegen

---
travis_time:start:test_incremental
Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:03:01] 
[01:03:01] running 92 tests
change_symbol_export_status.inc" "-Z" "incremental-verify-ich" "-Z" "incremental-queries" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/change_symbol_export_status/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zquery-dep-graph" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/change_symbol_export_status/auxiliary"
[01:03:13] ------------------------------------------
[01:03:13] 
[01:03:13] ------------------------------------------
[01:03:13] stderr:
[01:03:13] stderr:
[01:03:13] ------------------------------------------
[01:03:13] {"message":"lint `private_no_mangle_fns` has been removed: `no longer an warning, #[no_mangle] functions always exported`","code":{"code":"renamed_and_removed_lints","explanation":null},"level":"warning","spans":[{"file_name":"/checkout/src/test/incremental/change_symbol_export_status.rs","byte_start":566,"byte_end":587,"line_start":15,"line_end":15,"column_start":10,"column_end":31,"is_primary":true,"text":[{"text":"#![allow(private_no_mangle_fns)]","highlight_start":10,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"#[warn(renamed_and_removed_lints)] on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"warning: lint `private_no_mangle_fns` has been removed: `no longer an warning, #[no_mangle] functions always exported`\n  --> /checkout/src/test/incremental/change_symbol_export_statue[100]","highlight_start":1,"highlight_end":19},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirOptimized(indexing)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:33:1\n   |\nLL | / pub fn indexing(slice: &[u8]) -> u8 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         slice[100]\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`HirBody(indexing)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":1398,"byte_end":1542,"line_start":33,"line_end":42,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn indexing(slice: &[u8]) -> u8 {","highlight_start":1,"highlight_end":38},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        slice[100]","highlight_start":1,"highlight_end":19},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        slice[100]","highlight_start":1,"highlight_end":19},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `HirBody(indexing)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:33:1\n   |\nLL | / pub fn indexing(slice: &[u8]) -> u8 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         slice[100]\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`MirValidated(arithmetic_overflow_plus)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":1728,"byte_end":1879,"line_start":48,"line_end":57,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn arithmetic_overflow_plus(val: i32) -> i32 {","highlight_start":1,"highlight_end":51},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val + 1","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val + 1","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirValidated(arithmetic_overflow_plus)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:48:1\n   |\nLL | / pub fn arithmetic_overflow_plus(val: i32) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         val + 1\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`MirOptimized(arithmetic_overflow_plus)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":1728,"byte_end":1879,"line_start":48,"line_end":57,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn arithmetic_overflow_plus(val: i32) -> i32 {","highlight_start":1,"highlight_end":51},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val + 1","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val + 1","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirOptimized(arithmetic_overflow_plus)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:48:1\n   |\nLL | / pub fn arithmetic_overflow_plus(val: i32) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         val + 1\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`HirBody(arithmetic_overflow_plus)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":1728,"byte_end":1879,"line_star4},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val - 1","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirOptimized(arithmetic_overflow_minus)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:63:1\n   |\nLL | / pub fn arithmetic_overflow_minus(val: i32) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         val - 1\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`HirBody(arithmetic_overflow_minus)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":2066,"byte_end":2218,"line_start":63,"line_end":72,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn arithmetic_overflow_minus(val: i32) -> i32 {","highlight_start":1,"highlight_end":52},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val - 1","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val - 1","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"sugg| / pub fn arithmetic_overflow_mult(val: i32) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         val * 2\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`MirOptimized(arithmetic_overflow_mult)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":2404,"byte_end":2555,"line_start":78,"line_end":87,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn arithmetic_overflow_mult(val: i32) -> i32 {","highlight_start":1,"highlight_end":51},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val * 2","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val * 2","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirOptimized(arithmetic_overflow_mult)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:78:1\n   |\nLL | / pub fn arithmetic_overflow_mult(val: i32) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         val * 2\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`HirBody(arithmetic_overflow_mult)` should be dirty but fn arithmetic_overflow_negation(val: i32) -> i32 {","highlight_start":1,"highlight_end":55},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        -val","highlight_start":1,"highlight_end":13},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        -val","highlight_start":1,"highlight_end":13},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirValidated(arithmetic_overflow_negation)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:93:1\n   |\nLL | / pub fn arithmetic_overflow_negation(val: i32) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         -val\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`MirOptimized(arithmetic_overflow_negation)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":2741,"byte_end":2890,"line_start":93,"line_end":102,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn arithmetic_overflow_negation(val: i32) -> i32 {","highlight_start":1,"highlight_end":55},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        -val","highlight_start":1,"highlight_end":13},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        -val","highlight_start":1,"highlight_end":13},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirOptimized(arithmetic_overflow_negation)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:93:1\n   |\nLL | / pub fn arithmetic_overflow_negation(val: i32) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         -val\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`HirBody(arithmetic_overflow_negation)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":2741,"byte_end":2890,"line_start":93,"line_end":102,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn arithmetic_overflow_negation(val: i32) -> i32 {","highlight_start":1,"highlight_end":55},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        -val","highlight_start":1,"highlight_end":13},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        -val","highlight_start":1,"highlight_end":13},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `HirBody(arithmetic_overflow_negation)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:93:1\n   |\nLL | / pub fn arithmetic_overflow_negation(val: i32) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         -val\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`MirValidated(division_by_zero)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":3076,"byte_end":3219,"line_start":108,"line_end":117,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn division_by_zero(val: i32) -> i32 {","highlight_start":1,"highlight_end":43},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        2 / val","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        2 / val","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirValidated(division_by_zero)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:108:1\n   |\nLL | / pub fn division_by_zero(val: i32) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         2 / val\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`MirOptimized(division_by_zero)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":3076,"byte_end":3219,"line_start":108,"line_end":117,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn division_by_zero(val: i32) -> i32 {","highlight_start":1,"highlight_end":43},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        2 / val","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        2 / val","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirOptimized(division_by_zero)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:108:1\n   |\nLL | / pub fn division_by_zero(val: i32) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         2 / val\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`HirBody(division_by_zero)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":3076,"byte_end":3219,"line_start":108,"line_end":117,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn division_by_zero(val: i32) -> i32 {","highlight_start":1,"highlight_end":43},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        2 / val","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        2 / val","highlight_start":1,"highlight_end":16},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `HirBody(division_by_zero)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:108:1\n   |\nLL | / pub fn division_by_zero(val: i32) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         2 / val\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`MirValidated(mod_by_zero)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":3404,"byte_end":3542,"line_start":122,"line_end":131,"coluckout/src/test/incremental/hashes/panic_exprs.rs:137:1\n   |\nLL | / pub fn shift_left(val: i32, shift: usize) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         val << shift\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`MirOptimized(shift_left)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":3728,"byte_end":3889,"line_start":137,"line_end":146,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn shift_left(val: i32, shift: usize) -> i32 {","highlight_start":1,"highlight_end":51},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val << shift","highlight_start":1,"highlight_end":21},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val << shift","highlight_start":1,"highlight_end":21},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirOptimized(shift_left)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:137:1\n   |\nLL | / pub fn shift_left(val: i32, shift: usize) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         val << shift\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"messagrimary":true,"text":[{"text":"pub fn shift_right(val: i32, shift: usize) -> i32 {","highlight_start":1,"highlight_end":52},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val >> shift","highlight_start":1,"highlight_end":21},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val >> shift","highlight_start":1,"highlight_end":21},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirValidated(shift_right)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:152:1\n   |\nLL | / pub fn shift_right(val: i32, shift: usize) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         val >> shift\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`MirOptimized(shift_right)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":4076,"byte_end":4238,"line_start":152,"line_end":161,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn shift_right(val: i32, shift: usize) -> i32 {","highlight_start":1,"highlight_end":52},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val >> shift","highlight_start":1,"highlight_end":21},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val >> shift","highlight_start":1,"highlight_end":21},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `MirOptimized(shift_right)` should be dirty but is not\n  --> /checkout/src/test/incremental/hashes/panic_exprs.rs:152:1\n   |\nLL | / pub fn shift_right(val: i32, shift: usize) -> i32 {\nLL | |     #[cfg(cfail1)]\nLL | |     {\nLL | |         val >> shift\n...  |\nLL | |     }\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"`HirBody(shift_right)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/hashes/panic_exprs.rs","byte_start":4076,"byte_end":4238,"line_start":152,"line_end":161,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"pub fn shift_right(val: i32, shift: usize) -> i32 {","highlight_start":1,"highlight_end":52},{"text":"    #[cfg(cfail1)]","highlight_start":1,"highlight_end":19},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        val >> shift","highlight_start":1,"highlight_end":21},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"    #[cfg(not(cfail1))]","highlight_start":1,"highlight_end":24},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"  ight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `Hir(main)` should be dirty but is not\n  --> /checkout/src/test/incremental/spans_significant_w_debuginfo.rs:26:1\n   |\nLL | pub fn main() {}\n   | ^^^^^^^^^^^^^^^^\n\n"}
[01:03:13] {"message":"`HirBody(main)` should be dirty but is not","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/spans_significant_w_debuginfo.rs","byte_start":848,"byte_end":864,"line_start":26,"line_end":26,"column_start":1,"column_end":17,"is_primary":true,"text":[{"text":"pub fn main() {}","highlight_start":1,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `HirBody(main)` should be dirty but is not\n  --> /checkout/src/test/incremental/spans_significant_w_debuginfo.rs:26:1\n   |\nLL | pub fn main() {}\n   | ^^^^^^^^^^^^^^^^\n\n"}
[01:03:13] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[01:03:13] ------------------------------------------
[01:03:13] 
[01:03:13] thread '[incremental] incremental/spans_significant_w_debuginfo.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[01:03:13] 
[01:03:13] 
[01:03:13] ---- [incremental] incremental/spans_significant_w_panic.rs stdout ----
[01:03:13] 
[01:03:13] error in revision `rpass2`: compilation failed!
[01:03:13] status: exit code: 1
[01:03:13] command: "/checkout/obj/build/x86_64-unknotest/incremental/spans_significant_w_panic.rs:27:1\n   |\nLL | / pub fn main() {\nLL | |     let _ = 0u8 + 1;\nLL | | }\n   | |_^\n\n"}
[01:03:13] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[01:03:13] ------------------------------------------
[01:03:13] 
[01:03:13] thread '[incremental] incremental/spans_significant_w_panic.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[01:03:13] 
[01:03:13] 
[01:03:13] ---- [incremental] incremental/thinlto/cgu_invalidated_via_import.rs stdout ----
[01:03:13] 
[01:03:13] error in revision `cfail2`: test compilation failed although it shouldn't!
[01:03:13] status: exit code: 1
[01:03:13] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/incremental/thinlto/cgu_invalidated_via_import.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "cfail2" "-C" "incremental=/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/thinlto/cgu_invalidated_via_import/cgu_invalidated_via_import.inc" "-Z" "incremental-verify-ich" "-Z" "incremental-queries" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/thinlto/cgu_invalidated_via_import/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "query-dep-graph" "-O" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/thinlto/cgu_invalidated_via_import/auxiliary"
[01:03:13] stdout:
[01:03:13] -----------                         kind=\"no\")]","highlight_start":1,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CGU-reuse for `independent_cgus_dont_affect_each_other-foo` is `PostLto` but should be `No`\n  --> /checkout/src/test/incremental/thinlto/independent_cgus_dont_affect_each_other.rs:22:1\n   |\nLL | / #![rustc_expected_cgu_reuse(module=\"independent_cgus_dont_affect_each_other-foo\",\nLL | |                             cfg=\"cfail2\",\nLL | |                             kind=\"no\")]\n   | |_______________________________________^\n\n"}
[01:03:13] {"message":"CGU-reuse for `independent_cgus_dont_affect_each_other-bar` is `PostLto` but should be `PreLto`","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/incremental/thinlto/independent_cgus_dont_affect_each_other.rs","byte_start":1055,"byte_end":1223,"line_start":29,"line_end":31,"column_start":1,"column_end":45,"is_primary":true,"text":[{"text":"#![rustc_expected_cgu_reuse(module=\"independent_cgus_dont_affect_each_other-bar\",","highlight_start":1,"highlight_end":82},{"text":"                            cfg=\"cfail2\",","highlight_start":1,"highlight_end":42},{"text":"                            kind=\"pre-lto\")]","highlight_start":1,"highlight_end":45}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CGU-reuse for `independent_cgus_dont_affect_each_other-bar` is `PostLto` but should be `PreLto`\n  --> /checkout/src/test/incremental/thinlto/independent_cgus_dont_affect_each_" "--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/incremental" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "incremental" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-5.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--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" "5.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:03:13] 
[01:03:13] 
[01:03:13] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:03:13] Build completed unsuccessfully in 0:19:03
[01:03:13] Build completed unsuccessfully in 0:19:03
[01:03:13] make: *** [check] Error 1
[01:03:13] Makefile:58: recipe for target 'check' failed

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 Nov 28, 2018

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

@michaelwoerister
Copy link
Member Author

@rust-timer build 54d813038fd30724af29a1c438cda175a67ee4dc

@rust-timer
Copy link
Collaborator

Success: Queued 54d813038fd30724af29a1c438cda175a67ee4dc with parent b68fc18, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 54d813038fd30724af29a1c438cda175a67ee4dc

@michaelwoerister
Copy link
Member Author

So it looks like there is quite a bit of potential for speeding up re-compilation after small changes. The *-check test cases should be indicative of what the optimization might achieve if we just do it for MIR (and not implement the way harder version that also encompasses LLVM IR and object files).

cc @rust-lang/wg-compiler-performance

@michaelwoerister
Copy link
Member Author

Reported the results in the original issue (#47389). Closing.

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

7 participants