[Webkit-unassigned] [Bug 194356] New: [JSC] Butterfly size selection causes overly-increasing memory usage

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 6 13:05:45 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=194356

            Bug ID: 194356
           Summary: [JSC] Butterfly size selection causes
                    overly-increasing memory usage
           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: ysuzuki at apple.com

We use the size class value when we allocate expanded Butterfly. But at that time, we calculate the possible next vector size by first attempting to expand the length of vector x2.
The problem is that size classes are also sometimes picked in x2 fashion. This means that Butterfly gets too larger size every time.

Some memory usage is recently largely improved in a super simple "push(xxx)" benchmarks. This is because of the sizeof(UnlinkedCodeBlock) shrinking.
Since UnlinkedFunctionCodeBlock is so frequently allocated, we are putting sizeof(UnlinkedFunctionCodeBlock) into the size class.
This adds a bit efficient size class for butterfly.

https://bugs.webkit.org/show_bug.cgi?id=194281

We should keep this efficiency without considering such a hacky situation because this means that sizeof(UnlinkedFunctionCodeBlock)'s change indirectly affects on the Butterfly allocation efficiency.
When growing vector length, we first calculate 2x vector length, but this should be revisited. Maybe, the best way is first calculate the butterfly size around x2 vector size and recalculate the efficient vector length.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190206/9b2a7963/attachment-0001.html>


More information about the webkit-unassigned mailing list