Ignore:
Timestamp:
Apr 23, 2017, 2:12:44 AM (8 years ago)
Author:
Yusuke Suzuki
Message:

[JSC] Use DoublyLinkedList for MachineThread
https://bugs.webkit.org/show_bug.cgi?id=171171

Reviewed by Mark Lam.

MachineThread can use WTF::DoublyLinkedList to simplify
its implementation. We should not use Vector<> etc. since
we do not want to call allocations during suspending and
resuming threads.

  • heap/MachineStackMarker.cpp:

(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::removeThreadIfFound):
(JSC::MachineThreads::MachineThread::MachineThread):
(JSC::MachineThreads::tryCopyOtherThreadStacks):

  • heap/MachineStackMarker.h:

(JSC::MachineThreads::threadsListHead):

  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::isValidFramePointer):

  • runtime/VMTraps.cpp:

(JSC::findActiveVMAndStackBounds):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/VMTraps.cpp

    r215638 r215671  
    111111        }
    112112
    113         for (MachineThreads::MachineThread* thread = machineThreads.threadsListHead(machineThreadsLocker); thread; thread = thread->next) {
     113        const auto& threadList = machineThreads.threadsListHead(machineThreadsLocker);
     114        for (MachineThreads::MachineThread* thread = threadList.head(); thread; thread = thread->next()) {
    114115            RELEASE_ASSERT(thread->stackBase());
    115116            RELEASE_ASSERT(thread->stackEnd());
Note: See TracChangeset for help on using the changeset viewer.