Modified: trunk/Source/WebKit/UIProcess/API/glib/IconDatabase.cpp (228978 => 228979)
--- trunk/Source/WebKit/UIProcess/API/glib/IconDatabase.cpp 2018-02-25 19:02:15 UTC (rev 228978)
+++ trunk/Source/WebKit/UIProcess/API/glib/IconDatabase.cpp 2018-02-25 19:37:35 UTC (rev 228979)
@@ -863,7 +863,7 @@
LOG(IconDatabase, "(THREAD) IconDatabase sync thread started");
#if !LOG_DISABLED
- double startTime = monotonicallyIncreasingTime();
+ MonotonicTime startTime = MonotonicTime::now();
#endif
// Need to create the database path if it doesn't already exist
@@ -889,8 +889,9 @@
}
#if !LOG_DISABLED
- double timeStamp = monotonicallyIncreasingTime();
- LOG(IconDatabase, "(THREAD) Open took %.4f seconds", timeStamp - startTime);
+ MonotonicTime timeStamp = MonotonicTime::now();
+ Seconds delta = timeStamp - startTime;
+ LOG(IconDatabase, "(THREAD) Open took %.4f seconds", delta.value());
#endif
performOpenInitialization();
@@ -900,8 +901,10 @@
}
#if !LOG_DISABLED
- double newStamp = monotonicallyIncreasingTime();
- LOG(IconDatabase, "(THREAD) performOpenInitialization() took %.4f seconds, now %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime);
+ MonotonicTime newStamp = MonotonicTime::now();
+ Seconds totalDelta = newStamp - startTime;
+ delta = newStamp - timeStamp;
+ LOG(IconDatabase, "(THREAD) performOpenInitialization() took %.4f seconds, now %.4f seconds from thread start", delta.value(), totalDelta.value());
timeStamp = newStamp;
#endif
@@ -918,8 +921,10 @@
}
#if !LOG_DISABLED
- newStamp = monotonicallyIncreasingTime();
- LOG(IconDatabase, "(THREAD) performURLImport() took %.4f seconds. Entering main loop %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime);
+ newStamp = MonotonicTime::now();
+ totalDelta = newStamp - startTime;
+ delta = newStamp - timeStamp;
+ LOG(IconDatabase, "(THREAD) performURLImport() took %.4f seconds. Entering main loop %.4f seconds from thread start", delta.value(), totalDelta.value());
#endif
LOG(IconDatabase, "(THREAD) Beginning sync");
@@ -1225,7 +1230,7 @@
m_syncLock.unlock();
#if !LOG_DISABLED
- double timeStamp = monotonicallyIncreasingTime();
+ MonotonicTime timeStamp = MonotonicTime::now();
#endif
LOG(IconDatabase, "(THREAD) Main work loop starting");
@@ -1265,13 +1270,16 @@
static bool prunedUnretainedIcons = false;
if (didWrite && !m_privateBrowsingEnabled && !prunedUnretainedIcons && !databaseCleanupCounter) {
#if !LOG_DISABLED
- double time = monotonicallyIncreasingTime();
+ MonotonicTime time = MonotonicTime::now();
#endif
LOG(IconDatabase, "(THREAD) Starting pruneUnretainedIcons()");
pruneUnretainedIcons();
- LOG(IconDatabase, "(THREAD) pruneUnretainedIcons() took %.4f seconds", monotonicallyIncreasingTime() - time);
+#if !LOG_DISABLED
+ Seconds delta = MonotonicTime::now() - time;
+#endif
+ LOG(IconDatabase, "(THREAD) pruneUnretainedIcons() took %.4f seconds", delta.value());
// If pruneUnretainedIcons() returned early due to requested thread termination, its still okay
// to mark prunedUnretainedIcons true because we're about to terminate anyway
@@ -1284,8 +1292,9 @@
}
#if !LOG_DISABLED
- double newstamp = monotonicallyIncreasingTime();
- LOG(IconDatabase, "(THREAD) Main work loop ran for %.4f seconds, %s requested to terminate", newstamp - timeStamp, shouldStopThreadActivity() ? "was" : "was not");
+ MonotonicTime newstamp = MonotonicTime::now();
+ Seconds delta = newstamp - timeStamp;
+ LOG(IconDatabase, "(THREAD) Main work loop ran for %.4f seconds, %s requested to terminate", delta.value(), shouldStopThreadActivity() ? "was" : "was not");
#endif
m_syncLock.lock();
@@ -1345,7 +1354,7 @@
ASSERT_ICON_SYNC_THREAD();
#if !LOG_DISABLED
- double timeStamp = monotonicallyIncreasingTime();
+ MonotonicTime timeStamp = MonotonicTime::now();
#endif
bool didAnyWork = false;
@@ -1432,7 +1441,10 @@
return didAnyWork;
}
- LOG(IconDatabase, "Reading from database took %.4f seconds", monotonicallyIncreasingTime() - timeStamp);
+#if !LOG_DISABLED
+ Seconds delta = MonotonicTime::now() - timeStamp;
+ LOG(IconDatabase, "Reading from database took %.4f seconds", delta.value());
+#endif
return didAnyWork;
}
@@ -1442,7 +1454,7 @@
ASSERT_ICON_SYNC_THREAD();
#if !LOG_DISABLED
- double timeStamp = monotonicallyIncreasingTime();
+ MonotonicTime timeStamp = MonotonicTime::now();
#endif
bool didAnyWork = false;
@@ -1492,7 +1504,10 @@
if (didAnyWork)
checkForDanglingPageURLs(false);
- LOG(IconDatabase, "Updating the database took %.4f seconds", monotonicallyIncreasingTime() - timeStamp);
+#if !LOG_DISABLED
+ Seconds delta = MonotonicTime::now() - timeStamp;
+ LOG(IconDatabase, "Updating the database took %.4f seconds", delta.value());
+#endif
return didAnyWork;
}
@@ -1636,7 +1651,7 @@
ASSERT_ICON_SYNC_THREAD();
#if !LOG_DISABLED
- double timeStamp = monotonicallyIncreasingTime();
+ MonotonicTime timeStamp = MonotonicTime::now();
#endif
// If the removeIcons flag is set, remove all icons from the db.
@@ -1656,7 +1671,8 @@
m_syncDB.close();
#if !LOG_DISABLED
- LOG(IconDatabase, "(THREAD) Final closure took %.4f seconds", monotonicallyIncreasingTime() - timeStamp);
+ Seconds delta = MonotonicTime::now() - timeStamp;
+ LOG(IconDatabase, "(THREAD) Final closure took %.4f seconds", delta.value());
#endif
m_syncThreadRunning = false;