Ignore:
Timestamp:
Feb 15, 2018, 2:34:16 PM (7 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/testRegExp.cpp

    r225930 r228533  
    7171
    7272private:
    73     double m_startTime;
    74     double m_stopTime;
     73    MonotonicTime m_startTime;
     74    MonotonicTime m_stopTime;
    7575};
    7676
    7777void StopWatch::start()
    7878{
    79     m_startTime = monotonicallyIncreasingTime();
     79    m_startTime = MonotonicTime::now();
    8080}
    8181
    8282void StopWatch::stop()
    8383{
    84     m_stopTime = monotonicallyIncreasingTime();
     84    m_stopTime = MonotonicTime::now();
    8585}
    8686
    8787long StopWatch::getElapsedMS()
    8888{
    89     return static_cast<long>((m_stopTime - m_startTime) * 1000);
     89    return (m_stopTime - m_startTime).millisecondsAs<long>();
    9090}
    9191
Note: See TracChangeset for help on using the changeset viewer.