<?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>99118</bug_id>
          
          <creation_ts>2012-10-11 16:49:39 -0700</creation_ts>
          <short_desc>[JSC] &gt;10% of Dromaeo dom-query.html is atomizing the same StringImpl&apos;s passed from JSC to getElementByTagName</short_desc>
          <delta_ts>2012-10-15 16:19:29 -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>NEW</bug_status>
          <resolution></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>
          
          <blocked>75571</blocked>
    
    <blocked>92486</blocked>
    
    <blocked>99191</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>barraclough</cc>
    
    <cc>ggaren</cc>
    
    <cc>haraken</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>740430</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-11 16:49:39 -0700</bug_when>
    <thetext>JSC Should atomize constant strings before handing them to WebCore

The Dromaeo dom-query benchmark has the following subtest:

for ( var i = 0; i &lt; num; i++ ) {
	var elems = document.getElementsByTagName(&quot;*&quot;);
	ret = elems[elems.length-1].nodeType;
}

That spends nearly 10% of total time in AtomicString hash lookups for &quot;*&quot;.  &quot;*&quot; is of course already in the AtomicString hash (also a global called WTF::starAtom).

I suspect that JSC may already have code to identify &quot;*&quot; as a constant.  If it were to notice that it is a short string, and to do an AtomicString lookup for it, then it could pass WebCore an already atomized StringImpl, which would cause the AtomicString(const String&amp;) constructor to go down the fast-path, and presumably drop 10% off this test!

I suspect variants of this may affect real world usage, but I don&apos;t know how much of a cost Atomizing constants in JSC would be on other benchmarks (or how complicated it would be).  I leave those up to you JSC experts.

I have not yet tested V8 to see if they already do this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>740447</commentid>
    <comment_count>1</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2012-10-11 16:59:42 -0700</bug_when>
    <thetext>&lt;rdar://problem/12484322&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>740448</commentid>
    <comment_count>2</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2012-10-11 17:00:57 -0700</bug_when>
    <thetext>For this optimization, JSC could put Identifiers in the AtomicString table instead of or in addition to the Identifier table.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>740540</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-11 19:19:54 -0700</bug_when>
    <thetext>Looking at the sample more, it looks like this is more like avoiding AtomicString lookup due to Identifier/AtomicString StringImpl* mismatches has the potential to be more like at 15+% win on dom-query.html:

Running Time	Self		Symbol Name
3472.0ms    7.5%	3472.0	 	WTF::HashTableAddResult&lt;WTF::HashTableIterator&lt;WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits&lt;WTF::StringImpl*&gt;, WTF::HashTraits&lt;WTF::StringImpl*&gt; &gt; &gt; WTF::HashTable&lt;WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits&lt;WTF::StringImpl*&gt;, WTF::HashTraits&lt;WTF::StringImpl*&gt; &gt;::add&lt;WTF::IdentityHashTranslator&lt;WTF::StringHash&gt;, WTF::StringImpl*, WTF::StringImpl*&gt;(WTF::StringImpl* const&amp;, WTF::StringImpl* const&amp;)
1615.0ms    3.4%	1615.0	 	WTF::StringHash::equal(WTF::StringImpl const*, WTF::StringImpl const*)
1524.0ms    3.2%	1524.0	 	WTF::AtomicString::addSlowCase(WTF::StringImpl*)
561.0ms    1.2%	561.0	 	WTF::StringImpl::hashSlowCase() const

Are all samples which stem from this in dom-query.html. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>740547</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-11 19:34:16 -0700</bug_when>
    <thetext>This is also another 8-10% of dom-attr.html.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741096</commentid>
    <comment_count>5</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2012-10-12 12:04:48 -0700</bug_when>
    <thetext>JSC does intern all string literals in source code.  I&apos;m unsure how feasible sharing jsc&apos;s interned strings with AtomicString is (multiple JSC contexts have separate interned strings for the same literal for example).  Also it would require some communication between JSC and WebCore of the sort that would be easier if we weren&apos;t having to deal with two JS engines.

That said, what strings are we seeing that aren&apos;t being atomised?

There are some ways to optimize these kinds of lookup to avoid hashing in common cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741127</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-12 12:58:50 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; JSC does intern all string literals in source code.  I&apos;m unsure how feasible sharing jsc&apos;s interned strings with AtomicString is (multiple JSC contexts have separate interned strings for the same literal for example).  Also it would require some communication between JSC and WebCore of the sort that would be easier if we weren&apos;t having to deal with two JS engines.

For what it&apos;s worth, I believe v8 has the same bug.

&gt; That said, what strings are we seeing that aren&apos;t being atomised?

The case is that &quot;*&quot; or &quot;div&quot; or whatever the author has specified is correctly being Interned (as you noted above), but then that same Interned StringImpl is being handed to getElementsByTagName, getElementById, etc. every time.  Since that StringImpl is not marked isAtomic(), we do a hash-lookup to find the corresponding Atomized StringImpl (which is slow):
http://trac.webkit.org/browser/trunk/Source/WTF/wtf/text/AtomicString.h#L176

A win here would either be to have JSC use the same underlying StringImpl as WebCore (or vice-versa), or to have some fancy way to map between them.

One possible fix might be to pre-warm JSC&apos;s unique StringImpl table with the ones from WebCore?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741129</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-12 13:01:06 -0700</bug_when>
    <thetext>I&apos;m not sure I was clear above.  JSC hands WebCore the same StringImpl for constants, every time.  But unfortunately that StringImpl is not marked isAtomic(), so when WebCore needs an AtomicString, it does a hash-lookup from the StringImpl provided by JSC, to find the corresponding &quot;Atomic&quot; StringImpl in WebCore.  That hash lookup is slow, and ideally would be avoided by having a faster way to map from JSC constants to AtomicStrings. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741141</commentid>
    <comment_count>8</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2012-10-12 13:15:14 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; JSC does intern all string literals in source code.  I&apos;m unsure how feasible sharing jsc&apos;s interned strings with AtomicString is (multiple JSC contexts have separate interned strings for the same literal for example).  Also it would require some communication between JSC and WebCore of the sort that would be easier if we weren&apos;t having to deal with two JS engines.
&gt; 
&gt; For what it&apos;s worth, I believe v8 has the same bug.
&gt; 
&gt; &gt; That said, what strings are we seeing that aren&apos;t being atomised?
&gt; 
&gt; The case is that &quot;*&quot; or &quot;div&quot; or whatever the author has specified is correctly being Interned (as you noted above), but then that same Interned StringImpl is being handed to getElementsByTagName, getElementById, etc. every time.  Since that StringImpl is not marked isAtomic(), we do a hash-lookup to find the corresponding Atomized StringImpl (which is slow):
&gt; http://trac.webkit.org/browser/trunk/Source/WTF/wtf/text/AtomicString.h#L176
&gt; 
&gt; A win here would either be to have JSC use the same underlying StringImpl as WebCore (or vice-versa), or to have some fancy way to map between them.
&gt; 
&gt; One possible fix might be to pre-warm JSC&apos;s unique StringImpl table with the ones from WebCore?

StringImpl&apos;s are unique per JSC-heap, which isn&apos;t a guarantee that they&apos;re unique in the context of the DOM.  We could maybe fix that for commonJSGlobalData, but that feels fragile.


What I was wanting to know is how many unique strings end up missing the cache hit (i mean non-Atomic strings coming from JS)?

Some stats on what those strings are just accumulated via printf logging into a histogram.

Depending on the spread I have an idea for a way to greatly improve the lookup speed even on a miss, when the string is already present in the Atomics table.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741151</commentid>
    <comment_count>9</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-12 13:33:19 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #6)
