<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>187437</bug_id>
          
          <creation_ts>2018-07-07 12:07:50 -0700</creation_ts>
          <short_desc>[JSC] Optimize layout of SymbolTable to reduce padding</short_desc>
          <delta_ts>2018-07-09 16:16:14 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yusuke Suzuki">ysuzuki</reporter>
          <assigned_to name="Yusuke Suzuki">ysuzuki</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>saam</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1440148</commentid>
    <comment_count>0</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2018-07-07 12:07:50 -0700</bug_when>
    <thetext>[JSC] Optimize layout of SymbolTable to reduce padding</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440149</commentid>
    <comment_count>1</comment_count>
      <attachid>344525</attachid>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2018-07-07 12:08:50 -0700</bug_when>
    <thetext>Created attachment 344525
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440156</commentid>
    <comment_count>2</comment_count>
      <attachid>344525</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2018-07-07 12:58:06 -0700</bug_when>
    <thetext>Comment on attachment 344525
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440165</commentid>
    <comment_count>3</comment_count>
      <attachid>344525</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-07-07 13:29:44 -0700</bug_when>
    <thetext>Comment on attachment 344525
Patch

Rejecting attachment 344525 from commit-queue.

Failed to run &quot;[&apos;/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch&apos;, &apos;--status-host=webkit-queues.webkit.org&apos;, &apos;--bot-id=webkit-cq-02&apos;, &apos;land-attachment&apos;, &apos;--force-clean&apos;, &apos;--non-interactive&apos;, &apos;--parent-command=commit-queue&apos;, 344525, &apos;--port=mac&apos;]&quot; exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Logging in as commit-queue@webkit.org...
Fetching: https://bugs.webkit.org/attachment.cgi?id=344525&amp;action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=187437&amp;ctype=xml&amp;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 &quot;[&apos;git&apos;, &apos;svn&apos;, &apos;dcommit&apos;, &apos;--rmdir&apos;]&quot; 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 &apos;/trunk/Source/JavaScriptCore/ChangeLog&apos; 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 &quot;[&apos;git&apos;, &apos;svn&apos;, &apos;dcommit&apos;, &apos;--rmdir&apos;]&quot; 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 &apos;/trunk/Source/JavaScriptCore/ChangeLog&apos; 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 &quot;[&apos;git&apos;, &apos;svn&apos;, &apos;dcommit&apos;, &apos;--rmdir&apos;]&quot; exit_code: 1 cwd: /Volumes/Data/EWS/WebKit
Updating OpenSource
From https://git.webkit.org/git/WebKit
   b9585f197cc..28ef0a0651a  master     -&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440168</commentid>
    <comment_count>4</comment_count>
      <attachid>344525</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-07-07 13:46:35 -0700</bug_when>
    <thetext>Comment on attachment 344525
Patch

Clearing flags on attachment: 344525

Committed r233622: &lt;https://trac.webkit.org/changeset/233622&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440169</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-07-07 13:46:37 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440170</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-07-07 13:47:18 -0700</bug_when>
    <thetext>&lt;rdar://problem/41934653&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440235</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-07-08 09:43:00 -0700</bug_when>
    <thetext>I&apos;m liking these padding optimizations. Are you using dump-class-layout?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440240</commentid>
    <comment_count>8</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2018-07-08 09:54:09 -0700</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #7)
&gt; I&apos;m liking these padding optimizations. Are you using dump-class-layout?

Yeah, I saw your nice optimizations, and I&apos;m attempting to perform these things in JSC&apos;s long-live objects!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440246</commentid>
    <comment_count>9</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-07-08 10:43:10 -0700</bug_when>
    <thetext>The most frequently-allocated JSC objects (that &apos;heap&apos; 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&lt;std::__1::pair&lt;WTF::UniquedStringImpl*
JSC::DFG::AdaptiveInferredPropertyValueWatchpoint
JSC::DFG::JITCode
JSC::DFG::AdaptiveStructureWatchpoint

so these are good targets for padding optimizations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440376</commentid>
    <comment_count>10</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2018-07-09 07:09:34 -0700</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #9)
&gt; The most frequently-allocated JSC objects (that &apos;heap&apos; shows with Malloc=1)
&gt; are:
&gt; 
&gt; JSC::DirectJITCode
&gt; JSC::StructureStubClearingWatchpoint
&gt; JSC::CodeBlockJettisoningWatchpoint
&gt; JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint
&gt; JSC::ProxyableAccessCase
&gt; JSC::JITStubRoutine
&gt; JSC::NativeJITCode
&gt; JSC::AccessCase
&gt; JSC::GCAwareJITStubRoutine
&gt; JSC::GetterSetterAccessCase
&gt; JSC::StringSourceProvider
&gt; JSC::FunctionRareData::AllocationProfileClearingWatchpoint
&gt; JSC::WeakGCMap&lt;std::__1::pair&lt;WTF::UniquedStringImpl*
&gt; JSC::DFG::AdaptiveInferredPropertyValueWatchpoint
&gt; JSC::DFG::JITCode
&gt; JSC::DFG::AdaptiveStructureWatchpoint
&gt; 
&gt; so these are good targets for padding optimizations.

That&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440562</commentid>
    <comment_count>11</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-07-09 14:43:50 -0700</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #10)
&gt; Is there any way to annotate allocation to inform the object lifetimes to
&gt; Instruments (like, API to map address to name for Instruments)?
&gt; If we have such annotations, it is quite useful.

I don&apos;t know of any, sadly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440609</commentid>
    <comment_count>12</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2018-07-09 16:16:14 -0700</bug_when>
    <thetext>Maybe we could artificially give things we&apos;re interested in a VTable just for profiling purposes in some special build mode?</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>344525</attachid>
            <date>2018-07-07 12:08:50 -0700</date>
            <delta_ts>2018-07-07 13:46:35 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-187437-20180708040849.patch</filename>
            <type>text/plain</type>
            <size>1961</size>
            <attacher name="Yusuke Suzuki">ysuzuki</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjMzNjE2CmRpZmYgLS1naXQgYS9Tb3VyY2UvSmF2YVNjcmlw
dENvcmUvQ2hhbmdlTG9nIGIvU291cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwppbmRleCA0
ZjBjZGMxMDQzNWZhMzQ1MWE5OWQyMTY0NGRiMmI3MWIwN2UyNzAwLi4yMWYxYjY5N2JiNDA4YTBh
NWM5OGQzNDMzZTA3ZWM0NTMzZTBhMTc4IDEwMDY0NAotLS0gYS9Tb3VyY2UvSmF2YVNjcmlwdENv
cmUvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxNCBAQAorMjAxOC0wNy0wNyAgWXVzdWtlIFN1enVraSAgPHV0YXRhbmUudGVhQGdtYWls
LmNvbT4KKworICAgICAgICBbSlNDXSBPcHRpbWl6ZSBsYXlvdXQgb2YgU3lt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