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
Merged

Conversation

nox
Copy link
Contributor

@nox nox commented Feb 15, 2017

This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @wafflespeanut: python/servo/command_base.py, python/servo/bootstrap_commands.py

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Feb 15, 2017
@nox nox force-pushed the rustup branch 2 times, most recently from 7f8b429 to 09d88cb Compare February 15, 2017 10:56
@SimonSapin
Copy link
Member

SimonSapin 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
Copy link
Member

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

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 09d88cb has been approved by SimonSapin

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Feb 15, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 09d88cb with merge eec47bb...

bors-servo pushed 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
Copy link
Contributor

💔 Test failed - linux-dev

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Feb 15, 2017
@SimonSapin
Copy link
Member

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,

@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Feb 15, 2017
@SimonSapin
Copy link
Member

@bors-servo r+

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Feb 15, 2017
@bors-servo
Copy link
Contributor

📌 Commit 57fd45a has been approved by SimonSapin

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Feb 15, 2017
@bors-servo
Copy link
Contributor

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

bors-servo pushed 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
Copy link
Contributor

☀️ 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
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Feb 15, 2017
@bors-servo bors-servo mentioned this pull request Feb 15, 2017
5 tasks
@SimonSapin SimonSapin deleted the rustup branch February 15, 2017 16:09
bors-servo pushed 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 pushed 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 pushed 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 pushed 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
Copy link
Contributor

mbrubeck 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants