Bug 194733

Summary: [JSC] Shrink UnlinkedFunctionExecutable
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, guijemont, guijemont+jsc-armv7-ews, hi, joepeck, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=174212
Attachments:
Description Flags
Patch
none
Patch mark.lam: review+

Yusuke Suzuki
Reported 2019-02-15 17:46:43 PST
Shrink UnlinkedFunctionExecutable more to put more instances in one MarkedBlock. Right now, 2 MarkedBlocks are allocated just after initialization of JSGlobalObject, and the second one only uses 8%. If we can shrink UnlinkedFunctionExecutable, we can make it only one MarkedBlock.
Attachments
Patch (27.12 KB, patch)
2019-02-15 18:07 PST, Yusuke Suzuki
no flags
Patch (26.89 KB, patch)
2019-02-15 20:27 PST, Yusuke Suzuki
mark.lam: review+
Yusuke Suzuki
Comment 1 2019-02-15 18:07:26 PST
Yusuke Suzuki
Comment 2 2019-02-15 19:00:55 PST
Comment on attachment 362197 [details] Patch Need to check the test. But it is strange because the test thinks source URL directive should be used even for function constructor.
Yusuke Suzuki
Comment 3 2019-02-15 20:27:23 PST
Mark Lam
Comment 4 2019-02-16 00:21:15 PST
Comment on attachment 362202 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=362202&action=review r=me > Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp:45 > +static_assert(sizeof(UnlinkedFunctionExecutable) <= 128, "UnlinkedFunctionExecutable should fit in a 128-byte cell to keep allocated block only one just after initializing JSGlobalObject."); I would rephrase the message as "UnlinkedFunctionExecutable should fit in a 128-byte cell to keep allocated blocks count to only one after initializing JSGlobalObject."
Yusuke Suzuki
Comment 5 2019-02-16 00:52:23 PST
Comment on attachment 362202 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=362202&action=review Thank you! >> Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp:45 >> +static_assert(sizeof(UnlinkedFunctionExecutable) <= 128, "UnlinkedFunctionExecutable should fit in a 128-byte cell to keep allocated block only one just after initializing JSGlobalObject."); > > I would rephrase the message as "UnlinkedFunctionExecutable should fit in a 128-byte cell to keep allocated blocks count to only one after initializing JSGlobalObject." Sounds nice! Fixed.
Yusuke Suzuki
Comment 6 2019-02-16 00:58:42 PST
Radar WebKit Bug Importer
Comment 7 2019-02-16 00:59:23 PST
Note You need to log in before you can comment on or make changes to this bug.