Changeset 154032 in webkit for trunk/Source/JavaScriptCore/heap


Ignore:
Timestamp:
Aug 13, 2013, 5:51:25 PM (12 years ago)
Author:
[email protected]
Message:

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

Patch by Arunprasad Rajkumar <[email protected]> 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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.