Closed
Bug 625335
Opened 14 years ago
Closed 14 years ago
Investigate if JSCompartment::finalizeObjectArenaList could be optimized
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 625250
People
(Reporter: smaug, Unassigned)
Details
I was doing some random Shark profiling on FOTN, and JSCompartment::finalizeObjectArenaLists showed up under js_GC, especially free in it. Could we somehow make that free to be run asynchronously or in a separate thread? Or could we reuse the memory? (I have no idea what finalizeObjectArenaLists is freeing) Focused on js_GC: 0.0% 100.0% libmozjs.dylib js_GC(JSContext*, JSCompartment*, JSGCInvocationKind) 9.7% 80.2% libmozjs.dylib JSCompartment::finalizeObjectArenaLists(JSContext*) 6.2% 63.1% libSystem.B.dylib free 33.0% 45.1% libSystem.B.dylib szone_free 7.7% 7.7% libSystem.B.dylib tiny_free_list_add_ptr 4.1% 4.1% libSystem.B.dylib __spin_lock 0.3% 0.3% libSystem.B.dylib dyld_stub__spin_lock 9.6% 9.6% libSystem.B.dylib szone_size 1.2% 1.2% libSystem.B.dylib malloc_zone_free 0.5% 0.5% libSystem.B.dylib dyld_stub_malloc_zone_free 0.3% 0.3% libSystem.B.dylib dyld_stub__spin_unlock 0.2% 0.2% libSystem.B.dylib spin_unlock 5.5% 5.5% libmozjs.dylib js::ArrayBuffer::class_finalize(JSContext*, JSObject*) 0.5% 0.5% libstdc++.6.dylib operator delete(void*) 0.3% 0.3% libSystem.B.dylib malloc_zone_free 0.3% 0.3% libmozjs.dylib dyld_stub_operator delete(void*) 0.2% 0.2% libmozjs.dylib TypedArrayTemplate<float>::class_finalize(JSContext*, JSObject*) 0.2% 0.2% libSystem.B.dylib szone_size 0.2% 0.2% libstdc++.6.dylib dyld_stub_free 0.0% 0.2% libgklayout.dylib _ZL24XPC_WN_NoHelper_FinalizeP9JSContextP8JSObject 0.0% 16.6% libmozjs.dylib JSCompartment::mark(JSTracer*) 0.0% 16.6% libmozjs.dylib _ZN2js2gcL12MarkChildrenEP8JSTracerP8JSObject 0.0% 16.6% libmozjs.dylib _ZN2js2gcL12MarkChildrenEP8JSTracerP8JSObject 0.0% 16.6% libmozjs.dylib _ZN2js2gcL12MarkChildrenEP8JSTracerP8JSObject 0.0% 16.6% libmozjs.dylib js_TraceObject(JSTracer*, JSObject*) 0.0% 16.1% libmozjs.dylib js_TraceObject(JSTracer*, JSObject*) 0.0% 15.9% libmozjs.dylib js_TraceObject(JSTracer*, JSObject*) 1.2% 15.4% libmozjs.dylib _ZL11array_traceP8JSTracerP8JSObject 3.1% 13.8% libmozjs.dylib js_TraceObject(JSTracer*, JSObject*) 6.8% 9.1% libmozjs.dylib _ZL11array_traceP8JSTracerP8JSObject 2.2% 2.2% libmozjs.dylib _ZL11array_traceP8JSTracerP8JSObject 0.5% 1.4% libmozjs.dylib js::Shape::trace(JSTracer*) const 0.2% 0.2% libmozjs.dylib JSObject::shrinkSlots(JSContext*, unsigned long) 0.0% 0.2% libmozjs.dylib js_TraceObject(JSTracer*, JSObject*) 0.3% 0.3% libmozjs.dylib _ZL11array_traceP8JSTracerP8JSObject 0.0% 0.3% libmozjs.dylib js_TraceObject(JSTracer*, JSObject*) 0.0% 0.2% libmozjs.dylib _ZN2js2gcL10MarkObjectEP8JSTracerR8JSObjectPKc 0.0% 0.2% libmozjs.dylib js::Shape::trace(JSTracer*) const 0.2% 0.5% libmozjs.dylib _ZL11array_traceP8JSTracerP8JSObject 0.0% 1.2% libgklayout.dylib _ZL13DOMGCCallbackP9JSContext10JSGCStatus 0.0% 0.5% libmozjs.dylib js::MarkRuntime(JSTracer*) 0.2% 0.3% libmozjs.dylib JSCompartment::purge(JSContext*) 0.3% 0.3% libmozjs.dylib js::ArrayBuffer::class_finalize(JSContext*, JSObject*) 0.2% 0.2% libmozjs.dylib TypedArrayTemplate<float>::class_finalize(JSContext*, JSObject*) 0.0% 0.2% libmozjs.dylib JSCompartment::sweep(JSContext*, unsigned int) 0.2% 0.2% libmozjs.dylib js_SweepAtomState(JSContext*) 0.2% 0.2% libmozjs.dylib js::PropertyTree::unmarkShapes(JSContext*) 0.2% 0.2% libSystem.B.dylib __bzero
Reporter | ||
Comment 1•14 years ago
|
||
Btw, this is without the MaybeGC patch, so the stack looks like 0.0% 6.0% libgklayout.dylib nsJSContext::ScriptEvaluated(int) 0.0% 6.0% libmozjs.dylib js::MaybeGC(JSContext*) 0.0% 6.0% libmozjs.dylib js_GC(JSContext*, JSCompartment*, JSGCInvocationKind) 0.5% 4.5% libmozjs.dylib JSCompartment::finalizeObjectArenaLists(JSContext*) 0.3% 3.6% libSystem.B.dylib free
Yep, fixed on tracemonkey even!
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 3•14 years ago
|
||
Great!
You need to log in
before you can comment on or make changes to this bug.
Description
•