[Webkit-unassigned] [Bug 170690] New: WebAssembly: report Memory usage to GC
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 10 13:42:42 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=170690
Bug ID: 170690
Summary: WebAssembly: report Memory usage to GC
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jfbastien at apple.com
CC: jfbastien at apple.com
Depends on: 170628
Blocks: 159775
As part of bug #170628 I noticed that we never report the memory allocated by WebAssembly.Memory to the GC. This change would do it:
Wasm::PageCount JSWebAssemblyMemory::grow(VM& vm, ExecState* exec, uint32_t delt
...
vm.heap.reportExtraMemoryAllocated(Wasm::PageCount(delta).bytes());
void JSWebAssemblyMemory::finishCreation(VM& vm)
...
heap()->reportExtraMemoryAllocated(m_memory->size());
JSWebAssemblyMemory::visitChildren(JSCell* cell, SlotVisitor& visitor)
...
visitor.reportExtraMemoryVisited(thisObject->memory().size());
I'm not sure it's the right thing to do though! The "initial" size seems like a good thing to report, but if we haven't actually backed it up with physical pages then it may severely over-estimate allocation and cause the GC to run too much.
This change is significant enough that I'll punt it to its own patch, after bug #170628.
Referenced Bugs:
https://bugs.webkit.org/show_bug.cgi?id=159775
[Bug 159775] WebAssembly: support the newer spec
https://bugs.webkit.org/show_bug.cgi?id=170628
[Bug 170628] WebAssembly: manage memory better
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170410/f77bcad7/attachment.html>
More information about the webkit-unassigned
mailing list