summaryrefslogtreecommitdiff
path: root/netwerk
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-04 09:41:24 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-04 09:41:24 +0200
commit93cae908bcbd063f21d5663a7d3149464af2ad20 (patch)
tree8809b848f23acede820937356df6083a3f57685c /netwerk
parentab961aeb54335fd07c66de2e3b8c3b6af6f89ea2 (diff)
downloaduxp-93cae908bcbd063f21d5663a7d3149464af2ad20.tar.gz
Remove all C++ telemetry autotimers
Diffstat (limited to 'netwerk')
-rw-r--r--netwerk/cache/nsCacheService.cpp4
-rw-r--r--netwerk/cache/nsDeleteDir.cpp3
-rw-r--r--netwerk/cache/nsDiskCacheDevice.cpp2
-rw-r--r--netwerk/cache/nsDiskCacheDeviceSQL.cpp1
-rw-r--r--netwerk/cache/nsMemoryCacheDevice.cpp1
-rw-r--r--netwerk/cache2/CacheFileIOManager.cpp3
-rw-r--r--netwerk/cookie/nsCookieService.cpp21
7 files changed, 8 insertions, 27 deletions
diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp
index 7c977c09d4..97b1a71c80 100644
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
@@ -1184,7 +1184,6 @@ nsCacheService::Shutdown()
}
nsCOMPtr<nsIThread> cacheIOThread;
- Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_SHUTDOWN> totalTimer;
bool shouldSanitize = false;
nsCOMPtr<nsIFile> parentDir;
@@ -1261,10 +1260,8 @@ nsCacheService::Shutdown()
if (NS_SUCCEEDED(parentDir->Exists(&exists)) && exists)
nsDeleteDir::DeleteDir(parentDir, false);
}
- Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_SHUTDOWN_CLEAR_PRIVATE> timer;
nsDeleteDir::Shutdown(shouldSanitize);
} else {
- Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_DELETEDIR_SHUTDOWN> timer;
nsDeleteDir::Shutdown(shouldSanitize);
}
}
@@ -2175,7 +2172,6 @@ nsCacheService::ActivateEntry(nsCacheRequest * request,
nsCacheEntry *
nsCacheService::SearchCacheDevices(nsCString * key, nsCacheStoragePolicy policy, bool *collision)
{
- Telemetry::AutoTimer<Telemetry::CACHE_DEVICE_SEARCH_2> timer;
nsCacheEntry * entry = nullptr;
CACHE_LOG_DEBUG(("mMemoryDevice: 0x%p\n", mMemoryDevice));
diff --git a/netwerk/cache/nsDeleteDir.cpp b/netwerk/cache/nsDeleteDir.cpp
index 1f3f3934e9..8c4edf8126 100644
--- a/netwerk/cache/nsDeleteDir.cpp
+++ b/netwerk/cache/nsDeleteDir.cpp
@@ -155,7 +155,6 @@ nsDeleteDir::DestroyThread()
void
nsDeleteDir::TimerCallback(nsITimer *aTimer, void *arg)
{
- Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_DELETEDIR> timer;
{
MutexAutoLock lock(gInstance->mLock);
@@ -193,8 +192,6 @@ nsDeleteDir::TimerCallback(nsITimer *aTimer, void *arg)
nsresult
nsDeleteDir::DeleteDir(nsIFile *dirIn, bool moveToTrash, uint32_t delay)
{
- Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_TRASHRENAME> timer;
-
if (!gInstance)
return NS_ERROR_NOT_INITIALIZED;
diff --git a/netwerk/cache/nsDiskCacheDevice.cpp b/netwerk/cache/nsDiskCacheDevice.cpp
index ac91534ff6..09089bfb62 100644
--- a/netwerk/cache/nsDiskCacheDevice.cpp
+++ b/netwerk/cache/nsDiskCacheDevice.cpp
@@ -457,7 +457,6 @@ nsDiskCacheDevice::GetDeviceID()
nsCacheEntry *
nsDiskCacheDevice::FindEntry(nsCString * key, bool *collision)
{
- Telemetry::AutoTimer<Telemetry::CACHE_DISK_SEARCH_2> timer;
if (!Initialized()) return nullptr; // NS_ERROR_NOT_INITIALIZED
if (mClearingDiskCache) return nullptr;
nsDiskCacheRecord record;
@@ -955,7 +954,6 @@ nsDiskCacheDevice::EvictEntries(const char * clientID)
nsresult
nsDiskCacheDevice::OpenDiskCache()
{
- Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_OPEN> timer;
// if we don't have a cache directory, create one and open it
bool exists;
nsresult rv = mCacheDirectory->Exists(&exists);
diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.cpp b/netwerk/cache/nsDiskCacheDeviceSQL.cpp
index 56ece58870..f4b1d72c98 100644
--- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp
+++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp
@@ -1523,7 +1523,6 @@ nsOfflineCacheDevice::FindEntry(nsCString *fullKey, bool *collision)
{
NS_ENSURE_TRUE(Initialized(), nullptr);
- mozilla::Telemetry::AutoTimer<mozilla::Telemetry::CACHE_OFFLINE_SEARCH_2> timer;
LOG(("nsOfflineCacheDevice::FindEntry [key=%s]\n", fullKey->get()));
// SELECT * FROM moz_cache WHERE key = ?
diff --git a/netwerk/cache/nsMemoryCacheDevice.cpp b/netwerk/cache/nsMemoryCacheDevice.cpp
index 042e860224..eb69e8ea87 100644
--- a/netwerk/cache/nsMemoryCacheDevice.cpp
+++ b/netwerk/cache/nsMemoryCacheDevice.cpp
@@ -113,7 +113,6 @@ nsMemoryCacheDevice::GetDeviceID()
nsCacheEntry *
nsMemoryCacheDevice::FindEntry(nsCString * key, bool *collision)
{
- mozilla::Telemetry::AutoTimer<mozilla::Telemetry::CACHE_MEMORY_SEARCH_2> timer;
nsCacheEntry * entry = mMemCacheEntries.GetEntry(key);
if (!entry) return nullptr;
diff --git a/netwerk/cache2/CacheFileIOManager.cpp b/netwerk/cache2/CacheFileIOManager.cpp
index 98fdc24ac6..f6b499e47e 100644
--- a/netwerk/cache2/CacheFileIOManager.cpp
+++ b/netwerk/cache2/CacheFileIOManager.cpp
@@ -1172,8 +1172,6 @@ CacheFileIOManager::Shutdown()
return NS_ERROR_NOT_INITIALIZED;
}
- Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_SHUTDOWN_V2> shutdownTimer;
-
CacheIndex::PreShutdown();
ShutdownMetadataWriteScheduling();
@@ -1191,7 +1189,6 @@ CacheFileIOManager::Shutdown()
CacheIndex::Shutdown();
if (CacheObserver::ClearCacheOnShutdown()) {
- Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE2_SHUTDOWN_CLEAR_PRIVATE> totalTimer;
gInstance->SyncRemoveAllCacheFiles();
}
diff --git a/netwerk/cookie/nsCookieService.cpp b/netwerk/cookie/nsCookieService.cpp
index 52558107b5..ea54dbd611 100644
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -954,19 +954,14 @@ nsCookieService::TryInitDB(bool aRecreateDB)
NS_ENSURE_SUCCESS(rv, RESULT_FAILURE);
}
- // This block provides scope for the Telemetry AutoTimer
- {
- Telemetry::AutoTimer<Telemetry::MOZ_SQLITE_COOKIES_OPEN_READAHEAD_MS>
- telemetry;
- ReadAheadFile(mDefaultDBState->cookieFile);
-
- // open a connection to the cookie database, and only cache our connection
- // and statements upon success. The connection is opened unshared to eliminate
- // cache contention between the main and background threads.
- rv = mStorageService->OpenUnsharedDatabase(mDefaultDBState->cookieFile,
- getter_AddRefs(mDefaultDBState->dbConn));
- NS_ENSURE_SUCCESS(rv, RESULT_RETRY);
- }
+ ReadAheadFile(mDefaultDBState->cookieFile);
+
+ // open a connection to the cookie database, and only cache our connection
+ // and statements upon success. The connection is opened unshared to eliminate
+ // cache contention between the main and background threads.
+ rv = mStorageService->OpenUnsharedDatabase(mDefaultDBState->cookieFile,
+ getter_AddRefs(mDefaultDBState->dbConn));
+ NS_ENSURE_SUCCESS(rv, RESULT_RETRY);
// Set up our listeners.
mDefaultDBState->insertListener = new InsertCookieDBListener(mDefaultDBState);