|
Lines 989-995
void IconDatabase::iconDatabaseSyncThread()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec1
|
| 989 |
LOG(IconDatabase, "(THREAD) IconDatabase sync thread started"); |
989 |
LOG(IconDatabase, "(THREAD) IconDatabase sync thread started"); |
| 990 |
|
990 |
|
| 991 |
#if !LOG_DISABLED |
991 |
#if !LOG_DISABLED |
| 992 |
double startTime = currentTime(); |
992 |
double startTime = monotonicallyIncreasingTime(); |
| 993 |
#endif |
993 |
#endif |
| 994 |
|
994 |
|
| 995 |
// Need to create the database path if it doesn't already exist |
995 |
// Need to create the database path if it doesn't already exist |
|
Lines 1017-1023
void IconDatabase::iconDatabaseSyncThread()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec2
|
| 1017 |
} |
1017 |
} |
| 1018 |
|
1018 |
|
| 1019 |
#if !LOG_DISABLED |
1019 |
#if !LOG_DISABLED |
| 1020 |
double timeStamp = currentTime(); |
1020 |
double timeStamp = monotonicallyIncreasingTime(); |
| 1021 |
LOG(IconDatabase, "(THREAD) Open took %.4f seconds", timeStamp - startTime); |
1021 |
LOG(IconDatabase, "(THREAD) Open took %.4f seconds", timeStamp - startTime); |
| 1022 |
#endif |
1022 |
#endif |
| 1023 |
|
1023 |
|
|
Lines 1028-1040
void IconDatabase::iconDatabaseSyncThread()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec3
|
| 1028 |
} |
1028 |
} |
| 1029 |
|
1029 |
|
| 1030 |
#if !LOG_DISABLED |
1030 |
#if !LOG_DISABLED |
| 1031 |
double newStamp = currentTime(); |
1031 |
double newStamp = monotonicallyIncreasingTime(); |
| 1032 |
LOG(IconDatabase, "(THREAD) performOpenInitialization() took %.4f seconds, now %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime); |
1032 |
LOG(IconDatabase, "(THREAD) performOpenInitialization() took %.4f seconds, now %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime); |
| 1033 |
timeStamp = newStamp; |
1033 |
timeStamp = newStamp; |
| 1034 |
#endif |
1034 |
#endif |
| 1035 |
|
1035 |
|
| 1036 |
// Uncomment the following line to simulate a long lasting URL import (*HUGE* icon databases, or network home directories) |
1036 |
// Uncomment the following line to simulate a long lasting URL import (*HUGE* icon databases, or network home directories) |
| 1037 |
// while (currentTime() - timeStamp < 10); |
1037 |
// while (monotonicallyIncreasingTime() - timeStamp < 10); |
| 1038 |
|
1038 |
|
| 1039 |
// Read in URL mappings from the database |
1039 |
// Read in URL mappings from the database |
| 1040 |
LOG(IconDatabase, "(THREAD) Starting iconURL import"); |
1040 |
LOG(IconDatabase, "(THREAD) Starting iconURL import"); |
|
Lines 1046-1052
void IconDatabase::iconDatabaseSyncThread()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec4
|
| 1046 |
} |
1046 |
} |
| 1047 |
|
1047 |
|
| 1048 |
#if !LOG_DISABLED |
1048 |
#if !LOG_DISABLED |
| 1049 |
newStamp = currentTime(); |
1049 |
newStamp = monotonicallyIncreasingTime(); |
| 1050 |
LOG(IconDatabase, "(THREAD) performURLImport() took %.4f seconds. Entering main loop %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime); |
1050 |
LOG(IconDatabase, "(THREAD) performURLImport() took %.4f seconds. Entering main loop %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime); |
| 1051 |
#endif |
1051 |
#endif |
| 1052 |
|
1052 |
|
|
Lines 1374-1380
void IconDatabase::syncThreadMainLoop()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec5
|
| 1374 |
m_syncLock.unlock(); |
1374 |
m_syncLock.unlock(); |
| 1375 |
|
1375 |
|
| 1376 |
#if !LOG_DISABLED |
1376 |
#if !LOG_DISABLED |
| 1377 |
double timeStamp = currentTime(); |
1377 |
double timeStamp = monotonicallyIncreasingTime(); |
| 1378 |
#endif |
1378 |
#endif |
| 1379 |
LOG(IconDatabase, "(THREAD) Main work loop starting"); |
1379 |
LOG(IconDatabase, "(THREAD) Main work loop starting"); |
| 1380 |
|
1380 |
|
|
Lines 1412-1424
void IconDatabase::syncThreadMainLoop()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec6
|
| 1412 |
static bool prunedUnretainedIcons = false; |
1412 |
static bool prunedUnretainedIcons = false; |
| 1413 |
if (didWrite && !m_privateBrowsingEnabled && !prunedUnretainedIcons && !databaseCleanupCounter) { |
1413 |
if (didWrite && !m_privateBrowsingEnabled && !prunedUnretainedIcons && !databaseCleanupCounter) { |
| 1414 |
#if !LOG_DISABLED |
1414 |
#if !LOG_DISABLED |
| 1415 |
double time = currentTime(); |
1415 |
double time = monotonicallyIncreasingTime(); |
| 1416 |
#endif |
1416 |
#endif |
| 1417 |
LOG(IconDatabase, "(THREAD) Starting pruneUnretainedIcons()"); |
1417 |
LOG(IconDatabase, "(THREAD) Starting pruneUnretainedIcons()"); |
| 1418 |
|
1418 |
|
| 1419 |
pruneUnretainedIcons(); |
1419 |
pruneUnretainedIcons(); |
| 1420 |
|
1420 |
|
| 1421 |
LOG(IconDatabase, "(THREAD) pruneUnretainedIcons() took %.4f seconds", currentTime() - time); |
1421 |
LOG(IconDatabase, "(THREAD) pruneUnretainedIcons() took %.4f seconds", monotonicallyIncreasingTime() - time); |
| 1422 |
|
1422 |
|
| 1423 |
// If pruneUnretainedIcons() returned early due to requested thread termination, its still okay |
1423 |
// If pruneUnretainedIcons() returned early due to requested thread termination, its still okay |
| 1424 |
// to mark prunedUnretainedIcons true because we're about to terminate anyway |
1424 |
// to mark prunedUnretainedIcons true because we're about to terminate anyway |
|
Lines 1431-1437
void IconDatabase::syncThreadMainLoop()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec7
|
| 1431 |
} |
1431 |
} |
| 1432 |
|
1432 |
|
| 1433 |
#if !LOG_DISABLED |
1433 |
#if !LOG_DISABLED |
| 1434 |
double newstamp = currentTime(); |
1434 |
double newstamp = monotonicallyIncreasingTime(); |
| 1435 |
LOG(IconDatabase, "(THREAD) Main work loop ran for %.4f seconds, %s requested to terminate", newstamp - timeStamp, shouldStopThreadActivity() ? "was" : "was not"); |
1435 |
LOG(IconDatabase, "(THREAD) Main work loop ran for %.4f seconds, %s requested to terminate", newstamp - timeStamp, shouldStopThreadActivity() ? "was" : "was not"); |
| 1436 |
#endif |
1436 |
#endif |
| 1437 |
|
1437 |
|
|
Lines 1513-1519
bool IconDatabase::readFromDatabase()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec8
|
| 1513 |
ASSERT_ICON_SYNC_THREAD(); |
1513 |
ASSERT_ICON_SYNC_THREAD(); |
| 1514 |
|
1514 |
|
| 1515 |
#if !LOG_DISABLED |
1515 |
#if !LOG_DISABLED |
| 1516 |
double timeStamp = currentTime(); |
1516 |
double timeStamp = monotonicallyIncreasingTime(); |
| 1517 |
#endif |
1517 |
#endif |
| 1518 |
|
1518 |
|
| 1519 |
bool didAnyWork = false; |
1519 |
bool didAnyWork = false; |
|
Lines 1607-1613
bool IconDatabase::readFromDatabase()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec9
|
| 1607 |
return didAnyWork; |
1607 |
return didAnyWork; |
| 1608 |
} |
1608 |
} |
| 1609 |
|
1609 |
|
| 1610 |
LOG(IconDatabase, "Reading from database took %.4f seconds", currentTime() - timeStamp); |
1610 |
LOG(IconDatabase, "Reading from database took %.4f seconds", monotonicallyIncreasingTime() - timeStamp); |
| 1611 |
|
1611 |
|
| 1612 |
return didAnyWork; |
1612 |
return didAnyWork; |
| 1613 |
} |
1613 |
} |
|
Lines 1617-1623
bool IconDatabase::writeToDatabase()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec10
|
| 1617 |
ASSERT_ICON_SYNC_THREAD(); |
1617 |
ASSERT_ICON_SYNC_THREAD(); |
| 1618 |
|
1618 |
|
| 1619 |
#if !LOG_DISABLED |
1619 |
#if !LOG_DISABLED |
| 1620 |
double timeStamp = currentTime(); |
1620 |
double timeStamp = monotonicallyIncreasingTime(); |
| 1621 |
#endif |
1621 |
#endif |
| 1622 |
|
1622 |
|
| 1623 |
bool didAnyWork = false; |
1623 |
bool didAnyWork = false; |
|
Lines 1667-1673
bool IconDatabase::writeToDatabase()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec11
|
| 1667 |
if (didAnyWork) |
1667 |
if (didAnyWork) |
| 1668 |
checkForDanglingPageURLs(false); |
1668 |
checkForDanglingPageURLs(false); |
| 1669 |
|
1669 |
|
| 1670 |
LOG(IconDatabase, "Updating the database took %.4f seconds", currentTime() - timeStamp); |
1670 |
LOG(IconDatabase, "Updating the database took %.4f seconds", monotonicallyIncreasingTime() - timeStamp); |
| 1671 |
|
1671 |
|
| 1672 |
return didAnyWork; |
1672 |
return didAnyWork; |
| 1673 |
} |
1673 |
} |
|
Lines 1822-1828
void* IconDatabase::cleanupSyncThread()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec12
|
| 1822 |
ASSERT_ICON_SYNC_THREAD(); |
1822 |
ASSERT_ICON_SYNC_THREAD(); |
| 1823 |
|
1823 |
|
| 1824 |
#if !LOG_DISABLED |
1824 |
#if !LOG_DISABLED |
| 1825 |
double timeStamp = currentTime(); |
1825 |
double timeStamp = monotonicallyIncreasingTime(); |
| 1826 |
#endif |
1826 |
#endif |
| 1827 |
|
1827 |
|
| 1828 |
// If the removeIcons flag is set, remove all icons from the db. |
1828 |
// If the removeIcons flag is set, remove all icons from the db. |
|
Lines 1842-1848
void* IconDatabase::cleanupSyncThread()
a/Source/WebCore/loader/icon/IconDatabase.cpp_sec13
|
| 1842 |
m_syncDB.close(); |
1842 |
m_syncDB.close(); |
| 1843 |
|
1843 |
|
| 1844 |
#if !LOG_DISABLED |
1844 |
#if !LOG_DISABLED |
| 1845 |
LOG(IconDatabase, "(THREAD) Final closure took %.4f seconds", currentTime() - timeStamp); |
1845 |
LOG(IconDatabase, "(THREAD) Final closure took %.4f seconds", monotonicallyIncreasingTime() - timeStamp); |
| 1846 |
#endif |
1846 |
#endif |
| 1847 |
|
1847 |
|
| 1848 |
m_syncThreadRunning = false; |
1848 |
m_syncThreadRunning = false; |