<?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>114458</bug_id>
          
          <creation_ts>2013-04-11 12:41:54 -0700</creation_ts>
          <short_desc>Get rid of the 10ms delay between test executions</short_desc>
          <delta_ts>2013-04-11 13:01:20 -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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Filip Pizlo">fpizlo</reporter>
          <assigned_to name="Filip Pizlo">fpizlo</assigned_to>
          <cc>barraclough</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ggaren</cc>
    
    <cc>mark.lam</cc>
    
    <cc>mhahnenberg</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
    
    <cc>rniwa</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>874051</commentid>
    <comment_count>0</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-04-11 12:41:54 -0700</bug_when>
    <thetext>I don&apos;t know the history of why the 10ms delay is there.  But it causes the benchmark to exhibit some strange behaviors:

- If your OS has any kind of power management smarts, and your machine is fast enough to run each individual test in significantly less than 10ms (like say, a test runs in 2ms), then the power management logic will think that you&apos;re mostly idle and reduce clock.  We&apos;ve seen this happen before on a variety of OSes, and it typically has the effect that a faster machine with the same OS and WebKit will appear to run _slower_ according to SunSpider output because to CPU is faster and hence makes us appear more idle.  It&apos;s happening right now on my two MBP&apos;s, and as far as I can tell it&apos;s entirely because of that 10ms delay.  Paradoxically, if your browser or some other thing on your system is simultaneously eating up CPU, your faster machine will appear to run faster in SunSpider because the power management thingy won&apos;t kick in.  This is a double-whammy: if the power management does kick in, then you look slower; but worse, you have no guarantee that the power management thing *will* actually kick in, so you end up spending several days wondering why your SunSpider scores exhibit a bimodal distribution without any clear way of reproducing the &quot;slow&quot; runs.  So the 10ms delay is pure evil: it rewards slower machines and noisy systems while making benchmark results wildly inconsistent.  Getting rid of the delay means that the machine is consistently warm for the entire benchmark run, and this appears to get the power heuristics out of the way.  (And yes, I did consider saying that you should only run SunSpider if you hack your machine into a no-power-management state but that seems like it would make the benchmark less practical for our purposes: we want to be able to run it in an ad-hoc casual way and rely on the fact that even without extensive setup we&apos;ll get useful results.  This is crucial to how we do our benchmark-driven development.)

- If your VM delays GC until idle time, SunSpider won&apos;t get to measure GC effects at all.  I think this is strange.  A benchmark for a GC&apos;d language should include GC time in the reported run-time, and should not encourage people to build super-fast mutators with super-slow collectors.

Anyway, eliminating this 10ms delay doesn&apos;t change results, except on quiet fast machines, where you now get consistent scores and those scores are indeed faster than the scores you&apos;d get on slower machines.

&lt;rdar://problem/13631112&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>874054</commentid>
    <comment_count>1</comment_count>
      <attachid>197656</attachid>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-04-11 12:44:20 -0700</bug_when>
    <thetext>Created attachment 197656
the patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>874058</commentid>
    <comment_count>2</comment_count>
      <attachid>197656</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-04-11 12:48:56 -0700</bug_when>
    <thetext>Comment on attachment 197656
the patch

r=me too</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>874072</commentid>
    <comment_count>3</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-04-11 13:01:20 -0700</bug_when>
    <thetext>Landed in http://trac.webkit.org/changeset/148226</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>197656</attachid>
            <date>2013-04-11 12:44:20 -0700</date>
            <delta_ts>2013-04-11 12:48:56 -0700</delta_ts>
            <desc>the patch</desc>
            <filename>blah.patch</filename>
            <type>text/plain</type>
            <size>1393</size>
            <attacher name="Filip Pizlo">fpizlo</attacher>
            
              <data encoding="base64">SW5kZXg6IFBlcmZvcm1hbmNlVGVzdHMvU3VuU3BpZGVyL0NoYW5nZUxvZwo9PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0t
LSBQZXJmb3JtYW5jZVRlc3RzL1N1blNwaWRlci9DaGFuZ2VMb2cJKHJldmlzaW9uIDE0ODIyMykK
KysrIFBlcmZvcm1hbmNlVGVzdHMvU3VuU3BpZGVyL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpA
QCAtMSwzICsxLDE3IEBACisyMDEzLTA0LTExICBGaWxpcCBQaXpsbyAgPGZwaXpsb0BhcHBsZS5j
b20+CisKKyAgICAgICAgR2V0IHJpZCBvZiB0aGUgMTBtcyBkZWxheSBiZXR3ZWVuIHRlc3QgZXhl
Y3V0aW9ucworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9
MTE0NDU4CisgICAgICAgIDxyZGFyOi8vcHJvYmxlbS8xMzYzMTExMj4KKworICAgICAgICBSZXZp
ZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKyAgICAgICAgCisgICAgICAgIE1vcmUgZGV0YWlscyBv
biB0aGlzIGluIHRoZSBidWcuIExvbmcgc3Rvcnkg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sIDApOwogfQog
CiBmdW5jdGlvbiByZWFsbHlOZXh0KCkgCg==
</data>
<flag name="review"
          id="219561"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>