Changeset 154032 in webkit


Ignore:
Timestamp:
Aug 13, 2013 5:51:25 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[WTF] [JSC] Replace currentTime() with monotonicallyIncreasingTime() in all possible places
https://bugs.webkit.org/show_bug.cgi?id=119762

Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-13
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::markRoots):
(JSC::Heap::collect):

  • jsc.cpp:

(StopWatch::start):
(StopWatch::stop):

  • testRegExp.cpp:

(StopWatch::start):
(StopWatch::stop):

Source/WTF:

  • wtf/MainThread.cpp:

(WTF::dispatchFunctionsFromMainThread):

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r154025 r154032  
     12013-08-13  Arunprasad Rajkumar  <arurajku@cisco.com>
     2
     3        [WTF] [JSC] Replace currentTime() with monotonicallyIncreasingTime() in all possible places
     4        https://bugs.webkit.org/show_bug.cgi?id=119762
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * heap/Heap.cpp:
     9        (JSC::Heap::Heap):
     10        (JSC::Heap::markRoots):
     11        (JSC::Heap::collect):
     12        * jsc.cpp:
     13        (StopWatch::start):
     14        (StopWatch::stop):
     15        * testRegExp.cpp:
     16        (StopWatch::start):
     17        (StopWatch::stop):
     18
    1192013-08-13  Julien Brianceau  <jbrianceau@nds.com>
    220
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r153357 r154032  
    9191    GCTimerScope(GCTimer* timer)
    9292        : m_timer(timer)
    93         , m_start(WTF::currentTime())
     93        , m_start(WTF::monotonicallyIncreasingTime())
    9494    {
    9595    }
    9696    ~GCTimerScope()
    9797    {
    98         double delta = WTF::currentTime() - m_start;
     98        double delta = WTF::monotonicallyIncreasingTime() - m_start;
    9999        if (delta < m_timer->m_min)
    100100            m_timer->m_min = delta;
     
    264264    , m_vm(vm)
    265265    , m_lastGCLength(0)
    266     , m_lastCodeDiscardTime(WTF::currentTime())
     266    , m_lastCodeDiscardTime(WTF::monotonicallyIncreasingTime())
    267267    , m_activityCallback(DefaultGCActivityCallback::create(this))
    268268    , m_sweeper(IncrementalSweeper::create(this))
     
    434434
    435435#if ENABLE(OBJECT_MARK_LOGGING)
    436     double gcStartTime = WTF::currentTime();
     436    double gcStartTime = WTF::monotonicallyIncreasingTime();
    437437#endif
    438438
     
    591591    visitCount += m_sharedData.childVisitCount();
    592592#endif
    593     MARK_LOG_MESSAGE2("\nNumber of live Objects after full GC %lu, took %.6f secs\n", visitCount, WTF::currentTime() - gcStartTime);
     593    MARK_LOG_MESSAGE2("\nNumber of live Objects after full GC %lu, took %.6f secs\n", visitCount, WTF::monotonicallyIncreasingTime() - gcStartTime);
    594594#endif
    595595
     
    727727    m_activityCallback->willCollect();
    728728
    729     double lastGCStartTime = WTF::currentTime();
     729    double lastGCStartTime = WTF::monotonicallyIncreasingTime();
    730730    if (lastGCStartTime - m_lastCodeDiscardTime > minute) {
    731731        deleteAllCompiledCode();
    732         m_lastCodeDiscardTime = WTF::currentTime();
     732        m_lastCodeDiscardTime = WTF::monotonicallyIncreasingTime();
    733733    }
    734734
     
    798798
    799799    m_bytesAllocated = 0;
    800     double lastGCEndTime = WTF::currentTime();
     800    double lastGCEndTime = WTF::monotonicallyIncreasingTime();
    801801    m_lastGCLength = lastGCEndTime - lastGCStartTime;
    802802
  • trunk/Source/JavaScriptCore/jsc.cpp

    r153218 r154032  
    172172void StopWatch::start()
    173173{
    174     m_startTime = currentTime();
     174    m_startTime = monotonicallyIncreasingTime();
    175175}
    176176
    177177void StopWatch::stop()
    178178{
    179     m_stopTime = currentTime();
     179    m_stopTime = monotonicallyIncreasingTime();
    180180}
    181181
  • trunk/Source/JavaScriptCore/testRegExp.cpp

    r148696 r154032  
    8383void StopWatch::start()
    8484{
    85     m_startTime = currentTime();
     85    m_startTime = monotonicallyIncreasingTime();
    8686}
    8787
    8888void StopWatch::stop()
    8989{
    90     m_stopTime = currentTime();
     90    m_stopTime = monotonicallyIncreasingTime();
    9191}
    9292
  • trunk/Source/WTF/ChangeLog

    r153951 r154032  
     12013-08-13  Arunprasad Rajkumar  <arurajku@cisco.com>
     2
     3        [WTF] [JSC] Replace currentTime() with monotonicallyIncreasingTime() in all possible places
     4        https://bugs.webkit.org/show_bug.cgi?id=119762
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * wtf/MainThread.cpp:
     9        (WTF::dispatchFunctionsFromMainThread):
     10
    1112013-08-12  Ragner Magalhaes  <ranger.n@samsung.com>
    212
  • trunk/Source/WTF/wtf/MainThread.cpp

    r147755 r154032  
    142142        return;
    143143
    144     double startTime = currentTime();
     144    double startTime = monotonicallyIncreasingTime();
    145145
    146146    FunctionWithContext invocation;
     
    163163        // This code has effect only in case the scheduleDispatchFunctionsOnMainThread() is implemented in a way that
    164164        // allows input events to be processed before we are back here.
    165         if (currentTime() - startTime > maxRunLoopSuspensionTime) {
     165        if (monotonicallyIncreasingTime() - startTime > maxRunLoopSuspensionTime) {
    166166            scheduleDispatchFunctionsOnMainThread();
    167167            break;
Note: See TracChangeset for help on using the changeset viewer.