RESOLVED FIXED 187437
[JSC] Optimize layout of SymbolTable to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=187437
Summary [JSC] Optimize layout of SymbolTable to reduce padding
Yusuke Suzuki
Reported 2018-07-07 12:07:50 PDT
[JSC] Optimize layout of SymbolTable to reduce padding
Attachments
Patch (1.92 KB, patch)
2018-07-07 12:08 PDT, Yusuke Suzuki
no flags
Yusuke Suzuki
Comment 1 2018-07-07 12:08:50 PDT
Mark Lam
Comment 2 2018-07-07 12:58:06 PDT
Comment on attachment 344525 [details] Patch r=me
WebKit Commit Bot
Comment 3 2018-07-07 13:29:44 PDT
Comment on attachment 344525 [details] Patch Rejecting attachment 344525 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 344525, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Logging in as commit-queue@webkit.org... Fetching: https://bugs.webkit.org/attachment.cgi?id=344525&action=edit Fetching: https://bugs.webkit.org/show_bug.cgi?id=187437&ctype=xml&excludefield=attachmentdata Processing 1 patch from 1 bug. Updating working directory Processing patch 344525 from bug 187437. Fetching: https://bugs.webkit.org/attachment.cgi?id=344525 Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Committing to http://svn.webkit.org/repository/webkit/trunk ... M Source/JavaScriptCore/ChangeLog ERROR from SVN: Item is out of date: File '/trunk/Source/JavaScriptCore/ChangeLog' is out of date W: 9275b13b53daac58e42e9cb6f9b6eaceea6bf497 and refs/remotes/origin/master differ, using rebase: :040000 040000 3791fe035b112bc47a3de7dea08c289b80d8040b d2d5b5667dcd84554ec6d384dbe77d5eeb0d8e5c M Source Current branch master is up to date. ERROR: Not all changes have been committed into SVN, however the committed ones (if any) seem to be successfully integrated into the working tree. Please see the above messages for details. Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Committing to http://svn.webkit.org/repository/webkit/trunk ... M Source/JavaScriptCore/ChangeLog ERROR from SVN: Item is out of date: File '/trunk/Source/JavaScriptCore/ChangeLog' is out of date W: 9275b13b53daac58e42e9cb6f9b6eaceea6bf497 and refs/remotes/origin/master differ, using rebase: :040000 040000 3791fe035b112bc47a3de7dea08c289b80d8040b d2d5b5667dcd84554ec6d384dbe77d5eeb0d8e5c M Source Current branch master is up to date. ERROR: Not all changes have been committed into SVN, however the committed ones (if any) seem to be successfully integrated into the working tree. Please see the above messages for details. Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Updating OpenSource From https://git.webkit.org/git/WebKit b9585f197cc..28ef0a0651a master -> origin/master Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ... Currently at 233616 = b9585f197cca3cb59b51c5003895d1d34140a2f1 r233620 = 28ef0a0651af6a904f78aefd20ed11387d4095c8 Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc First, rewinding head to replay your work on top of it... Fast-forwarded master to refs/remotes/origin/master. Full output: https://webkit-queues.webkit.org/results/8468693
WebKit Commit Bot
Comment 4 2018-07-07 13:46:35 PDT
Comment on attachment 344525 [details] Patch Clearing flags on attachment: 344525 Committed r233622: <https://trac.webkit.org/changeset/233622>
WebKit Commit Bot
Comment 5 2018-07-07 13:46:37 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2018-07-07 13:47:18 PDT
Simon Fraser (smfr)
Comment 7 2018-07-08 09:43:00 PDT
I'm liking these padding optimizations. Are you using dump-class-layout?
Yusuke Suzuki
Comment 8 2018-07-08 09:54:09 PDT
(In reply to Simon Fraser (smfr) from comment #7) > I'm liking these padding optimizations. Are you using dump-class-layout? Yeah, I saw your nice optimizations, and I'm attempting to perform these things in JSC's long-live objects!
Simon Fraser (smfr)
Comment 9 2018-07-08 10:43:10 PDT
The most frequently-allocated JSC objects (that 'heap' shows with Malloc=1) are: JSC::DirectJITCode JSC::StructureStubClearingWatchpoint JSC::CodeBlockJettisoningWatchpoint JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint JSC::ProxyableAccessCase JSC::JITStubRoutine JSC::NativeJITCode JSC::AccessCase JSC::GCAwareJITStubRoutine JSC::GetterSetterAccessCase JSC::StringSourceProvider JSC::FunctionRareData::AllocationProfileClearingWatchpoint JSC::WeakGCMap<std::__1::pair<WTF::UniquedStringImpl* JSC::DFG::AdaptiveInferredPropertyValueWatchpoint JSC::DFG::JITCode JSC::DFG::AdaptiveStructureWatchpoint so these are good targets for padding optimizations.
Yusuke Suzuki
Comment 10 2018-07-09 07:09:34 PDT
(In reply to Simon Fraser (smfr) from comment #9) > The most frequently-allocated JSC objects (that 'heap' shows with Malloc=1) > are: > > JSC::DirectJITCode > JSC::StructureStubClearingWatchpoint > JSC::CodeBlockJettisoningWatchpoint > JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint > JSC::ProxyableAccessCase > JSC::JITStubRoutine > JSC::NativeJITCode > JSC::AccessCase > JSC::GCAwareJITStubRoutine > JSC::GetterSetterAccessCase > JSC::StringSourceProvider > JSC::FunctionRareData::AllocationProfileClearingWatchpoint > JSC::WeakGCMap<std::__1::pair<WTF::UniquedStringImpl* > JSC::DFG::AdaptiveInferredPropertyValueWatchpoint > JSC::DFG::JITCode > JSC::DFG::AdaptiveStructureWatchpoint > > so these are good targets for padding optimizations. That's nice! A bit unfortunate thing is that Instruments cannot get type information if the object does not have vtable pointer (runtime type information). Is there any way to annotate allocation to inform the object lifetimes to Instruments (like, API to map address to name for Instruments)? If we have such annotations, it is quite useful.
Simon Fraser (smfr)
Comment 11 2018-07-09 14:43:50 PDT
(In reply to Yusuke Suzuki from comment #10) > Is there any way to annotate allocation to inform the object lifetimes to > Instruments (like, API to map address to name for Instruments)? > If we have such annotations, it is quite useful. I don't know of any, sadly.
Saam Barati
Comment 12 2018-07-09 16:16:14 PDT
Maybe we could artificially give things we're interested in a VTable just for profiling purposes in some special build mode?
Note You need to log in before you can comment on or make changes to this bug.