JavaScriptCore:
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Mar 2008 18:55:02 +0000 (18:55 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Mar 2008 18:55:02 +0000 (18:55 +0000)
commit868544dcb21235cb8d2900a70ddf0ce444cdbb1b
tree49123089ccdd1c58aa5269fa9e2eb39b9256d623
parent242548235afab37ec829a2b411a3e8bdae1d9b97
JavaScriptCore:

        Reviewed by Darin

        Add a timedWait() method to ThreadCondition

        * JavaScriptCore.exp:

        * wtf/Threading.h:

        * wtf/ThreadingGtk.cpp:
        (WTF::ThreadCondition::timedWait):

        * wtf/ThreadingNone.cpp:
        (WTF::ThreadCondition::timedWait):

        * wtf/ThreadingPthreads.cpp:
        (WTF::ThreadCondition::timedWait):

        * wtf/ThreadingWin.cpp:
        (WTF::ThreadCondition::timedWait): Needs implementation

WebKitTools:

        Reviewed by Darin

        Added a cross-platform Watchdog thread to DRT.

        The current watchdog in both DRTWin and DRTMac is Timer based.  Therefore, deadlocks and long running
        main thread hangs still affect DRT.

        By placing the watchdog on a thread and having DRT "check in" after each test, long-running hangs
        and true deadlocks can be caught.

        There is one hook for platform specific code.  As I did my development and testing on Mac, and Mac has
        `sample` available, the Mac implementation of this hook samples the process before it is killed.

        I arbitrarily chose 30 seconds as the timeout for now - this can be tweaked easily if we find a need.

        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
        * DumpRenderTree/mac/Configurations/Base.xcconfig: Added LINKER_DISPLAYS_MANGLED_NAMES

        * DumpRenderTree/ForwardingHeaders/wtf/Locker.h: Added.
        * DumpRenderTree/ForwardingHeaders/wtf/Threading.h: Added.

        * DumpRenderTree/Watchdog.cpp: Added.
        (Watchdog::Watchdog):
        (Watchdog::~Watchdog):
        (Watchdog::start):
        (Watchdog::stop):
        (Watchdog::checkIn):
        (Watchdog::setWatchdogInterval):
        (Watchdog::handleHang):
        (Watchdog::watchdogThreadStart):
        (Watchdog::watchdogThread):
        * DumpRenderTree/Watchdog.h: Added.

        * DumpRenderTree/mac/WatchdogMac.h: Added.
        * DumpRenderTree/mac/WatchdogMac.mm: Added.
        (WatchdogMac::handleHang): Sample the process and write it out to a file

        * DumpRenderTree/mac/DumpRenderTree.mm:
        (dumpRenderTree): Setup and start the watchdog before running any tests
        (runTest): Checkin with the watchdog after each test

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/wtf/Threading.h
JavaScriptCore/wtf/ThreadingGtk.cpp
JavaScriptCore/wtf/ThreadingNone.cpp
JavaScriptCore/wtf/ThreadingPthreads.cpp
JavaScriptCore/wtf/ThreadingWin.cpp
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Locker.h [new file with mode: 0644]
WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Threading.h [new file with mode: 0644]
WebKitTools/DumpRenderTree/Watchdog.cpp [new file with mode: 0644]
WebKitTools/DumpRenderTree/Watchdog.h [new file with mode: 0644]
WebKitTools/DumpRenderTree/mac/Configurations/Base.xcconfig
WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
WebKitTools/DumpRenderTree/mac/WatchdogMac.h [new file with mode: 0644]
WebKitTools/DumpRenderTree/mac/WatchdogMac.mm [new file with mode: 0644]