This also allows us to remove JSID_FROM_BITS and gives us stronger assertions everywhere for the whack integer-string case.
Differential Revision: https://phabricator.services.mozilla.com/D72564
I am honstely still not convinced that this function should actually exists.
It seems like a convulted way of saying AtomToId, while also asserting that the atom is pinned.
Differential Revision: https://phabricator.services.mozilla.com/D72563
We can reduce the size of the SSO by removing the element slot entirely, and instead retrieve the element through a callback function. The callback will take in the value in the private slot of the SSO, which is either a LoadedScript* (from the browser) or a JSObject* (from the shell). In addition, this removes the requirement of having a script dom element ready when parsing a JS script which can open up new opportunities for performance.
Differential Revision: https://phabricator.services.mozilla.com/D70417
This requires adding a new JSOptions field (for internal use within the shell),
as well as a new browser pref (to support possible Cranelift benchmarking on
aarch64).
Differential Revision: https://phabricator.services.mozilla.com/D72907
This adds a splits the non-incremental threshold parameter into one for small heaps and one for large. What counts as large and small are controlled by the existing parameters that were previously used for dynamic heap growth. I also renamed the parameter from "non-incremental threshold" to "incremental limit".
The small heap parameter is increased to 1.4. This avoids non-incremental GC on facebook and reddit as reported in the dependent bugs and allows us to remove the splay latency hack that was previously necessary.
Differential Revision: https://phabricator.services.mozilla.com/D72903
The `mozilla::IsPod<HashMapEntry` specialisation was only needed for the static
assertions in "js/src/frontend/NameCollections.h". Part 3 removed those, so we
can now also remove `mozilla::IsPod<HashMapEntry`.
Drive-by change:
- Remove no longer needed "mozilla/PodOperations.h" include in mfbt/HashTable.h.
- And then fix up previously transitively included files for RootingAPI.h,
jsfriendapi.h, and Bench.cpp.
Differential Revision: https://phabricator.services.mozilla.com/D69201
The idea here is to set a flag whenever GC yeilds to the mutator while waiting for a background task (either sweeping or decommiting). Then when the task completes we check the flag and request a GC slice if it's set.
Differential Revision: https://phabricator.services.mozilla.com/D71770
This adds WrappedPtrOperations and MutableWrappedPtrOperations specialisations for Maybe<T> to all basic Maybe operations to used on Rooted<Maybe<T>>, Handle<Maybe<T>>, etc. I didn't add all of them; in particular I found ptr() would conflict with the Rooted::ptr data member.
This also adds JS::NothingHandleValue for passing Nothing to a Handle<Maybe<Value>>.
Differential Revision: https://phabricator.services.mozilla.com/D71555
The natural way to represent v8::Object is as a thin wrapper around a JS::Value. However, Value is MOZ_NON_PARAM and alignas(8), and irregexp uses objects as parameters. There are two plausible solutions: stop marking Value as MOZ_NON_PARAM, or stop storing a Value inside Object. I wrote a set of patches to do the former, but nbp pointed out in the bug I created that "the intent of alignas(8) was to ensure that 'doubles' are well aligned when loaded/stored as floating points values."
If we want to keep the annotations on Value, then we have to change Object instead. I tried rewriting it to store raw bits, and the patches seem alright, so I'm going with that unless somebody has a good reason not to.
Differential Revision: https://phabricator.services.mozilla.com/D71361
A while back we added a heuristic to delay a GC if it would cause a reset (bug 1367455), but it was turned off after it caused a performance regression and hasn't been reenabled since.
Telemetry shows that that only 0.2% of GCs get reset anyway so we should probably just remove this.
Depends on D71328
Differential Revision: https://phabricator.services.mozilla.com/D71329
This is checkd in the allocator on every allocation, but we also check this when we allocate a new arena in maybeAllocTriggerZoneGC. It's possible that this one will hit first if background sweeping reduces the heap threshold after the last arena was allocated, but this doesn't really make any difference.
Differential Revision: https://phabricator.services.mozilla.com/D71328
This tracks the total memory used by the nursery's malloced buffers set and trigers a minor GC if it passes some limit. The limit is somewhat arbirarily defined as eight times the nursery capactity - this only fires rarely in normal use but is enough to prevent runaway memory growth in this case.
Depends on D71041
Differential Revision: https://phabricator.services.mozilla.com/D71042
--HG--
extra : moz-landing-system : lando
Now that we have some per-zone vectors we can skip tracing those for zones that are not being collected.
Differential Revision: https://phabricator.services.mozilla.com/D68523
--HG--
extra : moz-landing-system : lando