Make StaticPrefList.yaml prefs available in SpiderMonkey
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox124 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 2 open bugs)
Details
Attachments
(18 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Adding a new pref for a new feature or optimization currently requires a lot of boilerplate code. This is error-prone and we're spending quite a lot of time just adding/changing/removing/reviewing prefs.
I'm working on patches that eliminate almost all of this boilerplate by parsing StaticPrefList.yaml at SpiderMonkey build time and generating code to automatically read the javascript.options.* prefs.
To add a pref using this new system, all that is needed is:
- Add the pref to
StaticPrefList.yaml, for examplejavascript.options.amazing_new_feature. - Use
JS::Prefs::amazing_new_feature()to retrieve its value in JS engine code.
Both JS shell and browser builds will default to the default value in StaticPrefList.yaml. In the JS shell, it'll be possible to set a pref value with --setpref amazing_new_feature=true or a custom shell flag or whatever.
At least initially this will only support process-wide prefs that are set at startup, but for 95% of our prefs that's all we need.
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
Adding a new pref for a new SpiderMonkey feature or optimization requires a lot of boilerplate code.
This patch stack lets us eliminate almost all of this boilerplate by parsing StaticPrefList.yaml
at SpiderMonkey build time and generating code to automatically expose the javascript.options.*
prefs that have the set_spidermonkey_pref attribute.
Both JS shell and browser builds will default to the pref value in StaticPrefList.yaml.
In the JS shell, it'll be possible to set a pref value with --setpref or a custom shell flag.
Code for this will be added in later patches.
| Assignee | ||
Comment 2•2 years ago
|
||
| Assignee | ||
Comment 3•2 years ago
|
||
| Assignee | ||
Comment 4•2 years ago
|
||
| Assignee | ||
Comment 5•2 years ago
|
||
| Assignee | ||
Comment 6•2 years ago
|
||
| Assignee | ||
Comment 7•2 years ago
|
||
| Assignee | ||
Comment 8•2 years ago
|
||
| Assignee | ||
Comment 9•2 years ago
|
||
| Assignee | ||
Comment 10•2 years ago
|
||
| Assignee | ||
Comment 11•2 years ago
|
||
| Assignee | ||
Comment 12•2 years ago
|
||
| Assignee | ||
Comment 13•2 years ago
|
||
| Assignee | ||
Comment 14•2 years ago
|
||
| Assignee | ||
Comment 15•2 years ago
|
||
| Assignee | ||
Comment 16•2 years ago
|
||
| Assignee | ||
Comment 17•2 years ago
|
||
| Assignee | ||
Comment 18•2 years ago
|
||
Looking at bug 1877605 made me realize we should define better when (startup) prefs
are set exactly.
This patch adds assertions to check startup prefs can only be set before JS_Init and
also fixes the embeddings to follow this new rule. This makes the JS shell and browser
behavior more consistent, and makes it possible to rely on pref values during startup.
Comment 19•2 years ago
|
||
Comment 20•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/1eebff859fd3
https://hg.mozilla.org/mozilla-central/rev/e233569c8754
https://hg.mozilla.org/mozilla-central/rev/86209ac07283
https://hg.mozilla.org/mozilla-central/rev/9c895c695273
https://hg.mozilla.org/mozilla-central/rev/dc1c78065ae2
https://hg.mozilla.org/mozilla-central/rev/cb42ae6d0059
https://hg.mozilla.org/mozilla-central/rev/7cff18237238
https://hg.mozilla.org/mozilla-central/rev/2fb2925094a6
https://hg.mozilla.org/mozilla-central/rev/13d17ade20bf
https://hg.mozilla.org/mozilla-central/rev/f51e25578cc2
https://hg.mozilla.org/mozilla-central/rev/e4e7a694f0ef
https://hg.mozilla.org/mozilla-central/rev/aff2eb111a60
https://hg.mozilla.org/mozilla-central/rev/ba71a363742f
https://hg.mozilla.org/mozilla-central/rev/7dff3560bc3d
https://hg.mozilla.org/mozilla-central/rev/16a3f8e4c145
https://hg.mozilla.org/mozilla-central/rev/29d7680b19bd
https://hg.mozilla.org/mozilla-central/rev/9593f6918d71
https://hg.mozilla.org/mozilla-central/rev/01cafce8c5d6
Comment 21•2 years ago
|
||
Jan, we're seeing pretty bing performance regression in DevTools tests (see https://treeherder.mozilla.org/perfherder/alerts?id=41399&hideDwnToInv=0 , mostly console tests), and this bug seems to be one of the potential offender in the push that triggered the regression (https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=c48ca61bc9255db0107d377c103a752265b60eb8&tochange=aa11ea1d19a3fb9fccc3dd7cb02188d6109ec009). Does that sound plausible? Maybe the new setup means we're not updating a specific pref value or something?
| Assignee | ||
Comment 22•2 years ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #21)
Jan, we're seeing pretty bing performance regression in DevTools tests (see https://treeherder.mozilla.org/perfherder/alerts?id=41399&hideDwnToInv=0 , mostly console tests), and this bug seems to be one of the potential offender in the push that triggered the regression (https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=c48ca61bc9255db0107d377c103a752265b60eb8&tochange=aa11ea1d19a3fb9fccc3dd7cb02188d6109ec009). Does that sound plausible? Maybe the new setup means we're not updating a specific pref value or something?
It's a bit unlikely because I don't think we flip any of these prefs in this case and they're not checked in performance sensitive code. We also haven't gotten other reports of performance regressions.
I triggered some extra damp runs on autoland, let's see if that tells us more. Unfortunately there was some build bustage right before this landed so the window includes some other changes too.
| Assignee | ||
Comment 23•2 years ago
|
||
Nicolas, the devtools performance regression has this range:
Comment 24•2 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #23)
Nicolas, the devtools performance regression has this range:
Thanks a lot Jan
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
Description
•