Changeset 208811 in webkit


Ignore:
Timestamp:
Nov 16, 2016 2:24:45 PM (7 years ago)
Author:
fpizlo@apple.com
Message:

Slight Octane regression from concurrent GC's eager object zero-fill
https://bugs.webkit.org/show_bug.cgi?id=164823

Reviewed by Geoffrey Garen.

During concurrent GC, we need to eagerly zero-fill objects we allocate prior to
executing the end-of-allocation fence. This causes some regressions. This is an attempt
to fix those regressions by making them conditional on whether the mutator is fenced.

This is a slight speed-up on raytrace and boyer, and hopefully it will fix the
regression.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::splatWordsIfMutatorIsFenced):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::reallocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::mutatorFence):
(JSC::FTL::DFG::LowerDFGToB3::setButterfly):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r208808 r208811  
     12016-11-16  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Slight Octane regression from concurrent GC's eager object zero-fill
     4        https://bugs.webkit.org/show_bug.cgi?id=164823
     5
     6        Reviewed by Geoffrey Garen.
     7       
     8        During concurrent GC, we need to eagerly zero-fill objects we allocate prior to
     9        executing the end-of-allocation fence. This causes some regressions. This is an attempt
     10        to fix those regressions by making them conditional on whether the mutator is fenced.
     11       
     12        This is a slight speed-up on raytrace and boyer, and hopefully it will fix the
     13        regression.
     14
     15        * ftl/FTLLowerDFGToB3.cpp:
     16        (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
     17        (JSC::FTL::DFG::LowerDFGToB3::splatWordsIfMutatorIsFenced):
     18        (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage):
     19        (JSC::FTL::DFG::LowerDFGToB3::reallocatePropertyStorage):
     20        (JSC::FTL::DFG::LowerDFGToB3::allocateObject):
     21        (JSC::FTL::DFG::LowerDFGToB3::mutatorFence):
     22        (JSC::FTL::DFG::LowerDFGToB3::setButterfly):
     23
    1242016-11-16  Mark Lam  <mark.lam@apple.com>
    225
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r208761 r208811  
    81358135                ValueFromBlock haveButterfly = m_out.anchor(fastButterflyValue);
    81368136               
    8137                 splatWords(
     8137                splatWordsIfMutatorIsFenced(
    81388138                    fastButterflyValue,
    81398139                    m_out.constInt32(-structure->outOfLineCapacity() - 1),
     
    89618961    }
    89628962   
     8963    void splatWordsIfMutatorIsFenced(LValue base, LValue begin, LValue end, LValue value, const AbstractHeap& heap)
     8964    {
     8965        LBasicBlock slowPath = m_out.newBlock();
     8966        LBasicBlock continuation = m_out.newBlock();
     8967       
     8968        LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
     8969       
     8970        m_out.branch(
     8971            m_out.load8ZeroExt32(m_out.absolute(vm().heap.addressOfMutatorShouldBeFenced())),
     8972            rarely(slowPath), usually(continuation));
     8973       
     8974        m_out.appendTo(slowPath, continuation);
     8975       
     8976        splatWords(base, begin, end, value, heap);
     8977        m_out.jump(continuation);
     8978       
     8979        m_out.appendTo(continuation, lastNext);
     8980    }
     8981   
    89638982    void splatWords(LValue base, LValue begin, LValue end, LValue value, const AbstractHeap& heap)
    89648983    {
     
    90149033        LValue result = allocatePropertyStorageWithSizeImpl(initialOutOfLineCapacity);
    90159034
    9016         splatWords(
     9035        splatWordsIfMutatorIsFenced(
    90179036            result,
    90189037            m_out.constInt32(-initialOutOfLineCapacity - 1), m_out.constInt32(-1),
     
    90479066        }
    90489067       
    9049         splatWords(
     9068        splatWordsIfMutatorIsFenced(
    90509069            result,
    90519070            m_out.constInt32(-newSize - 1), m_out.constInt32(-oldSize - 1),
     
    99279946    {
    99289947        LValue result = allocateCell(allocator, structure, slowPath);
    9929         splatWords(
     9948        splatWordsIfMutatorIsFenced(
    99309949            result,
    99319950            m_out.constInt32(JSFinalObject::offsetOfInlineStorage() / 8),
     
    1258612605            rarely(slowPath), usually(continuation));
    1258712606       
    12588         m_out.appendTo(slowPath);
     12607        m_out.appendTo(slowPath, continuation);
    1258912608       
    1259012609        m_out.fence(&m_heaps.root, nullptr);
     
    1261312632            rarely(slowPath), usually(fastPath));
    1261412633
    12615         m_out.appendTo(fastPath);
     12634        m_out.appendTo(fastPath, slowPath);
    1261612635       
    1261712636        m_out.storePtr(butterfly, object, m_heaps.JSObject_butterfly);
    1261812637        m_out.jump(continuation);
    1261912638       
    12620         m_out.appendTo(slowPath);
     12639        m_out.appendTo(slowPath, continuation);
    1262112640       
    1262212641        m_out.fence(&m_heaps.root, nullptr);
Note: See TracChangeset for help on using the changeset viewer.