[Webkit-unassigned] [Bug 260797] New: Reduce size of OptionsStorage in JSC::Config.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 28 08:18:12 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=260797
Bug ID: 260797
Summary: Reduce size of OptionsStorage in JSC::Config.
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: mark.lam at apple.com
1. OptionsStorage was storing options default values. This is unnecessary because default values are only used to provide more info when dumping options. We've move default values to a transient OptionsHelper::Metadata data structure that is heap allocated, and now freed in Options::finalize().
2. Consolidate calls to dump options. Previously, we do it every time in Options::notifyOptionsChanged() and in the jsc shell. Now, we only do it once in Options::finalize(). We also now only assertOptionsAreCoherent() in Options::finalize() instead of doing it repeatedly.
3. Renamed Options::dumpOptionsIfNeeded() into Options::executeDumpOptions(). This is now the entrypoint to dump options (with the exception of dumpAllOptionsInALine() which is used by tests).
4. Moved contents of the OptionReader class into the OptionsHelper namespace to consolidate all the helper tools.
5. Moved Options::s_constMetaData into the OptionsHelper namespace as g_constMetaData. It is only needed for options initialization.
6. Added a g_optionWasOverridden BitSet to track whether an option has been modified (previously, we were comparing the options against their defaults). We keep these as a global instead of in OptionsHelper::Metadata because it is small (56 bytes), and keeping it around makes options dumping more robust in case anyone wants to call the dumpers interactively in a debugging session. g_optionWasOverridden is not protected in JSC::Config because after initialization, it is only used by the dumpers, and is not critical to security.
7. Convert some static functions used for computing default options values into members of Options.
On ARM64, OptionsStorage shrinks from 2632 bytes to 1424 bytes.
--
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/20230828/76cdd1ff/attachment-0001.htm>
More information about the webkit-unassigned
mailing list