[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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 959c6db7
2013-08-13 Arunprasad Rajkumar <arurajku@cisco.com>
[WTF] [JSC] Replace currentTime() with monotonicallyIncreasingTime() in all possible places
https://bugs.webkit.org/show_bug.cgi?id=119762
Reviewed by Geoffrey Garen.
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::markRoots):
(JSC::Heap::collect):
* jsc.cpp:
(StopWatch::start):
(StopWatch::stop):
* testRegExp.cpp:
(StopWatch::start):
(StopWatch::stop):
2013-08-13 Julien Brianceau <jbrianceau@nds.com>
[sh4] Prepare LLINT for DFG_JIT implementation.
......
......@@ -90,12 +90,12 @@ struct GCTimer {
struct GCTimerScope {
GCTimerScope(GCTimer* timer)
: m_timer(timer)
, m_start(WTF::currentTime())
, m_start(WTF::monotonicallyIncreasingTime())
{
}
~GCTimerScope()
{
double delta = WTF::currentTime() - m_start;
double delta = WTF::monotonicallyIncreasingTime() - m_start;
if (delta < m_timer->m_min)
m_timer->m_min = delta;
if (delta > m_timer->m_max)
......@@ -263,7 +263,7 @@ Heap::Heap(VM* vm, HeapType heapType)
, m_isSafeToCollect(false)
, m_vm(vm)
, m_lastGCLength(0)
, m_lastCodeDiscardTime(WTF::currentTime())
, m_lastCodeDiscardTime(WTF::monotonicallyIncreasingTime())
, m_activityCallback(DefaultGCActivityCallback::create(this))
, m_sweeper(IncrementalSweeper::create(this))
, m_deferralDepth(0)
......@@ -433,7 +433,7 @@ void Heap::markRoots()
ASSERT(isValidThreadState(m_vm));
#if ENABLE(OBJECT_MARK_LOGGING)
double gcStartTime = WTF::currentTime();
double gcStartTime = WTF::monotonicallyIncreasingTime();
#endif
void* dummy;
......@@ -590,7 +590,7 @@ void Heap::markRoots()
#if ENABLE(PARALLEL_GC)
visitCount += m_sharedData.childVisitCount();
#endif
MARK_LOG_MESSAGE2("\nNumber of live Objects after full GC %lu, took %.6f secs\n", visitCount, WTF::currentTime() - gcStartTime);
MARK_LOG_MESSAGE2("\nNumber of live Objects after full GC %lu, took %.6f secs\n", visitCount, WTF::monotonicallyIncreasingTime() - gcStartTime);
#endif
visitor.reset();
......@@ -726,10 +726,10 @@ void Heap::collect(SweepToggle sweepToggle)
m_activityCallback->willCollect();
double lastGCStartTime = WTF::currentTime();
double lastGCStartTime = WTF::monotonicallyIncreasingTime();
if (lastGCStartTime - m_lastCodeDiscardTime > minute) {
deleteAllCompiledCode();
m_lastCodeDiscardTime = WTF::currentTime();
m_lastCodeDiscardTime = WTF::monotonicallyIncreasingTime();
}
{
......@@ -797,7 +797,7 @@ void Heap::collect(SweepToggle sweepToggle)
m_bytesAllocatedLimit = maxHeapSize - currentHeapSize;
m_bytesAllocated = 0;
double lastGCEndTime = WTF::currentTime();
double lastGCEndTime = WTF::monotonicallyIncreasingTime();
m_lastGCLength = lastGCEndTime - lastGCStartTime;
if (Options::recordGCPauseTimes())
......
......@@ -171,12 +171,12 @@ private:
void StopWatch::start()
{
m_startTime = currentTime();
m_startTime = monotonicallyIncreasingTime();
}
void StopWatch::stop()
{
m_stopTime = currentTime();
m_stopTime = monotonicallyIncreasingTime();
}
long StopWatch::getElapsedMS()
......
......@@ -82,12 +82,12 @@ private:
void StopWatch::start()
{
m_startTime = currentTime();
m_startTime = monotonicallyIncreasingTime();
}
void StopWatch::stop()
{
m_stopTime = currentTime();
m_stopTime = monotonicallyIncreasingTime();
}
long StopWatch::getElapsedMS()
......
2013-08-13 Arunprasad Rajkumar <arurajku@cisco.com>
[WTF] [JSC] Replace currentTime() with monotonicallyIncreasingTime() in all possible places
https://bugs.webkit.org/show_bug.cgi?id=119762
Reviewed by Geoffrey Garen.
* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):
2013-08-12 Ragner Magalhaes <ranger.n@samsung.com>
Broken build with build-webkit --no-webgl
......
......@@ -141,7 +141,7 @@ void dispatchFunctionsFromMainThread()
if (callbacksPaused)
return;
double startTime = currentTime();
double startTime = monotonicallyIncreasingTime();
FunctionWithContext invocation;
while (true) {
......@@ -162,7 +162,7 @@ void dispatchFunctionsFromMainThread()
// yield so the user input can be processed. Otherwise user may not be able to even close the window.
// This code has effect only in case the scheduleDispatchFunctionsOnMainThread() is implemented in a way that
// allows input events to be processed before we are back here.
if (currentTime() - startTime > maxRunLoopSuspensionTime) {
if (monotonicallyIncreasingTime() - startTime > maxRunLoopSuspensionTime) {
scheduleDispatchFunctionsOnMainThread();
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment