Switch to allocating in the tenured heap if necessary while creating property iterators
Categories
(Core :: JavaScript: GC, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox119 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Bug 1852233 is another example where a large data structure is initially allocated in the nursery but is always moved to the tenured heap because its size exceeds that of the nursery.
This case is exacerbated because the entire data structure is traced on every minor GC because it's a stack root.
We can solve this the same way as for JSON parsing and structured clone deserialization by switching to allocating in the tenured heap if we trigger nursery collection while allocating.
| Assignee | ||
Comment 1•3 years ago
|
||
This class observes nursery collections and encasuplates the logic of switching
heap after a specified number of collections occur.
| Assignee | ||
Comment 2•3 years ago
|
||
This replaces the current logic with use of the new class.
I had to change some of the JSONParser construction because I got warnings
about RAII classes being used as temporaries. This should construct the parser
directly in the Rooted now rather than copying it.
Depends on D188333
| Assignee | ||
Comment 3•3 years ago
|
||
Depends on D188334
Updated•3 years ago
|
Comment 5•3 years ago
|
||
Backed out for causing hazard build bustages.
[task 2023-09-18T09:00:37.466Z] gmake[4]: Entering directory '/builds/worker/checkouts/gecko/obj-analyzed-js/js/src/build'
[task 2023-09-18T09:00:37.466Z] /builds/worker/fetches/sixgill/usr/libexec/sixgill/scripts/wrap_gcc/basecc /builds/worker/fetches/gcc/bin/g++ --sysroot /builds/worker/fetches/sysroot-x86_64-linux-gnu -std=gnu++17 -isystem /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/c++/8 -isystem /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/x86_64-linux-gnu/c++/8 -isystem /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/x86_64-linux-gnu -isystem /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wno-attributes -Wno-ignored-attributes -fno-sized-deallocation -fno-aligned-new -Wno-attributes -Wno-ignored-attributes -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -gdwarf-4 -freorder-blocks -O3 -fno-omit-frame-pointer -funwind-tables -Werror -shared -Wl,-z,defs -Wl,--gc-sections -Wl,-h,libmozjs-119a1.so -o libmozjs-119a1.so /builds/worker/checkouts/gecko/obj-analyzed-js/js/src/build/libmozjs-119a1_so.list -lpthread -Wl,-rpath-link,/builds/worker/fetches/sysroot-x86_64-linux-gnu/lib/x86_64-linux-gnu -L/builds/worker/fetches/sysroot-x86_64-linux-gnu/lib/x86_64-linux-gnu -Wl,-rpath-link,/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/x86_64-linux-gnu -L/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/x86_64-linux-gnu -L/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8 -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,-z,nocopyreloc -Wl,-Bsymbolic-functions -Wl,--build-id=sha1 -fstack-protector-strong -Wl,-rpath-link,/builds/worker/checkouts/gecko/obj-analyzed-js/dist/bin -Wl,-rpath-link,/usr/local/lib ../../../build/pure_virtual/libpure_virtual.a /builds/worker/checkouts/gecko/obj-analyzed-js/x86_64-unknown-linux-gnu/debug/libjsrust.a ../../../config/external/nspr/pr/libnspr4.so ../../../config/external/nspr/libc/libplc4.so ../../../config/external/nspr/ds/libplds4.so -Wl,--version-script,symverscript -lm -ldl -L/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/x86_64-linux-gnu -lz -lm -ldl
[task 2023-09-18T09:00:37.466Z] /usr/bin/ld: /builds/worker/checkouts/gecko/obj-analyzed-js/js/src/build/../Unified_cpp_js_src1.o: in function `js::IdToString(JSContext*, JS::PropertyKey, js::gc::Heap) [clone .constprop.0]':
[task 2023-09-18T09:00:37.466Z] /builds/worker/checkouts/gecko/js/src/vm/JSAtomUtils-inl.h:125: undefined reference to `JSLinearString* js::Int32ToStringWithHeap<(js::AllowGC)1>(JSContext*, int, js::gc::Heap)'
[task 2023-09-18T09:00:37.466Z] /usr/bin/ld: /builds/worker/checkouts/gecko/obj-analyzed-js/js/src/build/../Unified_cpp_js_src16.o: in function `js::IdToString(JSContext*, JS::PropertyKey, js::gc::Heap)':
[task 2023-09-18T09:00:37.466Z] /builds/worker/checkouts/gecko/js/src/vm/JSAtomUtils-inl.h:125: undefined reference to `JSLinearString* js::Int32ToStringWithHeap<(js::AllowGC)1>(JSContext*, int, js::gc::Heap)'
[task 2023-09-18T09:00:37.467Z] /usr/bin/ld: /builds/worker/checkouts/gecko/obj-analyzed-js/js/src/build/../Unified_cpp_js_src16.o: in function `js::NativeIterator::NativeIterator(JSContext*, JS::Handle<js::PropertyIteratorObject*>, JS::Handle<JSObject*>, JS::Handle<JS::StackGCVector<JS::PropertyKey, js::TempAllocPolicy> >, bool, mozilla::Vector<js::PropertyIndex, 8ul, js::TempAllocPolicy>*, unsigned int, bool*)':
[task 2023-09-18T09:00:37.467Z] /builds/worker/checkouts/gecko/js/src/vm/JSAtomUtils-inl.h:125: undefined reference to `JSLinearString* js::Int32ToStringWithHeap<(js::AllowGC)1>(JSContext*, int, js::gc::Heap)'
[task 2023-09-18T09:00:37.467Z] collect2: error: ld returned 1 exit status
[task 2023-09-18T09:00:37.467Z] gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:526: libmozjs-119a1.so] Error 1
[task 2023-09-18T09:00:37.467Z] gmake[4]: Leaving directory '/builds/worker/checkouts/gecko/obj-analyzed-js/js/src/build'
[task 2023-09-18T09:00:37.467Z] gmake[4]: Target 'target' not remade because of errors.
[task 2023-09-18T09:00:37.467Z] gmake[4]: Target 'target' not remade because of errors.
[task 2023-09-18T09:00:37.467Z] gmake[3]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:72: js/src/build/target] Error 2
[task 2023-09-18T09:00:37.467Z] gmake[3]: Target 'recurse_compile' not remade because of errors.
[task 2023-09-18T09:00:37.467Z] gmake[2]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:34: compile] Error 2
[task 2023-09-18T09:00:37.467Z] gmake[1]: *** [/builds/worker/checkouts/gecko/config/rules.mk:361: default] Error 2
[task 2023-09-18T09:00:37.467Z] gmake: *** [client.mk:60: build] Error 2
[task 2023-09-18T09:00:37.468Z] 142 compiler warnings present.
[task 2023-09-18T09:00:37.576Z] Collected 1283 objects
<...>
Comment 8•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/24f18107c5e3
https://hg.mozilla.org/mozilla-central/rev/fc85a9485499
https://hg.mozilla.org/mozilla-central/rev/a1a185be5df0
Description
•