Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDisable zealous GC in release builds. #60
Conversation
|
@bors-servo: r+ |
|
|
Disable zealous GC in release builds. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/mozjs/60) <!-- Reviewable:end -->
|
@bors-servo: r- |
|
It's not enabled. An additional env flag is required to turn it on. |
|
|
|
Running the Dromaeo JS tests with and without gczeal enabled at compile-time... Without gczeal: http://i.imgur.com/iXNJf9e.png. With gczeal: http://i.imgur.com/FP17NH3.png. Looks like about 5% difference in performance on tests which perform allocation. |
|
Ok! A measurable difference is a valid reason to turn it off, I think. |
|
@bors-servo: r+ |
|
|
|
@bors-servo: r- There are functions which are only built when GC zeal is enabled, but which are specified in the bindings. You'll have to remove the GC zeal functions in the bindings to make this work everywhere. Unfortunately, the platforms we actually test on normally don't show this problem, but it can break windows and android. I agree with this change, btw. It was only due to linking that zeal needed to be enabled everywhere, but I don't think we need to set the zeal from code. Setting zeal via env vars should be enough. |
|
Hmm, that's annoying. We're living with a 5% slowdown because of issues on platforms we don't test against. We should at least open an issue for this and leave it open until we fix the bindings. |
|
Fix the bindings and this can land. This affects Android, Windows, and CEF bindings. I think you just need to delete the gc zeal functions in all the jsapi_* files. |
|
OK, I'll have a look at the jsapi files later today. |
|
@michaelwu are you meaning: $ grep -ir zeal rust-mozjs/ Should I just put #[cfg(debugmozjs)] in front of each declaration? |
|
According to https://github.com/servo/mozjs/blob/master/mozjs/js/src/jsapi.h#L4809 there's one function you're missing. Don't make it conditional. Just delete it. The bindings generator can't generate conditional things so it's not worth it. |
|
OK, I removed them from the generated rust-mozjs/src/jsapi_ARCH.rs files, it works locally (where ARCH is linux_64). Are these files regenerated from mozjs/mozjs/js/src/jsapi.h? If so, should the zeal functions also be removed from jsapi.h, jsapi.hpp and jsapi.cpp? |
|
No, don't modify the c++ files. The functions are already removed when gc zeal isn't enabled. If they weren't removed then we wouldn't have to remove them from the bindings. |
|
Will do. Of course, this is over in another repo, so I'll submit another PR. |
PR servo/mozjs#60 removes gczeal in release builds. This gets about a 5% speedup in some Dromaeo JS tests. Unfortunately, it leaves some dangling symbols that are in the jsapi_ARCH.rs files, but hace no matching jsapi definitions. This commit removes those definitions from the bindings. See servo/mozjs#60 (comment)
|
@michaelwu: I submitted a PR removing the gczeal bindings servo/rust-mozjs#212 |
Removed gczeal bindings. PR servo/mozjs#60 removes gczeal in release builds. This gets about a 5% speedup in some Dromaeo JS tests. Unfortunately, it leaves some dangling symbols that are in the jsapi_ARCH.rs files, but hace no matching jsapi definitions. This commit removes those definitions from the bindings. See servo/mozjs#60 (comment) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/rust-mozjs/212) <!-- Reviewable:end -->
|
@bors-servo r+ |
|
|
|
@michaelwu: Thanks! |
|
@bors-servo retry try- r=michaelwu |
|
|
Disable zealous GC in release builds. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/mozjs/60) <!-- Reviewable:end -->
|
|
asajeffrey commentedNov 3, 2015