Add command line flags to Firefox for JS engine options
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
People
(Reporter: mstange, Unassigned)
References
(Blocks 1 open bug)
Details
(I'm filing this in the JS engine component rather than in Toolkit :: Startup and Profile System
because I figure this component reaches the more interested audience.)
When running the Spidermonkey shell, you can pass arguments which change its behavior, for example:
% js --enable-ic-frame-pointers --only-inline-selfhosted --spectre-mitigations=off --no-async-stacks index.js
But when running Firefox, passing the same flags is harder. You can get an approximation like this:
% JIT_OPTION_enableICFramePointers=true JIT_OPTION_onlyInlineSelfHosted=true \
JIT_OPTIONS_spectreIndexMasking=false JIT_OPTIONS_spectreObjectMitigations=false \
JIT_OPTIONS_spectreStringMitigations=false JIT_OPTIONS_spectreValueMasking=false \
JIT_OPTIONS_spectreJitToCxxCalls=false firefox
but this is quite unwieldy, and environment variables are harder to use than command line flags. Also, for --no-async-stacks
, you'd additionally have to set the pref javascript.options.asyncstack
to false
on about:config
.
It would be great if you were able to do this instead:
% firefox --js-shell="--enable-ic-frame-pointers --only-inline-selfhosted --spectre-mitigations=off --no-async-stacks"
Chrome has a --js-shell
argument that does this.
Updated•1 years ago
|
Updated•1 years ago
|
Comment 1•1 years ago
|
||
Having to use environment variables is especially painful on Windows where you need to do:
set JIT_OPTION_enableICFramePointers=true && set JIT_OPTION_onlyInlineSelfHosted=true && \
set JIT_OPTIONS_spectreIndexMasking=false && set JIT_OPTIONS_spectreObjectMitigations=false && \
set JIT_OPTIONS_spectreStringMitigations=false && set JIT_OPTIONS_spectreValueMasking=false && \
set JIT_OPTIONS_spectreJitToCxxCalls=false
Comment 2•1 years ago
|
||
This seems possible, mostly, but would be a good chunk of work with a careful scalpel.
Might be better to spend time on cleaning up our option parsing story before tackling this
Description
•