Now ensure that we know whether malloc memory was freed by the collector or the mutator. Most of the time we can get the |wasSwept| state from from the FreeOp, so mostly this is passing the FreeOp through in more places. That's not always possible though since some code uses the runtime's default FreeOp, so this sets the approriate flag on the default free while we're sweeping too.
Differential Revision: https://phabricator.services.mozilla.com/D39393
--HG--
extra : moz-landing-system : lando
Now we're calculating retained size here we can remove the same calculation from Statistics. I had to add a flag to say whether a zone was collected in the last collection so that we know which zones to add to add up. I checked that this produced the same result as the original calculation.
Differential Revision: https://phabricator.services.mozilla.com/D39392
--HG--
extra : moz-landing-system : lando
The main idea here is to pass a |wasSwept| parameter to memory tracking methods that remove memory. We know what to pass for GC heap size because this always goes through HeapSize::removeGCArena(). Getting this right for malloc memory is the subject of a later patch.
Differential Revision: https://phabricator.services.mozilla.com/D39387
--HG--
extra : moz-landing-system : lando
Differential Revision: https://phabricator.services.mozilla.com/D39423
MANUAL PUSH: Lando does not allow me to land these patches, and no one is in #lando to help diagnose why.
--HG--
extra : rebase_source : 1a77f50a0529d0ee4d262abe663b2503bb0659a6
extra : histedit_source : d0135627a288df5750f292fc5702eb7fd5fe6f9f
Got rid of the per-thread JSContext created at the start of each thread. Tasks that require JSContext (ParseTasks, IonBuilder, Wasm tier 2 generators, GCParallel) now request an unused context to set to their thread. Tasks which do not use JSContext will not request one.
Differential Revision: https://phabricator.services.mozilla.com/D37495
--HG--
extra : moz-landing-system : lando
Created a vector of JSContext*, initialized at creation of GlobalHelperThreadState, destroyed when GlobalHelperThreadState.finish() is called. Note that this implementation makes the assumption that the creation and destruction of these objects always happens in the same order (helper thread state created -> main thread context created -> main thread context destroyed -> helper thread state destroyed). In this scenario context checks can clear by each context claiming the main thread during its ctor/dtor but this is only possible if the main thread context is not set at the time.
Also, removed GlobalHelperThreadState::lock() and unlock(), as they are not being used - AutoLockHelperThreadState is used instead.
Differential Revision: https://phabricator.services.mozilla.com/D36842
--HG--
extra : moz-landing-system : lando
Created SetThread/ClearThread functions to handle JSContext/tid setting/clearing & updated existing implementation of JSContext to reflect. CurrentThread is ContextData because JSContext should already have a "claim" on the thread if it's clearing these.
Differential Revision: https://phabricator.services.mozilla.com/D36836
--HG--
extra : moz-landing-system : lando
Some failures crept in and out after my last sets of annotations landed. This
patch updates most of the annotations to deal with them.
MANUAL PUSH: Lando won't let me land.
Differential Revision: https://phabricator.services.mozilla.com/D39462
--HG--
extra : rebase_source : 4cfccf95c5bb2521533a9f5c4c25d67f414fb6f5
extra : histedit_source : c19187a3b3002e0eebdd809738b57641e1e432cd
Now that IonBuilder only depends on JitScript we no longer need to have a BaselineScript.
Differential Revision: https://phabricator.services.mozilla.com/D39168
--HG--
extra : moz-landing-system : lando
This prevents assertion failures with later patches because we will run the
definite properties analysis in IonBuilder without requiring a Baseline
compilation.
Just aborting in IonBuilder should be fine nowadays: we can now properly
backtrack from inlining failures (instead of aborting the whole compilation)
and when this happens we mark the script uninlineable too.
Differential Revision: https://phabricator.services.mozilla.com/D39481
--HG--
extra : moz-landing-system : lando
There are three cases where this function could OOM:
* Zeal mode - we want to crash if this OOMs
* Growing the Nursery - We've added a new test to exercise this code path
* Disabling the Nursery - Plenty of existing tests seem to cover this
with OOM testing.
Differential Revision: https://phabricator.services.mozilla.com/D39457
--HG--
extra : moz-landing-system : lando
This moves the actual fields to the base scripts and unifies the basic
hasFlag / setFlag operations.
Depends on D39441
Differential Revision: https://phabricator.services.mozilla.com/D39442
--HG--
extra : moz-landing-system : lando
These flags are already shared by LazyScript and JSScript. Later patches
will move the fields and accessors.
Differential Revision: https://phabricator.services.mozilla.com/D39441
--HG--
extra : moz-landing-system : lando
This requires replacing inclusions of it with inclusions of more specific prefs
files.
The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.
Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.
Differential Revision: https://phabricator.services.mozilla.com/D39138
--HG--
extra : moz-landing-system : lando
This is slightly complicated by the fact that we should only pass an invocation kind for the first slice, so it's passed as Maybe<>.
Differential Revision: https://phabricator.services.mozilla.com/D39222