<?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>86438</bug_id>
          
          <creation_ts>2012-05-14 21:56:05 -0700</creation_ts>
          <short_desc>FunctionParameters waste a lot of Vector capacity</short_desc>
          <delta_ts>2012-05-15 20:38:45 -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></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>
    
    <cc>slewis</cc>
          

      

      

      

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

6369 vectors, 60.39KB used of 546.38KB, 485.98KB wasted at:
1   0x10696fa45 WTF::Vector&lt;JSC::Identifier, 0ul&gt;::Vector()
2   0x106bb9ee0 JSC::FunctionParameters::FunctionParameters(JSC::ParameterNode*)
3   0x106bb9ead JSC::FunctionParameters::FunctionParameters(JSC::ParameterNode*)
4   0x106bbac59 JSC::FunctionParameters::create(JSC::ParameterNode*)
5   0x106bb9f84 JSC::FunctionBodyNode::finishParsing(JSC::SourceCode const&amp;, JSC::ParameterNode*, JSC::Identifier const&amp;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>624906</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-05-15 20:16:53 -0700</bug_when>
    <thetext>This is the top most wasteful Vector client after the other JSC stuff was fixed:

2680 vectors, 28.22KB used of 249.88KB, 221.66KB wasted at:

1   0x108917855 JSC::FunctionParameters::FunctionParameters(JSC::ParameterNode*)
2   0x10891793f JSC::FunctionBodyNode::finishParsing(JSC::SourceCode const&amp;, JSC::ParameterNode*, JSC::Identifier const&amp;)
3   0x108945704 JSC::ASTBuilder::createFunctionExpr(int, JSC::Identifier const*, JSC::FunctionBodyNode*, JSC::ParameterNode*, int, int, int, int)
4   0x10894459f JSC::ASTBuilder::Expression JSC::Parser&lt;JSC::Lexer&lt;unsigned short&gt; &gt;::parseMemberExpression&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;)
5   0x10893c8a9 JSC::ASTBuilder::Expression JSC::Parser&lt;JSC::Lexer&lt;unsigned short&gt; &gt;::parseAssignmentExpression&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>624910</commentid>
    <comment_count>2</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2012-05-15 20:19:13 -0700</bug_when>
    <thetext>Are these short term vectors, or are they things that are lying around?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>624919</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-05-15 20:38:45 -0700</bug_when>
    <thetext>I&apos;m dumping from a run loop observer, so they persist over at least one runloop.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>