Bug 86435 - CodeBlock::CodeBlock() wastes a lot of Vector capacity in the m_argumentValueProfiles vector
Summary: CodeBlock::CodeBlock() wastes a lot of Vector capacity in the m_argumentValue...
Status: RESOLVED DUPLICATE of bug 86436
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:51 PDT by Simon Fraser (smfr)
Modified: 2012-05-15 13:52 PDT (History)
6 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:51:13 PDT
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<JSC::ValueProfile, 0ul>::Vector()
2   0x10699c7c5 WTF::Vector<JSC::ValueProfile, 0ul>::Vector()
3   0x106995898 JSC::CodeBlock::CodeBlock(JSC::ScriptExecutable*, JSC::CodeType, JSC::JSGlobalObject*, WTF::PassRefPtr<JSC::SourceProvider>, unsigned int, WTF::HashMap<WTF::RefPtr<WTF::StringImpl>, JSC::SymbolTableEntry, JSC::IdentifierRepHash, WTF::HashTraits<WTF::RefPtr<WTF::StringImpl> >, JSC::SymbolTableIndexHashTraits>*, bool, WTF::PassOwnPtr<JSC::CodeBlock>)
4   0x106a9ea22 JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::FunctionExecutable*, JSC::CodeType, JSC::JSGlobalObject*, WTF::PassRefPtr<JSC::SourceProvider>, unsigned int, bool, WTF::PassOwnPtr<JSC::CodeBlock>)
5   0x106a97ab8 JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::FunctionExecutable*, JSC::CodeType, JSC::JSGlobalObject*, WTF::PassRefPtr<JSC::SourceProvider>, unsigned int, bool, WTF::PassOwnPtr<JSC::CodeBlock>)
Comment 1 Filip Pizlo 2012-05-15 13:50:03 PDT
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're using to add parameters in the bytecode generator makes it really had to get the capacity of the m_argumentValueProfiles vector right.
Comment 2 Filip Pizlo 2012-05-15 13:52:33 PDT
Yup, it's an easy fix so I'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 ***