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

Allow disabling LLVM assertions in rustc (fixes #15548) #15559

Merged
merged 2 commits into from Feb 15, 2017

Conversation

@nox
Copy link
Member

commented Feb 15, 2017

This change is Reviewable

@highfive

This comment has been minimized.

Copy link

commented Feb 15, 2017

Heads up! This PR modifies the following files:

  • @wafflespeanut: python/servo/command_base.py, python/servo/bootstrap_commands.py
@nox nox force-pushed the rustup branch 2 times, most recently from 7f8b429 to 09d88cb Feb 15, 2017
@SimonSapin

This comment has been minimized.

Copy link
Member

commented Feb 15, 2017

I got some numbers on Servo commit 09d88cb with Rust commit rust-lang/rust@025c328, on a fast desktop. My config has incremental compilation and ccache enabled. Timings do not include downloading and unpacking dependencies or a compiler.

  • Debug, llvm-assertions = true, after cargo clean: 385 secs
  • Debug, llvm-assertions = true, after touch components/style/lib.rs: 87 secs
  • Debug, llvm-assertions = false, after cargo clean: 333 secs
  • Debug, llvm-assertions = false, after touch components/style/lib.rs: 86 secs
  • Release, llvm-assertions = true, after cargo clean: 583 secs
  • Release, llvm-assertions = true, after touch components/style/lib.rs: 67 secs
  • Release, llvm-assertions = false, after cargo clean: 380 secs
  • Release, llvm-assertions = false, after touch components/style/lib.rs: 69 secs

Observations:

  • With an empty incremental compilation cache (or, presumably, with incremental compilation disabled), LLVM assertions add 16% to the compilation time in debug mode, 53% (!) in release mode.
  • With an ideal incremental compilation cache (nothing actually changed other than a source timestamp), LLVM assertions make no difference (beyond noise levels). I think this is because LLVM is not used at all in this scenario
  • With an ideal incremental compilation cache, release mode 23% is faster to compile than debug mode! I have no explanation for this.
@SimonSapin

This comment has been minimized.

Copy link
Member

commented Feb 15, 2017

This PR doesn’t change the default config, so unless you tweak .servobuild it’s just a rustup.

@bors-servo r+

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2017

📌 Commit 09d88cb has been approved by SimonSapin

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2017

⌛️ Testing commit 09d88cb with merge eec47bb...

bors-servo added a commit that referenced this pull request Feb 15, 2017
Allow disabling LLVM assertions in rustc (fixes #15548)

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15559)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2017

💔 Test failed - linux-dev

@SimonSapin

This comment has been minimized.

Copy link
Member

commented Feb 15, 2017

error: compile-fail/privatize.rs:10: unexpected "error": '10:10: 10:26: proc-macro derive panicked'
error: compile-fail/privatize.rs:10: expected error not found: custom derive attribute panicked
error: compile-fail/ban.rs:14: unexpected "error": '14:10: 14:21: Banned type Cell<JSVal> detected. Use MutJS<JSVal> instead'
error: compile-fail/ban.rs:14: expected error not found: Banned type Cell<JSVal> detected. Use MutJS<JSVal> instead,
error: compile-fail/ban-domrefcell.rs:15: unexpected "error": '15:10: 15:30: Banned type DOMRefCell<JS<T>> detected. Use MutJS<JS<T>> instead'
error: compile-fail/ban-domrefcell.rs:15: expected error not found: Banned type DOMRefCell<JS<T>> detected. Use MutJS<JS<T>> instead,
@SimonSapin

This comment has been minimized.

Copy link
Member

commented Feb 15, 2017

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2017

📌 Commit 57fd45a has been approved by SimonSapin

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2017

⌛️ Testing commit 57fd45a with merge 4f10a0f...

bors-servo added a commit that referenced this pull request Feb 15, 2017
Allow disabling LLVM assertions in rustc (fixes #15548)

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15559)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2017

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev
Approved by: SimonSapin
Pushing 4f10a0f to master...

@bors-servo bors-servo merged commit 57fd45a into master Feb 15, 2017
4 checks passed
4 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
dependency-ci Dependencies checked
Details
homu Test successful
Details
@bors-servo bors-servo referenced this pull request Feb 15, 2017
3 of 5 tasks complete
@SimonSapin SimonSapin deleted the rustup branch Feb 15, 2017
bors-servo added a commit that referenced this pull request Feb 16, 2017
Do not merge yet: Disable LLVM assertions by default

<!-- Please describe your changes on the following line: -->

#15559 (comment)

> With an empty incremental compilation cache (or, presumably, with incremental compilation disabled), LLVM assertions add 16% to the compilation time in debug mode, 53% (!) in release mode.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15548 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15564)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Feb 16, 2017
Do not merge yet: Disable LLVM assertions by default, on supported platforms