&gt; &gt; (In reply to comment #5)
&gt; What I was wanting to know is how many unique strings end up missing the cache hit (i mean non-Atomic strings coming from JS)?

Do you mean specific to this benchmark?  Or some larger set of pages?

My understanding is that any string created in JS, by JSC, will be Interned, but never be an AtomicString, and thus need to go through a hash lookup before it can be used in WebCore as an AtomicString?

Every DOM API which takes an AtomicString as a parameter, will require a Hash lookup when taking a string from JSC, if I&apos;m understanding correctly.  If JSC got the string from the DOM/WebCore originally and handed us back the same StringImpl, then we&apos;d avoid this hit of course.

&gt; Some stats on what those strings are just accumulated via printf logging into a histogram.
&gt; 
&gt; Depending on the spread I have an idea for a way to greatly improve the lookup speed even on a miss, when the string is already present in the Atomics table.

Happy to oblidge, but could you restate what data you&apos;re looking for, I&apos;m not sure I understand yet?

It sounds like you&apos;d be interested in having some information on how often a StringImpl which came from JSC is used for a hash lookup in AtomicString?  Or maybe how often an Interned string from JSC is?  I assume over something like the PLT or some representative set of pages?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741152</commentid>
    <comment_count>10</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-12 13:33:56 -0700</bug_when>
    <thetext>(I hope I&apos;m using &quot;Interned&quot; correctly, I&apos;ve interpreted that to mean the JSC equivilent of unique/atomic.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741167</commentid>
    <comment_count>11</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2012-10-12 13:44:12 -0700</bug_when>
    <thetext>&gt; Happy to oblidge, but could you restate what data you&apos;re looking for, I&apos;m not sure I understand yet?

I want to know what strings we end up doing a hash lookup for - i don&apos;t care if they&apos;re interned in the JS engine, as that isn&apos;t something we can take advantage of (multiple GC heaps == multiple &quot;unique&quot; versions of the same string).

What I want is a histogram of strings that require a hash lookup to get to the atomicstring.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741262</commentid>
    <comment_count>12</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-12 15:16:47 -0700</bug_when>
    <thetext>By hist(In reply to comment #11)
&gt; &gt; Happy to oblidge, but could you restate what data you&apos;re looking for, I&apos;m not sure I understand yet?
&gt; 
&gt; I want to know what strings we end up doing a hash lookup for - i don&apos;t care if they&apos;re interned in the JS engine, as that isn&apos;t something we can take advantage of (multiple GC heaps == multiple &quot;unique&quot; versions of the same string).
&gt; 
&gt; What I want is a histogram of strings that require a hash lookup to get to the atomicstring.

Which buckets did you want for such a histogram?  Were you looking for a histogram over strings bucketed by length?  Are you looking for a frequency count based on string content?  (Like &quot;foo&quot; : 1M times, &quot;bar&quot;: 9 times, &quot;baz&quot; 75 times)?

I added the following to:

PassRefPtr&lt;StringImpl&gt; AtomicString::add(StringImpl* r)
{
    if (!r)
        return r;
    printf(&quot;add\n&quot;);
    if (r-&gt;isAtomic())
        return r;
    printf(&quot;slow\n&quot;);
    return addSlowCase(r);
}

And then did run-safari Dromeao/dom-query.html &gt; strings.txt

% grep add strings.txt | wc -l
 151839657
% grep slow strings.txt | wc -l
 115803580

So 76% of all AtomicString(StringImpl*) calls, ended up doing a hash lookup during Dromeao/dom-query.html.

I don&apos;t think that number is particularly interesting, other than that it&apos;s lower than I expect it to be (I expected something like 99% on this benchmark.)

NOTE: That is counting strings which came into AtomicString() already as a StringImpl.  Meaning they were turned into a String, w/o being atomized (this excludes constants from C++, buffers from the parser, etc.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741265</commentid>
    <comment_count>13</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-12 15:23:38 -0700</bug_when>
    <thetext>To be clear, the add(StringImpl*) case covers AtomicStrings which had been converted to String/StringImple somewhere else in the engine.

I chose this entry point to avoid counting strings which came from some other source (like constants in c++, or the HTML parser), or for strings which are created from a substring of other strings (add(StringImpl*, int start, int end) is a wholly separate beast).

I&apos;m generating frequency count data for add(StringImpl*) from the web now.  (I don&apos;t think frequency count data from dom-query.html would be very interesting... and it&apos;s huge anyway.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741266</commentid>
    <comment_count>14</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2012-10-12 15:24:58 -0700</bug_when>
    <thetext>(In reply to comment #13)
&gt; To be clear, the add(StringImpl*) case covers AtomicStrings which had been converted to String/StringImple somewhere else in the engine.
&gt; 
&gt; I chose this entry point to avoid counting strings which came from some other source (like constants in c++, or the HTML parser), or for strings which are created from a substring of other strings (add(StringImpl*, int start, int end) is a wholly separate beast).
&gt; 
&gt; I&apos;m generating frequency count data for add(StringImpl*) from the web now.  (I don&apos;t think frequency count data from dom-query.html would be very interesting... and it&apos;s huge anyway.)

I don&apos;t care about the frequency of hit vs. non-hit, i want a histogram of what strings take the slow case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741286</commentid>
    <comment_count>15</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-12 15:55:26 -0700</bug_when>
    <thetext>1469 addSlowCase(StringImpl*) calls loading apple.com
top 10 strings by content:
 430 data-hires
 126 Referer
 115 User-Agent
  57 http
  40 Accept
  33 \u000A\u0009
  30 onclick
  21 mousedown
  19 div
  15 \u000A\u0009\u0009\u0009\u0009\u0009

8835 addSlowCase(StringImpl*) calls loading my gmail.com
top 10 strings by content:
 274 div
 250 User-Agent
 243 Referer
 219 mouseover
 200 email
 195 keydown
 183 mouseout
 174 click
 146 \u000A  
 145 .ajl

26518 addSlowCase(StringImpl*) calls loading a docs.google.com spreadsheet
2536 div
1286 role
 747 -webkit-user-select: none;
 601 goog-menuitem-content
 542 goog-menuitem
 537 *
 488 mousedown
 470 span
 346 mouseup
 342 id

Remember, these stats only track strings which are being added to the AtomicString hash, which already existed as StringImpls in our engine before that point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741292</commentid>
    <comment_count>16</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2012-10-12 16:01:54 -0700</bug_when>
    <thetext>FWIW, I believe this problem case only arises if WebCore already has an entry in the AtomicString table for the same string. (If the JS string is the first instance of the string, it will &quot;win&quot; in the table.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741294</commentid>
    <comment_count>17</comment_count>
      <attachid>168504</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-12 16:07:34 -0700</bug_when>
    <thetext>Created attachment 168504
Patch I used to generate addSlowCase stats</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741295</commentid>
    <comment_count>18</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-12 16:08:14 -0700</bug_when>
    <thetext>Sorry, webkit-patch upload doesn&apos;t have a --no-assign option yet. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>741483</commentid>
    <comment_count>19</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2012-10-13 09:50:35 -0700</bug_when>
    <thetext>Since JSC has looser threading rules than WebCore, I wonder if WebCore could drive this optimization. For example, WebCore could put AtomicStrings in the Identifier table, or JSC could have an optional interface for supplying your own identifier table, and WebCore could supply the AtomicString table.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>742557</commentid>
    <comment_count>20</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-15 16:13:32 -0700</bug_when>
    <thetext>I&apos;ve now confirmed v8 has the same trouble. Filing a separate bug for that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>742568</commentid>
    <comment_count>21</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-10-15 16:19:29 -0700</bug_when>
    <thetext>bug 99383 is the v8 equivalent. Feel free to re-title, close, however you like to this bug. I think I&apos;ve added all the necessary information at this point.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>168504</attachid>
            <date>2012-10-12 16:07:34 -0700</date>
            <delta_ts>2012-10-12 16:07:34 -0700</delta_ts>
            <desc>Patch I used to generate addSlowCase stats</desc>
            <filename>bug-99118-20121012160636.patch</filename>
            <type>text/plain</type>
            <size>2634</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTMxMTIwCmRpZmYgLS1naXQgYS9Tb3VyY2UvV1RGL3d0Zi90
ZXh0L0F0b21pY1N0cmluZy5jcHAgYi9Tb3VyY2UvV1RGL3d0Zi90ZXh0L0F0b21pY1N0cmluZy5j
cHAKaW5kZXggY2JiNWEyMGVlZDE2YjE3OGY5NDVjY2I0ZTZkNzA1ZjliNmExM2NiNC4uMjNiNjhi
ODUzMzY3Y2QyN2M0YTNmMWRiMWMwMzhiZDEwOTU1OTVlYiAxMDA2NDQKLS0tIGEvU291cmNlL1dU
Ri93dGYvdGV4dC9BdG9taWNTdHJpbmcuY3BwCisrKyBiL1NvdXJjZS9XVEYvd3RmL3RleHQvQXRv
bWljU3RyaW5nLmNwcAp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