These have been unnecessary since the ICScript introduction: when performing the
arguments analysis we have a JitScript but not a BaselineScript.
Depends on D32103
Differential Revision: https://phabricator.services.mozilla.com/D32126
--HG--
extra : moz-landing-system : lando
ICScript and JitScript had the same lifetime already, but this eliminates
a malloc/free and some extra dereferences (especially for accessing ICEntries
from Baseline Interpreter code).
This is just the minimal set of changes to make it easier to review. Follow-up
changes should:
* Move (now) JitScript methods to JitScript.cpp
* Merge FillBytecodeTypeMap with JitScript::initICEntries so we do just a single
bytecode walk.
* Move JitScript from the js namespace to js::jit.
Differential Revision: https://phabricator.services.mozilla.com/D32103
--HG--
extra : moz-landing-system : lando
Some of the TypeInference-related static methods were kept in TypeInference-inl.h and
TypeInference.cpp because of various dependencies. Also, methods like JitScript::MonitorAssign
probably don't belong on JitScript anyway, but for now this seems reasonable.
Differential Revision: https://phabricator.services.mozilla.com/D31982
--HG--
rename : js/src/vm/TypeInference-inl.h => js/src/jit/JitScript-inl.h
rename : js/src/vm/TypeInference.cpp => js/src/jit/JitScript.cpp
rename : js/src/vm/TypeInference.h => js/src/jit/JitScript.h
extra : moz-landing-system : lando
Also JSScript::makeTypes => JSScript::createJitScript for consistency with code
elsewhere.
Differential Revision: https://phabricator.services.mozilla.com/D31755
--HG--
extra : moz-landing-system : lando
This method was a bit of a footgun because cx->currentScript is quite slow.
It seems better to make this very explicit in the callers.
Differential Revision: https://phabricator.services.mozilla.com/D31611
--HG--
extra : moz-landing-system : lando
The "stubs used in compound opcodes" comment is obsolete (refered to some old
opcodes and JaegerMonkey).
This caught one problem, the interpreter called this for JSOP_RESUME.
Differential Revision: https://phabricator.services.mozilla.com/D31608
--HG--
extra : moz-landing-system : lando
SetThis -> MonitorThisType
SetArgument -> MonitorArgType
Monitor -> MonitorBytecodeType
This is consistent with the thisTypes/argTypes/bytecodeTypes accessors and will
avoid confusion when we rename TypeScript to JitScript.
Differential Revision: https://phabricator.services.mozilla.com/D31607
--HG--
extra : moz-landing-system : lando
It makes the code a bit more natural.
The patch also changes these methods to take an AutoSweepTypeScript. This is more
correct and safe than what we did, because these methods return the TypeSet.
Differential Revision: https://phabricator.services.mozilla.com/D31606
--HG--
extra : moz-landing-system : lando
The new trace logger spew routines do not have a corresponding empty inline version for when --disable-trace-logging is used.
Differential Revision: https://phabricator.services.mozilla.com/D32156
--HG--
extra : moz-landing-system : lando
And with some tidying some comments and removing stray #include "gfxPrefs.h"
Differential Revision: https://phabricator.services.mozilla.com/D31468
--HG--
extra : moz-landing-system : lando
Add Jitspewing control for tracelogger data. This can be enabled from the profiler or from the JS shell. Usage is as follows:
From browser (ION_SPEW_FILENAME is recommended here so stdout doesn't get clobbered by each process):
1. JS_TRACE_LOGGING=1 IONFLAGS=tracelogger ION_SPEW_FILENAME=tracelogger ./mach run
2. Enable JSTracer feature in profiler addon
3. Start profiling and ctrl+shift+2 to view profile, and the data will be automatically spewed during profile collection.
From shell:
1. JS_TRACE_LOGGING=1 IONFLAGS=tracelogger dist/bin/js test.js
2. Data is automatically spewed to stdout when the shell exits, or use ION_SPEW_FILENAME.
There is an optional environment variable JS_TRACELOGGER_SPEW that can be used to emit specific events, for example JS_TRACELOGGER_SPEW="Interpreter,Baseline,GC" will emit only those specific events along with the script and self time of each script.
The structured spewer is also supported with SPEW=tracelogger, and this will emit the tracelogger data for every recorded event.
Differential Revision: https://phabricator.services.mozilla.com/D30033
--HG--
extra : moz-landing-system : lando
These calls were changed from wrap() to rewrap() in bug 1291001.
Also, fix a minor typo in xpcprivate.h, because I didn't feel like
filing a separate bug for it.
Differential Revision: https://phabricator.services.mozilla.com/D31688
--HG--
extra : moz-landing-system : lando
Add a special path for the external read barrier API where we inline most of the checks and then always perform the barrier if we call into the engine. This also skips dispatching on trace kind since we know the barrier tracer is always a GCMarker.
This is kind of hacky and I'm not sure how much it gains us (it's difficult to tell in profiles where GC may occur at different times). What do you think?
Differential Revision: https://phabricator.services.mozilla.com/D31803
--HG--
extra : moz-landing-system : lando
Since we now have precise memory accounting for externally allocated memory associated with GC things we should be able to remove use of the existing malloc counter here. This should help with cases where we trigger too many GCs because we think there is more memory associated than there really is.
Differential Revision: https://phabricator.services.mozilla.com/D31806
--HG--
extra : moz-landing-system : lando