<?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>130617</bug_id>
          
          <creation_ts>2014-03-21 14:22:57 -0700</creation_ts>
          <short_desc>6% SunSpider commandline regression due to r165940</short_desc>
          <delta_ts>2014-04-29 15:33: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>JavaScriptCore</component>
          <version>528+ (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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>121074</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Hahnenberg">mhahnenberg</reporter>
          <assigned_to name="Mark Hahnenberg">mhahnenberg</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>993319</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-03-21 14:22:57 -0700</bug_when>
    <thetext>From profiling stanford-crypto-sha256-iterative with Instruments, it looks like we&apos;re spending &gt; 10% of our time calling CFRunLoopTimerSetNextFireDate inside of Heap::reportExtraMemoryCost. It&apos;s a shame this function is so expensive. We have code that tries to avoid calling it too much, but it looks like it&apos;s either not working at all or it&apos;s not aggressive enough in its mitigation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>993320</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-03-21 14:23:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/16394074&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>993321</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-03-21 14:26:05 -0700</bug_when>
    <thetext>In GCActivityCallback::didAllocate, lastGCLength() returns 0 if we&apos;ve never collected before. Some of the benchmarks are never running a single EdenCollection, which causes them to repeatedly call scheduleTimer with a newDelay of 0. This defeats our timer slop heuristic, causing us to invoke CFRunLoopTimerSetNextFireDate a couple orders of magnitude more than we normally would.

The fix is to seed the last GC lengths in Heap with a non-zero length so that our heuristic works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>993325</commentid>
    <comment_count>3</comment_count>
      <attachid>227491</attachid>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-03-21 14:32:09 -0700</bug_when>
    <thetext>Created attachment 227491
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>993331</commentid>
    <comment_count>4</comment_count>
      <attachid>227491</attachid>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2014-03-21 14:47:37 -0700</bug_when>
    <thetext>Comment on attachment 227491
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=227491&amp;action=review

r=me

&gt; Source/JavaScriptCore/heap/Heap.cpp:284
&gt; +    // schedule the timer if we&apos;ve never done a collction.

*collection*</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>993332</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-03-21 14:53:57 -0700</bug_when>
    <thetext>Committed r166099: &lt;http://trac.webkit.org/changeset/166099&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>227491</attachid>
            <date>2014-03-21 14:32:09 -0700</date>
            <delta_ts>2014-03-21 14:47:37 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-130617-20140321143146.patch</filename>
            <type>text/plain</type>
            <size>1945</size>
            <attacher name="Mark Hahnenberg">mhahnenberg</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMTY2MDk3KQorKysgU291cmNl
L0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDIxIEBA
CisyMDE0LTAzLTIxICBNYXJrIEhhaG5lbmJlcmcgIDxtaGFobmVuYmVyZ0BhcHBsZS5jb20+CisK
KyAgICAgICAgNiUgU3VuU3BpZGVyIGNvbW1hbmRsaW5lIHJlZ3Jlc3Npb24gZHVlIHRvIHIxNjU5
NDAKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTEzMDYx
NworCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIEluIEdD
QWN0aXZpdHlDYWxsYmFjazo6ZGlkQWxsb2NhdGUsIGxhc3RHQ0xlbmd0aCgpIHJldHVybnMgMCBp
ZiB3ZSd2ZSBuZXZlciBjb2xsZWN0ZWQgCisgICAgICAgIGJlZm9yZS4gU29tZSBvZiB0aGUgYmVu
Y2htYXJrcyBhcmUgbmV2ZXIgcnVubmluZyBhIHNpbmdsZSBFZGVuQ29sbGVjdGlvbiwgd2hpY2gg
Y2F1c2VzIAorICAgICAgICB0aGVtIHRvIHJlcGVhdGVkbHkgY2FsbCBzY2hlZHVsZVRpbWVyIHdp
dGggYSBuZXdEZWxheSBvZiAwLiBUaGlzIGRlZmVhdHMgb3VyIHRpbWVyIAorICA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0gICAgLCBtX2xhc3RFZGVuR0NMZW5ndGgoMCkKKyAgICAvLyBXZSBzZWVkIHdp
dGggMTBtcyBzbyB0aGF0IEdDQWN0aXZpdHlDYWxsYmFjazo6ZGlkQWxsb2NhdGUgZG9lc24ndCBj
b250aW51b3VzbHkgCisgICAgLy8gc2NoZWR1bGUgdGhlIHRpbWVyIGlmIHdlJ3ZlIG5ldmVyIGRv
bmUgYSBjb2xsY3Rpb24uCisgICAgLCBtX2xhc3RGdWxsR0NMZW5ndGgoMC4wMSkKKyAgICAsIG1f
bGFzdEVkZW5HQ0xlbmd0aCgwLjAxKQogICAgICwgbV9sYXN0Q29kZURpc2NhcmRUaW1lKFdURjo6
bW9ub3RvbmljYWxseUluY3JlYXNpbmdUaW1lKCkpCiAgICAgLCBtX2Z1bGxBY3Rpdml0eUNhbGxi
YWNrKEdDQWN0aXZpdHlDYWxsYmFjazo6Y3JlYXRlRnVsbFRpbWVyKHRoaXMpKQogI2lmIEVOQUJM
RShHR0MpCg==
</data>
<flag name="review"
          id="251741"
          type_id="1"
          status="+"
          setter="msaboff"
    />
          </attachment>
      

    </bug>

</bugzilla>