Changeset 180690 in webkit


Ignore:
Timestamp:
Feb 26, 2015 11:44:08 AM (9 years ago)
Author:
mark.lam@apple.com
Message:

Rolling out r180602, r180608, r180613, r180617, r180671.
<https://webkit.org/b/141990>

Not reviewed.

The r180602 solution does result in more work for GC when worker
threads are in use. Filip is uncomfortable with that.
The EFL and GTK ports also seem to be unhappy with this change.
Rolling out while we investigate.

Source/JavaScriptCore:

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::gatherStackRoots):
(JSC::Heap::machineThreads): Deleted.

  • heap/Heap.h:

(JSC::Heap::machineThreads):

  • heap/MachineStackMarker.cpp:

(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::addCurrentThread):

  • heap/MachineStackMarker.h:
  • runtime/JSLock.cpp:

(JSC::JSLock::didAcquireLock):

Source/WebCore:

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::commonVM):

LayoutTests:

  • platform/efl/TestExpectations:
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r180689 r180690  
     12015-02-26  Mark Lam  <mark.lam@apple.com>
     2
     3        Rolling out r180602, r180608, r180613, r180617, r180671.
     4        <https://webkit.org/b/141990>
     5
     6        Not reviewed.
     7
     8        The r180602 solution does result in more work for GC when worker
     9        threads are in use.  Filip is uncomfortable with that.
     10        The EFL and GTK ports also seem to be unhappy with this change.
     11        Rolling out while we investigate.
     12
     13        * platform/efl/TestExpectations:
     14
    1152015-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
    216
  • trunk/LayoutTests/platform/efl/TestExpectations

    r180672 r180690  
    811811
    812812# Fail after r139145 on MAC, EFL, QT, GTK.
    813 # webkit.org/b/106415 fast/workers/worker-close-more.html [ Timeout ]
    814 # webkit.org/b/106415 fast/workers/worker-document-leak.html [ Pass Failure ]
    815 # webkit.org/b/106415 fast/workers/worker-lifecycle.html [ Pass Failure ]
     813webkit.org/b/106415 fast/workers/worker-close-more.html [ Timeout ]
     814webkit.org/b/106415 fast/workers/worker-document-leak.html [ Pass Failure ]
     815webkit.org/b/106415 fast/workers/worker-lifecycle.html [ Pass Failure ]
    816816
    817817webkit.org/b/124929 http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_attributes_order.html [ Failure Pass ]
     
    982982webkit.org/b/106507 storage/storagequota-query-usage.html
    983983webkit.org/b/106507 storage/storagequota-request-quota.html
    984 # webkit.org/b/106507 fast/workers/worker-storagequota-query-usage.html
     984webkit.org/b/106507 fast/workers/worker-storagequota-query-usage.html
    985985
    986986# JSC does not support setIsolatedWorldSecurityOrigin.
     
    20972097webkit.org/b/141958 http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients.html [ Failure ]
    20982098webkit.org/b/141958 http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW.html [ Failure ]
    2099 
    2100 # [EFL][GTK] REGRESSION(180602): It made fast/workers test timeout
    2101 webkit.org/b/142041 fast/workers [ Skip ]
  • trunk/Source/JavaScriptCore/ChangeLog

    r180689 r180690  
     12015-02-26  Mark Lam  <mark.lam@apple.com>
     2
     3        Rolling out r180602, r180608, r180613, r180617, r180671.
     4        <https://webkit.org/b/141990>
     5
     6        Not reviewed.
     7
     8        The r180602 solution does result in more work for GC when worker
     9        threads are in use.  Filip is uncomfortable with that.
     10        The EFL and GTK ports also seem to be unhappy with this change.
     11        Rolling out while we investigate.
     12
     13        * heap/Heap.cpp:
     14        (JSC::Heap::Heap):
     15        (JSC::Heap::gatherStackRoots):
     16        (JSC::Heap::machineThreads): Deleted.
     17        * heap/Heap.h:
     18        (JSC::Heap::machineThreads):
     19        * heap/MachineStackMarker.cpp:
     20        (JSC::MachineThreads::MachineThreads):
     21        (JSC::MachineThreads::~MachineThreads):
     22        (JSC::MachineThreads::addCurrentThread):
     23        * heap/MachineStackMarker.h:
     24        * runtime/JSLock.cpp:
     25        (JSC::JSLock::didAcquireLock):
     26
    1272015-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
    228
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r180602 r180690  
    312312    , m_storageSpace(this)
    313313    , m_extraMemoryUsage(0)
     314    , m_machineThreads(this)
    314315    , m_sharedData(vm)
    315316    , m_slotVisitor(m_sharedData)
     
    349350}
    350351
    351 MachineThreads& Heap::machineThreads()
    352 {
    353     static std::once_flag initializeMachineThreadsOnceFlag;
    354     static MachineThreads* machineThreads = nullptr;
    355 
    356     std::call_once(initializeMachineThreadsOnceFlag, [] {
    357         machineThreads = new MachineThreads();
    358     });
    359 
    360     return *machineThreads;
    361 }
    362    
    363352bool Heap::isPagedOut(double deadline)
    364353{
     
    599588    GCPHASE(GatherStackRoots);
    600589    m_jitStubRoutines.clearMarks();
    601     machineThreads().gatherConservativeRoots(roots, m_jitStubRoutines, m_codeBlocks, dummy, registers);
     590    m_machineThreads.gatherConservativeRoots(roots, m_jitStubRoutines, m_codeBlocks, dummy, registers);
    602591}
    603592
  • trunk/Source/JavaScriptCore/heap/Heap.h

    r180617 r180690  
    120120    VM* vm() const { return m_vm; }
    121121    MarkedSpace& objectSpace() { return m_objectSpace; }
    122     JS_EXPORT_PRIVATE static MachineThreads& machineThreads();
     122    MachineThreads& machineThreads() { return m_machineThreads; }
    123123
    124124    const SlotVisitor& slotVisitor() const { return m_slotVisitor; }
     
    356356    std::unique_ptr<HashSet<MarkedArgumentBuffer*>> m_markListSet;
    357357
     358    MachineThreads m_machineThreads;
     359   
    358360    GCThreadSharedData m_sharedData;
    359361    SlotVisitor m_slotVisitor;
  • trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp

    r180649 r180690  
    116116};
    117117
    118 MachineThreads::MachineThreads()
     118MachineThreads::MachineThreads(Heap* heap)
    119119    : m_registeredThreads(0)
    120120    , m_threadSpecific(0)
    121 {
     121#if !ASSERT_DISABLED
     122    , m_heap(heap)
     123#endif
     124{
     125    UNUSED_PARAM(heap);
    122126    threadSpecificKeyCreate(&m_threadSpecific, removeThread);
    123127}
    124128
    125 NO_RETURN_DUE_TO_CRASH MachineThreads::~MachineThreads()
    126 {
    127     RELEASE_ASSERT_NOT_REACHED();
     129MachineThreads::~MachineThreads()
     130{
     131    threadSpecificKeyDelete(m_threadSpecific);
     132
     133    MutexLocker registeredThreadsLock(m_registeredThreadsMutex);
     134    for (Thread* t = m_registeredThreads; t;) {
     135        Thread* next = t->next;
     136        delete t;
     137        t = next;
     138    }
    128139}
    129140
     
    150161}
    151162
    152 void MachineThreads::addCurrentThread(VM* vm)
    153 {
    154     ASSERT_UNUSED(vm, !vm->hasExclusiveThread() || vm->exclusiveThread() == std::this_thread::get_id());
     163void MachineThreads::addCurrentThread()
     164{
     165    ASSERT(!m_heap->vm()->hasExclusiveThread() || m_heap->vm()->exclusiveThread() == std::this_thread::get_id());
    155166
    156167    if (threadSpecificGet(m_threadSpecific)) {
  • trunk/Source/JavaScriptCore/heap/MachineStackMarker.h

    r180613 r180690  
    3434    class Heap;
    3535    class JITStubRoutineSet;
    36     class VM;
    3736
    3837    class MachineThreads {
     
    4140        typedef jmp_buf RegisterState;
    4241
    43         MachineThreads();
    44         NO_RETURN_DUE_TO_CRASH ~MachineThreads();
     42        MachineThreads(Heap*);
     43        ~MachineThreads();
    4544
    4645        void gatherConservativeRoots(ConservativeRoots&, JITStubRoutineSet&, CodeBlockSet&, void* stackCurrent, RegisterState& registers);
    4746
    48         JS_EXPORT_PRIVATE void addCurrentThread(VM*); // Only needs to be called by clients that can use the same heap from multiple threads.
     47        JS_EXPORT_PRIVATE void addCurrentThread(); // Only needs to be called by clients that can use the same heap from multiple threads.
    4948
    5049    private:
     
    6261        Thread* m_registeredThreads;
    6362        WTF::ThreadSpecificKey m_threadSpecific;
     63#if !ASSERT_DISABLED
     64        Heap* m_heap;
     65#endif
    6466    };
    6567
  • trunk/Source/JavaScriptCore/runtime/JSLock.cpp

    r180602 r180690  
    145145    ASSERT(m_entryAtomicStringTable);
    146146
    147     m_vm->heap.machineThreads().addCurrentThread(m_vm);
     147    m_vm->heap.machineThreads().addCurrentThread();
    148148}
    149149
  • trunk/Source/WebCore/ChangeLog

    r180689 r180690  
     12015-02-26  Mark Lam  <mark.lam@apple.com>
     2
     3        Rolling out r180602, r180608, r180613, r180617, r180671.
     4        <https://webkit.org/b/141990>
     5
     6        Not reviewed.
     7
     8        The r180602 solution does result in more work for GC when worker
     9        threads are in use.  Filip is uncomfortable with that.
     10        The EFL and GTK ports also seem to be unhappy with this change.
     11        Rolling out while we investigate.
     12
     13        * bindings/js/JSDOMWindowBase.cpp:
     14        (WebCore::JSDOMWindowBase::commonVM):
     15
    1162015-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
    217
  • trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp

    r180608 r180690  
    213213#endif
    214214        vm->heap.setIncrementalSweeper(std::make_unique<WebSafeIncrementalSweeper>(&vm->heap));
    215         vm->heap.machineThreads().addCurrentThread(vm);
     215        vm->heap.machineThreads().addCurrentThread();
    216216#endif
    217217        initNormalWorldClientData(vm);
Note: See TracChangeset for help on using the changeset viewer.