Bug 86435
| Summary: | CodeBlock::CodeBlock() wastes a lot of Vector capacity in the m_argumentValueProfiles vector | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | barraclough, fpizlo, ggaren, msaboff, oliver, simon.fraser |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 86281 | ||
Simon Fraser (smfr)
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>)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Filip Pizlo
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.
Filip Pizlo
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 ***