<!-- Please describe your changes on the following line: -->

#15559 (comment)

> With an empty incremental compilation cache (or, presumably, with incremental compilation disabled), LLVM assertions add 16% to the compilation time in debug mode, 53% (!) in release mode.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15548 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15564)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Feb 16, 2017
Do not merge yet: Disable LLVM assertions by default, on supported platforms

<!-- Please describe your changes on the following line: -->

#15559 (comment)

> With an empty incremental compilation cache (or, presumably, with incremental compilation disabled), LLVM assertions add 16% to the compilation time in debug mode, 53% (!) in release mode.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15548 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15564)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Feb 17, 2017
Disable LLVM assertions by default, on supported platforms

<!-- Please describe your changes on the following line: -->

#15559 (comment)

> With an empty incremental compilation cache (or, presumably, with incremental compilation disabled), LLVM assertions add 16% to the compilation time in debug mode, 53% (!) in release mode.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15548 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15564)
<!-- Reviewable:end -->
@mbrubeck

This comment has been minimized.

Copy link
Contributor

commented Feb 17, 2017

With an ideal incremental compilation cache, release mode 23% is faster to compile than debug mode! I have no explanation for this.

Conditional compilation means we tend to compile less code in release mode (due to assertions and logging being omitted), though I'm surprised it makes this much difference.

LLVM assertions add 16% to the compilation time in debug mode, 53% (!) in release mode.

This probably means that most of the assertions are in code that is only run during release builds, so enabling assertions during debug builds will be of much more limited use for finding LLVM bugs.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Feb 17, 2017
…d platforms (from servo:no-gods-no-masters-no-assertions); r=Ms2ger

<!-- Please describe your changes on the following line: -->

servo/servo#15559 (comment)

> With an empty incremental compilation cache (or, presumably, with incremental compilation disabled), LLVM assertions add 16% to the compilation time in debug mode, 53% (!) in release mode.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15548 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 1afae52c47e754c6573f4a8b72fcc2e6994d253f

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7cbc302040099b6b6d0b09d6322b618b26ba61ac
Manishearth pushed a commit to Manishearth/gecko-dev that referenced this pull request Feb 18, 2017
…d platforms (from servo:no-gods-no-masters-no-assertions); r=Ms2ger

<!-- Please describe your changes on the following line: -->

servo/servo#15559 (comment)

> With an empty incremental compilation cache (or, presumably, with incremental compilation disabled), LLVM assertions add 16% to the compilation time in debug mode, 53% (!) in release mode.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15548 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 1afae52c47e754c6573f4a8b72fcc2e6994d253f
xeonchen pushed a commit to xeonchen/gecko-cinnabar that referenced this pull request Feb 20, 2017
…d platforms (from servo:no-gods-no-masters-no-assertions); r=Ms2ger

<!-- Please describe your changes on the following line: -->

servo/servo#15559 (comment)

> With an empty incremental compilation cache (or, presumably, with incremental compilation disabled), LLVM assertions add 16% to the compilation time in debug mode, 53% (!) in release mode.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15548 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 1afae52c47e754c6573f4a8b72fcc2e6994d253f
JerryShih pushed a commit to JerryShih/gecko-dev that referenced this pull request Feb 27, 2017
…d platforms (from servo:no-gods-no-masters-no-assertions); r=Ms2ger

<!-- Please describe your changes on the following line: -->

servo/servo#15559 (comment)

> With an empty incremental compilation cache (or, presumably, with incremental compilation disabled), LLVM assertions add 16% to the compilation time in debug mode, 53% (!) in release mode.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15548 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 1afae52c47e754c6573f4a8b72fcc2e6994d253f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.