Ignore:
Timestamp:
Sep 23, 2011, 3:05:24 PM (14 years ago)
Author:
[email protected]
Message:

Make write barriers actually do something when enabled
https://bugs.webkit.org/show_bug.cgi?id=68717

Reviewed by Geoffrey Garen.

../../../../Volumes/Data/git/WebKit/OpenSource/Source/JavaScriptCore:

Add a basic card marking style write barrier to JSC (currently
turned off). This requires two scratch registers in the JIT
so there was some register re-arranging to satisfy that requirement.
Happily this produced a minor perf bump in sunspider (~0.5%).

Turning the barriers on causes an overall regression of around 1.5%

(JSC::MacroAssemblerX86Common::store8):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::movb_i8m):

  • dfg/DFGJITCodeGenerator.cpp:

(JSC::DFG::JITCodeGenerator::isKnownNotCell):
(JSC::DFG::JITCodeGenerator::writeBarrier):
(JSC::DFG::JITCodeGenerator::markCellCard):
(JSC::DFG::JITCodeGenerator::cachedPutById):

  • dfg/DFGJITCodeGenerator.h:
  • dfg/DFGRepatch.cpp:

(JSC::DFG::tryCachePutByID):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • heap/CardSet.h: Added.

(JSC::CardSet::CardSet):
(JSC::::cardForAtom):
(JSC::::cardMarkedForAtom):
(JSC::::markCardForAtom):

  • heap/Heap.cpp:
  • heap/Heap.h:

(JSC::Heap::addressOfCardFor):
(JSC::Heap::writeBarrierFastCase):

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::setDirtyObject):
(JSC::MarkedBlock::addressOfCardFor):
(JSC::MarkedBlock::offsetOfCards):

  • jit/JIT.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::emit_op_put_scoped_var):
(JSC::JIT::emit_op_put_global_var):
(JSC::JIT::emitWriteBarrier):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::emit_op_put_scoped_var):
(JSC::JIT::emit_op_put_global_var):

../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebCore:

Add a forwarding header, and fix an evaluation ordering
issue that shows up if you try to use write barriers.

  • ForwardingHeaders/heap/CardSet.h: Added.
  • bindings/js/JSEventListener.h:

(WebCore::JSEventListener::jsFunction):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r95681 r95865  
    683683}
    684684
    685 #if ENABLE(GGC)
    686 void Heap::writeBarrierSlowCase(const JSCell* owner, JSCell* cell)
    687 {
    688 }
    689 
    690 #else
    691 
    692 void Heap::writeBarrierSlowCase(const JSCell*, JSCell*)
    693 {
    694 }
    695 #endif
    696 
    697685} // namespace JSC
Note: See TracChangeset for help on using the changeset viewer.