<?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>86435</bug_id>
          
          <creation_ts>2012-05-14 21:51:13 -0700</creation_ts>
          <short_desc>CodeBlock::CodeBlock() wastes a lot of Vector capacity in the m_argumentValueProfiles vector</short_desc>
          <delta_ts>2012-05-15 13:52:33 -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>DUPLICATE</resolution>
          <dup_id>86436</dup_id>
          
          <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>86281</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>barraclough</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>623633</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-05-14 21:51:13 -0700</bug_when>
    <thetext>Data collected via bug 86281 show that a lot of vector capacity is wasted via the Vector allocated here:


1996 vectors, 134.75KB used of 998.00KB, 863.25KB wasted at:
1   0x1069acb15 WTF::Vector&lt;JSC::ValueProfile, 0ul&gt;::Vector()
2   0x10699c7c5 WTF::Vector&lt;JSC::ValueProfile, 0ul&gt;::Vector()
3   0x106995898 JSC::CodeBlock::CodeBlock(JSC::ScriptExecutable*, JSC::CodeType, JSC::JSGlobalObject*, WTF::PassRefPtr&lt;JSC::SourceProvider&gt;, unsigned int, WTF::HashMap&lt;WTF::RefPtr&lt;WTF::StringImpl&gt;, JSC::SymbolTableEntry, JSC::IdentifierRepHash, WTF::HashTraits&lt;WTF::RefPtr&lt;WTF::StringImpl&gt; &gt;, JSC::SymbolTableIndexHashTraits&gt;*, bool, WTF::PassOwnPtr&lt;JSC::CodeBlock&gt;)
4   0x106a9ea22 JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::FunctionExecutable*, JSC::CodeType, JSC::JSGlobalObject*, WTF::PassRefPtr&lt;JSC::SourceProvider&gt;, unsigned int, bool, WTF::PassOwnPtr&lt;JSC::CodeBlock&gt;)
5   0x106a97ab8 JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::FunctionExecutable*, JSC::CodeType, JSC::JSGlobalObject*, WTF::PassRefPtr&lt;JSC::SourceProvider&gt;, unsigned int, bool, WTF::PassOwnPtr&lt;JSC::CodeBlock&gt;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>624515</commentid>
    <comment_count>1</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2012-05-15 13:50:03 -0700</bug_when>
    <thetext>I am tempted to relate this to https://bugs.webkit.org/show_bug.cgi?id=86436, but I need to investigate this more.  It appears that the pattern we&apos;re using to add parameters in the bytecode generator makes it really had to get the capacity of the m_argumentValueProfiles vector right.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>624520</commentid>
    <comment_count>2</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2012-05-15 13:52:33 -0700</bug_when>
    <thetext>Yup, it&apos;s an easy fix so I&apos;ll dup it and fix in one patch along with the other CodeBlock vector capacity bugs.

*** This bug has been marked as a duplicate of bug 86436 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>