<?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>128039</bug_id>
          
          <creation_ts>2014-01-31 22:22:35 -0800</creation_ts>
          <short_desc>Improve convergence on Octane2/gbemu</short_desc>
          <delta_ts>2014-04-29 14:42:44 -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>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>128047</dependson>
    
    <dependson>128057</dependson>
    
    <dependson>128158</dependson>
    
    <dependson>128162</dependson>
    
    <dependson>128229</dependson>
    
    <dependson>128234</dependson>
    
    <dependson>128291</dependson>
          <blocked>112840</blocked>
    
    <blocked>132357</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Filip Pizlo">fpizlo</reporter>
          <assigned_to name="Filip Pizlo">fpizlo</assigned_to>
          <cc>barraclough</cc>
    
    <cc>ggaren</cc>
    
    <cc>mark.lam</cc>
    
    <cc>mhahnenberg</cc>
    
    <cc>mmirman</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>974578</commentid>
    <comment_count>0</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2014-01-31 22:22:35 -0800</bug_when>
    <thetext>...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>974638</commentid>
    <comment_count>1</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2014-02-01 11:34:15 -0800</bug_when>
    <thetext>Currently it appears that we jettison FTL-compiled code multiple times, for no apparent reason.  That&apos;s dumb.  We shouldn&apos;t do that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>974700</commentid>
    <comment_count>2</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2014-02-01 20:43:49 -0800</bug_when>
    <thetext>It looks like two things are going wrong here:

1) The GC is collecting the main structure associated with GBEmu&apos;s state.

2) ToThis never realizes that it should stop speculating badly if the GC resets its structure.

(2) is a progression for the FTL because it fixes the rage-recompilations, but it&apos;s a regression for the DFG because we lose out on GetById/PutById optimizations.  The overspeculation on ToThis is the only thing that&apos;s giving us information about structures!  It&apos;s pretty funny.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>974717</commentid>
    <comment_count>3</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2014-02-01 22:01:35 -0800</bug_when>
    <thetext>There appear to be at least two reasons why the GC is collecting the main structure:

1) On the first run of GBEmu, it adds a property called &quot;secondaryBuffer&quot;, but doesn&apos;t add it in subsequent iterations.  Interestingly, if we hadn&apos;t collected the structure, then everything would more-or-less work: we&apos;d have a set of polymorphic GetByIds and PutByIds - but we know how to handle those.

2) Even if you hack the benchmark to always add &quot;secondaryBuffer&quot;, the structure is still being collected.  It&apos;s not clear exactly why, but there is clearly a second reason.

The nightmare of all of this is making me have second thoughts about our handling of weak structures.  It&apos;s true that the GC often saves us by telling us that a particular structure will never be used again.  That&apos;s pretty cool.  But it then also sometimes has us think that a heap access is entirely unoptimizable even though it became fine after a one-off clearing by GC.

I still need to think more about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>978749</commentid>
    <comment_count>4</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2014-02-09 23:17:23 -0800</bug_when>
    <thetext>As of http://trac.webkit.org/changeset/163765, the FTL is a speed-up on gbemu even without any warm-up.  That&apos;s pretty good.  I&apos;ll keep this bug open because I think we can do even better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1005125</commentid>
    <comment_count>5</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2014-04-29 14:42:44 -0700</bug_when>
    <thetext>Our convergence is pretty good now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>