Commit e25e769a authored by akling@apple.com's avatar akling@apple.com

CodeBlock: Un-segment some Vectors.

<https://webkit.org/b/124188>

Turn some SegmentedVectors into Vectors where the final item count
is known at CodeBlock construction time. This removes unnecessary
allocation and indirection.

I've got ~4.5 MB below SegmentedVector<ValueProfile>::ensureSegment
on Membuster3 (peak, before pressure signal) so this should help
take a bit of the edge off there.

Reviewed by Geoffrey Garen.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent edbbfcd9
2013-11-11 Andreas Kling <akling@apple.com>
CodeBlock: Un-segment some Vectors.
<https://webkit.org/b/124188>
Turn some SegmentedVectors into Vectors where the final item count
is known at CodeBlock construction time. This removes unnecessary
allocation and indirection.
I've got ~4.5 MB below SegmentedVector<ValueProfile>::ensureSegment
on Membuster3 (peak, before pressure signal) so this should help
take a bit of the edge off there.
Reviewed by Geoffrey Garen.
2013-11-11 Filip Pizlo <fpizlo@apple.com> 2013-11-11 Filip Pizlo <fpizlo@apple.com>
Get rid of the lastResultRegister optimization in the baseline JIT Get rid of the lastResultRegister optimization in the baseline JIT
......
...@@ -1718,12 +1718,12 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlin ...@@ -1718,12 +1718,12 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlin
if (size_t size = unlinkedCodeBlock->numberOfArrayProfiles()) if (size_t size = unlinkedCodeBlock->numberOfArrayProfiles())
m_arrayProfiles.grow(size); m_arrayProfiles.grow(size);
if (size_t size = unlinkedCodeBlock->numberOfArrayAllocationProfiles()) if (size_t size = unlinkedCodeBlock->numberOfArrayAllocationProfiles())
m_arrayAllocationProfiles.grow(size); m_arrayAllocationProfiles.resizeToFit(size);
if (size_t size = unlinkedCodeBlock->numberOfValueProfiles()) if (size_t size = unlinkedCodeBlock->numberOfValueProfiles())
m_valueProfiles.grow(size); m_valueProfiles.resizeToFit(size);
#endif #endif
if (size_t size = unlinkedCodeBlock->numberOfObjectAllocationProfiles()) if (size_t size = unlinkedCodeBlock->numberOfObjectAllocationProfiles())
m_objectAllocationProfiles.grow(size); m_objectAllocationProfiles.resizeToFit(size);
// Copy and translate the UnlinkedInstructions // Copy and translate the UnlinkedInstructions
size_t instructionCount = unlinkedCodeBlock->instructions().size(); size_t instructionCount = unlinkedCodeBlock->instructions().size();
......
...@@ -1044,13 +1044,13 @@ private: ...@@ -1044,13 +1044,13 @@ private:
#endif #endif
#if ENABLE(VALUE_PROFILER) #if ENABLE(VALUE_PROFILER)
Vector<ValueProfile> m_argumentValueProfiles; Vector<ValueProfile> m_argumentValueProfiles;
SegmentedVector<ValueProfile, 8> m_valueProfiles; Vector<ValueProfile> m_valueProfiles;
SegmentedVector<RareCaseProfile, 8> m_rareCaseProfiles; SegmentedVector<RareCaseProfile, 8> m_rareCaseProfiles;
SegmentedVector<RareCaseProfile, 8> m_specialFastCaseProfiles; SegmentedVector<RareCaseProfile, 8> m_specialFastCaseProfiles;
SegmentedVector<ArrayAllocationProfile, 8> m_arrayAllocationProfiles; Vector<ArrayAllocationProfile> m_arrayAllocationProfiles;
ArrayProfileVector m_arrayProfiles; ArrayProfileVector m_arrayProfiles;
#endif #endif
SegmentedVector<ObjectAllocationProfile, 8> m_objectAllocationProfiles; Vector<ObjectAllocationProfile> m_objectAllocationProfiles;
// Constant Pool // Constant Pool
Vector<Identifier> m_additionalIdentifiers; Vector<Identifier> m_additionalIdentifiers;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment