Changeset 159097 in webkit


Ignore:
Timestamp:
Nov 11, 2013 11:56:39 PM (10 years ago)
Author:
akling@apple.com
Message:

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.

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r159091 r159097  
     12013-11-11  Andreas Kling  <akling@apple.com>
     2
     3        CodeBlock: Un-segment some Vectors.
     4        <https://webkit.org/b/124188>
     5
     6        Turn some SegmentedVectors into Vectors where the final item count
     7        is known at CodeBlock construction time. This removes unnecessary
     8        allocation and indirection.
     9
     10        I've got ~4.5 MB below SegmentedVector<ValueProfile>::ensureSegment
     11        on Membuster3 (peak, before pressure signal) so this should help
     12        take a bit of the edge off there.
     13
     14        Reviewed by Geoffrey Garen.
     15
    1162013-11-11  Filip Pizlo  <fpizlo@apple.com>
    217
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r159069 r159097  
    17191719        m_arrayProfiles.grow(size);
    17201720    if (size_t size = unlinkedCodeBlock->numberOfArrayAllocationProfiles())
    1721         m_arrayAllocationProfiles.grow(size);
     1721        m_arrayAllocationProfiles.resizeToFit(size);
    17221722    if (size_t size = unlinkedCodeBlock->numberOfValueProfiles())
    1723         m_valueProfiles.grow(size);
     1723        m_valueProfiles.resizeToFit(size);
    17241724#endif
    17251725    if (size_t size = unlinkedCodeBlock->numberOfObjectAllocationProfiles())
    1726         m_objectAllocationProfiles.grow(size);
     1726        m_objectAllocationProfiles.resizeToFit(size);
    17271727
    17281728    // Copy and translate the UnlinkedInstructions
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r158507 r159097  
    10451045#if ENABLE(VALUE_PROFILER)
    10461046    Vector<ValueProfile> m_argumentValueProfiles;
    1047     SegmentedVector<ValueProfile, 8> m_valueProfiles;
     1047    Vector<ValueProfile> m_valueProfiles;
    10481048    SegmentedVector<RareCaseProfile, 8> m_rareCaseProfiles;
    10491049    SegmentedVector<RareCaseProfile, 8> m_specialFastCaseProfiles;
    1050     SegmentedVector<ArrayAllocationProfile, 8> m_arrayAllocationProfiles;
     1050    Vector<ArrayAllocationProfile> m_arrayAllocationProfiles;
    10511051    ArrayProfileVector m_arrayProfiles;
    10521052#endif
    1053     SegmentedVector<ObjectAllocationProfile, 8> m_objectAllocationProfiles;
     1053    Vector<ObjectAllocationProfile> m_objectAllocationProfiles;
    10541054
    10551055    // Constant Pool
Note: See TracChangeset for help on using the changeset viewer.