Ignore:
Timestamp:
Feb 15, 2018, 2:34:16 PM (8 years ago)
Author:
Yusuke Suzuki
Message:

[JSC] Remove monotonicallyIncreasingTime and currentTime
https://bugs.webkit.org/show_bug.cgi?id=182793

Reviewed by Saam Barati.

We would like to drop monotonicallyIncreasingTime and currentTime from our tree by
replacing them with MonotonicTime and WallTime, which are well-typed alternatives,
compared to double.
This patch removes monotonicallyIncreasingTime and currentTime in JSC.

  • b3/testb3.cpp:

(JSC::B3::testComplex):

  • dfg/DFGPhase.h:

(JSC::DFG::runAndLog):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThread):
(JSC::DFG::Plan::compileInThreadImpl):

  • dfg/DFGPlan.h:
  • dynbench.cpp:

(JSC::benchmarkImpl):

  • heap/BlockDirectory.cpp:

(JSC::BlockDirectory::isPagedOut):

  • heap/BlockDirectory.h:
  • heap/FullGCActivityCallback.cpp:

(JSC::FullGCActivityCallback::doCollection):

  • heap/Heap.cpp:

(JSC::Heap::isPagedOut):
(JSC::Heap::sweepSynchronously):

  • heap/Heap.h:
  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::isPagedOut):

  • heap/MarkedSpace.h:
  • inspector/agents/InspectorConsoleAgent.cpp:

(Inspector::InspectorConsoleAgent::startTiming):
(Inspector::InspectorConsoleAgent::stopTiming):

  • inspector/agents/InspectorConsoleAgent.h:
  • inspector/agents/InspectorRuntimeAgent.cpp:

(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):

  • jit/JIT.cpp:

(JSC::JIT::compileWithoutLinking):
(JSC::JIT::compileTimeStats):

  • jit/JIT.h:
  • jsc.cpp:

(StopWatch::start):
(StopWatch::stop):
(StopWatch::getElapsedMS):
(functionPreciseTime):
(runJSC):

  • profiler/ProfilerDatabase.cpp:

(JSC::Profiler::Database::logEvent):

  • profiler/ProfilerEvent.cpp:

(JSC::Profiler::Event::toJS const):

  • profiler/ProfilerEvent.h:

(JSC::Profiler::Event::Event):
(JSC::Profiler::Event::time const):

  • runtime/CodeCache.cpp:

(JSC::CodeCacheMap::pruneSlowCase):

  • runtime/CodeCache.h:

(JSC::CodeCacheMap::CodeCacheMap):
(JSC::CodeCacheMap::prune):

  • runtime/DateConstructor.cpp:

(JSC::callDate):

  • runtime/TypeProfilerLog.cpp:

(JSC::TypeProfilerLog::processLogEntries):

  • testRegExp.cpp:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/CodeCache.h

    r218794 r228533  
    8484        : m_size(0)
    8585        , m_sizeAtLastPrune(0)
    86         , m_timeAtLastPrune(monotonicallyIncreasingTime())
     86        , m_timeAtLastPrune(MonotonicTime::now())
    8787        , m_minCapacity(0)
    8888        , m_capacity(0)
     
    150150    // This constant factor biases cache capacity toward allowing a minimum
    151151    // working set to enter the cache before it starts evicting.
    152     static const double workingSetTime;
     152    static const Seconds workingSetTime;
    153153    static const int64_t workingSetMaxBytes = 16000000;
    154154    static const size_t workingSetMaxEntries = 2000;
     
    172172            return;
    173173
    174         if (monotonicallyIncreasingTime() - m_timeAtLastPrune < workingSetTime
     174        if (MonotonicTime::now() - m_timeAtLastPrune < workingSetTime
    175175            && m_size - m_sizeAtLastPrune < workingSetMaxBytes
    176176            && canPruneQuickly())
     
    183183    int64_t m_size;
    184184    int64_t m_sizeAtLastPrune;
    185     double m_timeAtLastPrune;
     185    MonotonicTime m_timeAtLastPrune;
    186186    int64_t m_minCapacity;
    187187    int64_t m_capacity;
Note: See TracChangeset for help on using the changeset viewer.