Bug 86438 - FunctionParameters waste a lot of Vector capacity
Summary: FunctionParameters waste a lot of Vector capacity
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 86281
  Show dependency treegraph
 
Reported: 2012-05-14 21:56 PDT by Simon Fraser (smfr)
Modified: 2012-05-15 20:38 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2012-05-14 21:56:05 PDT
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<JSC::Identifier, 0ul>::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&, JSC::ParameterNode*, JSC::Identifier const&)
Comment 1 Simon Fraser (smfr) 2012-05-15 20:16:53 PDT
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&, JSC::ParameterNode*, JSC::Identifier const&)
3   0x108945704 JSC::ASTBuilder::createFunctionExpr(int, JSC::Identifier const*, JSC::FunctionBodyNode*, JSC::ParameterNode*, int, int, int, int)
4   0x10894459f JSC::ASTBuilder::Expression JSC::Parser<JSC::Lexer<unsigned short> >::parseMemberExpression<JSC::ASTBuilder>(JSC::ASTBuilder&)
5   0x10893c8a9 JSC::ASTBuilder::Expression JSC::Parser<JSC::Lexer<unsigned short> >::parseAssignmentExpression<JSC::ASTBuilder>(JSC::ASTBuilder&)
Comment 2 Oliver Hunt 2012-05-15 20:19:13 PDT
Are these short term vectors, or are they things that are lying around?
Comment 3 Simon Fraser (smfr) 2012-05-15 20:38:45 PDT
I'm dumping from a run loop observer, so they persist over at least one runloop.