[JSC] Optimize layout of SymbolTable to reduce padding
Created attachment 344525 [details] Patch
Comment on attachment 344525 [details] Patch r=me
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
Comment on attachment 344525 [details] Patch Clearing flags on attachment: 344525 Committed r233622: <https://trac.webkit.org/changeset/233622>
All reviewed patches have been landed. Closing bug.
<rdar://problem/41934653>
I'm liking these padding optimizations. Are you using dump-class-layout?
(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!
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.
(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.
(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.
Maybe we could artificially give things we're interested in a VTable just for profiling purposes in some special build mode?