From 93cae908bcbd063f21d5663a7d3149464af2ad20 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 4 Sep 2018 09:41:24 +0200 Subject: Remove all C++ telemetry autotimers --- accessible/base/NotificationController.cpp | 1 - dom/base/Navigator.cpp | 2 -- dom/ipc/TabChild.cpp | 1 - dom/plugins/base/nsPluginHost.cpp | 9 +----- dom/plugins/ipc/PluginAsyncSurrogate.cpp | 2 -- dom/plugins/ipc/PluginInstanceParent.cpp | 11 ++----- dom/plugins/ipc/PluginModuleParent.cpp | 34 ++++++++++------------ dom/storage/DOMStorageDBThread.cpp | 2 -- gfx/thebes/gfxGDIFontList.cpp | 2 -- gfx/thebes/gfxMacPlatformFontList.mm | 2 -- layout/base/nsCSSRendering.cpp | 1 - layout/base/nsDocumentViewer.cpp | 10 ++----- netwerk/cache/nsCacheService.cpp | 4 --- netwerk/cache/nsDeleteDir.cpp | 3 -- netwerk/cache/nsDiskCacheDevice.cpp | 2 -- netwerk/cache/nsDiskCacheDeviceSQL.cpp | 1 - netwerk/cache/nsMemoryCacheDevice.cpp | 1 - netwerk/cache2/CacheFileIOManager.cpp | 3 -- netwerk/cookie/nsCookieService.cpp | 21 +++++-------- storage/TelemetryVFS.cpp | 2 -- storage/mozStorageAsyncStatementExecution.cpp | 1 - toolkit/components/url-classifier/Classifier.cpp | 4 --- toolkit/components/url-classifier/LookupCache.cpp | 2 -- .../url-classifier/VariableLengthPrefixSet.cpp | 13 +++------ .../url-classifier/nsUrlClassifierDBService.cpp | 2 -- .../url-classifier/nsUrlClassifierPrefixSet.cpp | 16 ++++------ widget/nsIdleService.cpp | 3 -- xpcom/base/nsMemoryReporterManager.cpp | 1 - 28 files changed, 37 insertions(+), 119 deletions(-) diff --git a/accessible/base/NotificationController.cpp b/accessible/base/NotificationController.cpp index 73d364641..3545ce6c1 100644 --- a/accessible/base/NotificationController.cpp +++ b/accessible/base/NotificationController.cpp @@ -591,7 +591,6 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) { PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); - Telemetry::AutoTimer updateTimer; // If the document accessible that notification collector was created for is // now shut down, don't process notifications anymore. diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index ed96ee23b..1bc4f82f4 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -684,8 +684,6 @@ Navigator::GetDoNotTrack(nsAString &aResult) bool Navigator::JavaEnabled(ErrorResult& aRv) { - Telemetry::AutoTimer telemetryTimer; - // Return true if we have a handler for the java mime nsAdoptingString javaMIME = Preferences::GetString("plugin.java.mime"); NS_ENSURE_TRUE(!javaMIME.IsEmpty(), false); diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 705799c54..244fa9969 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -2395,7 +2395,6 @@ TabChild::RecvSetDocShellIsActive(const bool& aIsActive, root->SchedulePaint(); } - Telemetry::AutoTimer timer; // If we need to repaint, let's do that right away. No sense waiting until // we get back to the event loop again. We suppress the display port so that // we only paint what's visible. This ensures that the tab we're switching diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 916bdea0f..c3de136d0 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -2148,11 +2148,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, nsPluginInfo info; memset(&info, 0, sizeof(info)); nsresult res; - // Opening a block for the telemetry AutoTimer - { - Telemetry::AutoTimer telemetry; - res = pluginFile.GetPluginInfo(info, &library); - } + res = pluginFile.GetPluginInfo(info, &library); // if we don't have mime type don't proceed, this is not a plugin if (NS_FAILED(res) || !info.fMimeTypeArray) { RefPtr invalidTag = new nsInvalidPluginTag(filePath.get(), @@ -2410,8 +2406,6 @@ nsPluginHost::FindPluginsInContent(bool aCreatePluginList, bool* aPluginsChanged // This is needed in ReloadPlugins to prevent possible recursive reloads nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChanged) { - Telemetry::AutoTimer telemetry; - NS_ENSURE_ARG_POINTER(aPluginsChanged); *aPluginsChanged = false; @@ -3412,7 +3406,6 @@ nsPluginHost::StopPluginInstance(nsNPAPIPluginInstance* aInstance) return NS_OK; } - Telemetry::AutoTimer timer; aInstance->Stop(); // if the instance does not want to be 'cached' just remove it diff --git a/dom/plugins/ipc/PluginAsyncSurrogate.cpp b/dom/plugins/ipc/PluginAsyncSurrogate.cpp index da07116cc..3fe4c7168 100644 --- a/dom/plugins/ipc/PluginAsyncSurrogate.cpp +++ b/dom/plugins/ipc/PluginAsyncSurrogate.cpp @@ -504,8 +504,6 @@ PluginAsyncSurrogate::WaitForInit() if (mAcceptCalls) { return true; } - Telemetry::AutoTimer - timer(mParent->GetHistogramKey()); bool result = false; MOZ_ASSERT(mParent); if (mParent->IsChrome()) { diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index fee2d2f98..bdd15ca99 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -205,12 +205,8 @@ NPError PluginInstanceParent::Destroy() { NPError retval; - { // Scope for timer - Telemetry::AutoTimer - timer(Module()->GetHistogramKey()); - if (!CallNPP_Destroy(&retval)) { - retval = NPERR_GENERIC_ERROR; - } + if (!CallNPP_Destroy(&retval)) { + retval = NPERR_GENERIC_ERROR; } #if defined(OS_WIN) @@ -1785,9 +1781,6 @@ PluginInstanceParent::NPP_NewStream(NPMIMEType type, NPStream* stream, return NPERR_GENERIC_ERROR; } - Telemetry::AutoTimer - timer(Module()->GetHistogramKey()); - NPError err = NPERR_NO_ERROR; if (mParent->IsStartingAsync()) { MOZ_ASSERT(mSurrogate); diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp index f04cd209c..300c4f621 100755 --- a/dom/plugins/ipc/PluginModuleParent.cpp +++ b/dom/plugins/ipc/PluginModuleParent.cpp @@ -2284,27 +2284,23 @@ PluginModuleParent::NPP_NewInternal(NPMIMEType pluginType, NPP instance, return NS_ERROR_FAILURE; } - { // Scope for timer - Telemetry::AutoTimer - timer(GetHistogramKey()); - if (mIsStartingAsync) { - MOZ_ASSERT(surrogate); - surrogate->AsyncCallDeparting(); - if (!SendAsyncNPP_New(parentInstance)) { + if (mIsStartingAsync) { + MOZ_ASSERT(surrogate); + surrogate->AsyncCallDeparting(); + if (!SendAsyncNPP_New(parentInstance)) { + *error = NPERR_GENERIC_ERROR; + return NS_ERROR_FAILURE; + } + *error = NPERR_NO_ERROR; + } else { + if (!CallSyncNPP_New(parentInstance, error)) { + // if IPC is down, we'll get an immediate "failed" return, but + // without *error being set. So make sure that the error + // condition is signaled to nsNPAPIPluginInstance + if (NPERR_NO_ERROR == *error) { *error = NPERR_GENERIC_ERROR; - return NS_ERROR_FAILURE; - } - *error = NPERR_NO_ERROR; - } else { - if (!CallSyncNPP_New(parentInstance, error)) { - // if IPC is down, we'll get an immediate "failed" return, but - // without *error being set. So make sure that the error - // condition is signaled to nsNPAPIPluginInstance - if (NPERR_NO_ERROR == *error) { - *error = NPERR_GENERIC_ERROR; - } - return NS_ERROR_FAILURE; } + return NS_ERROR_FAILURE; } } diff --git a/dom/storage/DOMStorageDBThread.cpp b/dom/storage/DOMStorageDBThread.cpp index 183be5c5c..f86dbad9c 100644 --- a/dom/storage/DOMStorageDBThread.cpp +++ b/dom/storage/DOMStorageDBThread.cpp @@ -163,8 +163,6 @@ DOMStorageDBThread::Shutdown() return NS_ERROR_NOT_INITIALIZED; } - Telemetry::AutoTimer timer; - { MonitorAutoLock monitor(mThreadObserver->GetMonitor()); diff --git a/gfx/thebes/gfxGDIFontList.cpp b/gfx/thebes/gfxGDIFontList.cpp index cc047ef38..f65334fe6 100644 --- a/gfx/thebes/gfxGDIFontList.cpp +++ b/gfx/thebes/gfxGDIFontList.cpp @@ -637,8 +637,6 @@ gfxGDIFontList::GetFontSubstitutes() nsresult gfxGDIFontList::InitFontListForPlatform() { - Telemetry::AutoTimer timer; - mFontSubstitutes.Clear(); mNonExistingFonts.Clear(); diff --git a/gfx/thebes/gfxMacPlatformFontList.mm b/gfx/thebes/gfxMacPlatformFontList.mm index 3d2fcc6a9..4536ab527 100644 --- a/gfx/thebes/gfxMacPlatformFontList.mm +++ b/gfx/thebes/gfxMacPlatformFontList.mm @@ -737,8 +737,6 @@ gfxMacPlatformFontList::InitFontListForPlatform() { nsAutoreleasePool localPool; - Telemetry::AutoTimer timer; - // reset system font list mSystemFontFamilies.Clear(); diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index 054632ad7..71ebfad22 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -2516,7 +2516,6 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext, PROFILER_LABEL("nsCSSRendering", "PaintGradient", js::ProfileEntry::Category::GRAPHICS); - Telemetry::AutoTimer gradientTimer; if (aDest.IsEmpty() || aFillArea.IsEmpty()) { return; } diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 8b76227ff..5478c61b0 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -1206,11 +1206,8 @@ nsDocumentViewer::PermitUnloadInternal(bool *aShouldPrompt, nsIDocument::PageUnloadingEventTimeStamp timestamp(mDocument); mInPermitUnload = true; - { - Telemetry::AutoTimer telemetryTimer; - EventDispatcher::DispatchDOMEvent(window, nullptr, event, mPresContext, + EventDispatcher::DispatchDOMEvent(window, nullptr, event, mPresContext, nullptr); - } mInPermitUnload = false; } @@ -1389,10 +1386,7 @@ nsDocumentViewer::PageHide(bool aIsUnload) nsIDocument::PageUnloadingEventTimeStamp timestamp(mDocument); - { - Telemetry::AutoTimer telemetryTimer; - EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status); - } + EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status); } #ifdef MOZ_XUL diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp index 7c977c09d..97b1a71c8 100644 --- a/netwerk/cache/nsCacheService.cpp +++ b/netwerk/cache/nsCacheService.cpp @@ -1184,7 +1184,6 @@ nsCacheService::Shutdown() } nsCOMPtr cacheIOThread; - Telemetry::AutoTimer totalTimer; bool shouldSanitize = false; nsCOMPtr parentDir; @@ -1261,10 +1260,8 @@ nsCacheService::Shutdown() if (NS_SUCCEEDED(parentDir->Exists(&exists)) && exists) nsDeleteDir::DeleteDir(parentDir, false); } - Telemetry::AutoTimer timer; nsDeleteDir::Shutdown(shouldSanitize); } else { - Telemetry::AutoTimer timer; nsDeleteDir::Shutdown(shouldSanitize); } } @@ -2175,7 +2172,6 @@ nsCacheService::ActivateEntry(nsCacheRequest * request, nsCacheEntry * nsCacheService::SearchCacheDevices(nsCString * key, nsCacheStoragePolicy policy, bool *collision) { - Telemetry::AutoTimer 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 1f3f3934e..8c4edf812 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 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 timer; - if (!gInstance) return NS_ERROR_NOT_INITIALIZED; diff --git a/netwerk/cache/nsDiskCacheDevice.cpp b/netwerk/cache/nsDiskCacheDevice.cpp index ac91534ff..09089bfb6 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 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 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 56ece5887..f4b1d72c9 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 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 042e86022..eb69e8ea8 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 timer; nsCacheEntry * entry = mMemCacheEntries.GetEntry(key); if (!entry) return nullptr; diff --git a/netwerk/cache2/CacheFileIOManager.cpp b/netwerk/cache2/CacheFileIOManager.cpp index 98fdc24ac..f6b499e47 100644 --- a/netwerk/cache2/CacheFileIOManager.cpp +++ b/netwerk/cache2/CacheFileIOManager.cpp @@ -1172,8 +1172,6 @@ CacheFileIOManager::Shutdown() return NS_ERROR_NOT_INITIALIZED; } - Telemetry::AutoTimer shutdownTimer; - CacheIndex::PreShutdown(); ShutdownMetadataWriteScheduling(); @@ -1191,7 +1189,6 @@ CacheFileIOManager::Shutdown() CacheIndex::Shutdown(); if (CacheObserver::ClearCacheOnShutdown()) { - Telemetry::AutoTimer totalTimer; gInstance->SyncRemoveAllCacheFiles(); } diff --git a/netwerk/cookie/nsCookieService.cpp b/netwerk/cookie/nsCookieService.cpp index 52558107b..ea54dbd61 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; - 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); diff --git a/storage/TelemetryVFS.cpp b/storage/TelemetryVFS.cpp index 62f315ad0..eb102a046 100644 --- a/storage/TelemetryVFS.cpp +++ b/storage/TelemetryVFS.cpp @@ -407,7 +407,6 @@ xTruncate(sqlite3_file *pFile, sqlite_int64 size) IOThreadAutoTimer ioTimer(Telemetry::MOZ_SQLITE_TRUNCATE_MS); telemetry_file *p = (telemetry_file *)pFile; int rc; - Telemetry::AutoTimer timer; if (p->quotaObject) { if (p->fileChunkSize > 0) { // Round up to the smallest multiple of the chunk size that will hold all @@ -609,7 +608,6 @@ xOpen(sqlite3_vfs* vfs, const char *zName, sqlite3_file* pFile, { IOThreadAutoTimer ioTimer(Telemetry::MOZ_SQLITE_OPEN_MS, IOInterposeObserver::OpCreateOrOpen); - Telemetry::AutoTimer timer; sqlite3_vfs *orig_vfs = static_cast(vfs->pAppData); int rc; telemetry_file *p = (telemetry_file *)pFile; diff --git a/storage/mozStorageAsyncStatementExecution.cpp b/storage/mozStorageAsyncStatementExecution.cpp index 6d0682dc5..00f584f03 100644 --- a/storage/mozStorageAsyncStatementExecution.cpp +++ b/storage/mozStorageAsyncStatementExecution.cpp @@ -226,7 +226,6 @@ bool AsyncExecuteStatements::executeStatement(sqlite3_stmt *aStatement) { mMutex.AssertNotCurrentThreadOwns(); - Telemetry::AutoTimer finallySendExecutionDuration(mRequestStartDate); while (true) { // lock the sqlite mutex so sqlite3_errmsg cannot change SQLiteMutexAutoLock lockedScope(mDBMutex); diff --git a/toolkit/components/url-classifier/Classifier.cpp b/toolkit/components/url-classifier/Classifier.cpp index e183728bd..b9d0ace1b 100644 --- a/toolkit/components/url-classifier/Classifier.cpp +++ b/toolkit/components/url-classifier/Classifier.cpp @@ -412,8 +412,6 @@ Classifier::Check(const nsACString& aSpec, uint32_t aFreshnessGuarantee, LookupResultArray& aResults) { - Telemetry::AutoTimer timer; - // Get the set of fragments based on the url. This is necessary because we // only look up at most 5 URLs per aSpec, even if aSpec has more than 5 // components. @@ -505,8 +503,6 @@ Classifier::Check(const nsACString& aSpec, nsresult Classifier::ApplyUpdates(nsTArray* aUpdates) { - Telemetry::AutoTimer timer; - PRIntervalTime clockStart = 0; if (LOG_ENABLED()) { clockStart = PR_IntervalNow(); diff --git a/toolkit/components/url-classifier/LookupCache.cpp b/toolkit/components/url-classifier/LookupCache.cpp index 420e07433..7c4d7682b 100644 --- a/toolkit/components/url-classifier/LookupCache.cpp +++ b/toolkit/components/url-classifier/LookupCache.cpp @@ -541,8 +541,6 @@ static void EnsureSorted(T* aArray) nsresult LookupCacheV2::ConstructPrefixSet(AddPrefixArray& aAddPrefixes) { - Telemetry::AutoTimer timer; - nsTArray array; if (!array.SetCapacity(aAddPrefixes.Length(), fallible)) { return NS_ERROR_OUT_OF_MEMORY; diff --git a/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp b/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp index e9d6770d3..a387a698c 100644 --- a/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp +++ b/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp @@ -209,8 +209,6 @@ VariableLengthPrefixSet::LoadFromFile(nsIFile* aFile) NS_ENSURE_ARG_POINTER(aFile); - Telemetry::AutoTimer timer; - nsCOMPtr localInFile; nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(localInFile), aFile, PR_RDONLY | nsIFile::OS_READAHEAD); @@ -255,15 +253,12 @@ VariableLengthPrefixSet::StoreToFile(nsIFile* aFile) uint32_t fileSize = 0; // Preallocate the file storage - { - nsCOMPtr fos(do_QueryInterface(localOutFile)); - Telemetry::AutoTimer timer; + nsCOMPtr fos(do_QueryInterface(localOutFile)); - fileSize += mFixedPrefixSet->CalculatePreallocateSize(); - fileSize += CalculatePreallocateSize(); + fileSize += mFixedPrefixSet->CalculatePreallocateSize(); + fileSize += CalculatePreallocateSize(); - Unused << fos->Preallocate(fileSize); - } + Unused << fos->Preallocate(fileSize); // Convert to buffered stream nsCOMPtr out = diff --git a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp index 3cf24847e..d3018aa2d 100644 --- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp +++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp @@ -1814,8 +1814,6 @@ nsUrlClassifierDBService::Shutdown() gShuttingDownThread = true; - Telemetry::AutoTimer timer; - mCompleters.Clear(); nsCOMPtr prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); diff --git a/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp b/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp index 874565470..3cfdf7a35 100644 --- a/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp +++ b/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp @@ -315,8 +315,6 @@ nsUrlClassifierPrefixSet::LoadFromFile(nsIFile* aFile) { MutexAutoLock lock(mLock); - Telemetry::AutoTimer timer; - nsCOMPtr localInFile; nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(localInFile), aFile, PR_RDONLY | nsIFile::OS_READAHEAD); @@ -356,17 +354,13 @@ nsUrlClassifierPrefixSet::StoreToFile(nsIFile* aFile) uint32_t fileSize; - // Preallocate the file storage - { - nsCOMPtr fos(do_QueryInterface(localOutFile)); - Telemetry::AutoTimer timer; + nsCOMPtr fos(do_QueryInterface(localOutFile)); - fileSize = CalculatePreallocateSize(); + fileSize = CalculatePreallocateSize(); - // Ignore failure, the preallocation is a hint and we write out the entire - // file later on - Unused << fos->Preallocate(fileSize); - } + // Ignore failure, the preallocation is a hint and we write out the entire + // file later on + Unused << fos->Preallocate(fileSize); // Convert to buffered stream nsCOMPtr out = diff --git a/widget/nsIdleService.cpp b/widget/nsIdleService.cpp index 6a2833081..a1a2566df 100644 --- a/widget/nsIdleService.cpp +++ b/widget/nsIdleService.cpp @@ -716,9 +716,6 @@ nsIdleService::IdleTimerCallback(void) return; } - // Tell expired listeners they are expired,and find the next timeout - Telemetry::AutoTimer timer; - // We need to initialise the time to the next idle switch. mDeltaToNextIdleSwitchInS = UINT32_MAX; diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp index 2d4f3fa9c..bfeda063b 100644 --- a/xpcom/base/nsMemoryReporterManager.cpp +++ b/xpcom/base/nsMemoryReporterManager.cpp @@ -440,7 +440,6 @@ ResidentDistinguishedAmountHelper(int64_t* aN, bool aDoPurge) { #ifdef HAVE_JEMALLOC_STATS if (aDoPurge) { - Telemetry::AutoTimer timer; jemalloc_purge_freed_pages(); } #endif -- cgit v1.2.3