Remove all C++ telemetry autotimers

This commit is contained in:
wolfbeast 2018-09-04 09:41:24 +02:00 • committed by Roy Tam
commit ad782894c8
28 changed files with 37 additions and 119 deletions

View file

@ -591,7 +591,6 @@ void
NotificationController::WillRefresh(mozilla::TimeStamp aTime) NotificationController::WillRefresh(mozilla::TimeStamp aTime)
{ {
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
Telemetry::AutoTimer<Telemetry::A11Y_UPDATE_TIME> updateTimer;
// If the document accessible that notification collector was created for is // If the document accessible that notification collector was created for is
// now shut down, don't process notifications anymore. // now shut down, don't process notifications anymore.

View file

@ -684,8 +684,6 @@ Navigator::GetDoNotTrack(nsAString &aResult)
bool bool
Navigator::JavaEnabled(ErrorResult& aRv) Navigator::JavaEnabled(ErrorResult& aRv)
{ {
Telemetry::AutoTimer<Telemetry::CHECK_JAVA_ENABLED> telemetryTimer;
// Return true if we have a handler for the java mime // Return true if we have a handler for the java mime
nsAdoptingString javaMIME = Preferences::GetString("plugin.java.mime"); nsAdoptingString javaMIME = Preferences::GetString("plugin.java.mime");
NS_ENSURE_TRUE(!javaMIME.IsEmpty(), false); NS_ENSURE_TRUE(!javaMIME.IsEmpty(), false);

View file

@ -2395,7 +2395,6 @@ TabChild::RecvSetDocShellIsActive(const bool& aIsActive,
root->SchedulePaint(); root->SchedulePaint();
} }
Telemetry::AutoTimer<Telemetry::TABCHILD_PAINT_TIME> timer;
// If we need to repaint, let's do that right away. No sense waiting until // 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 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 // we only paint what's visible. This ensures that the tab we're switching

View file

@ -2148,11 +2148,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
nsPluginInfo info; nsPluginInfo info;
memset(&info, 0, sizeof(info)); memset(&info, 0, sizeof(info));
nsresult res; nsresult res;
// Opening a block for the telemetry AutoTimer
{
Telemetry::AutoTimer<Telemetry::PLUGIN_LOAD_METADATA> 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 we don't have mime type don't proceed, this is not a plugin
if (NS_FAILED(res) || !info.fMimeTypeArray) { if (NS_FAILED(res) || !info.fMimeTypeArray) {
RefPtr<nsInvalidPluginTag> invalidTag = new nsInvalidPluginTag(filePath.get(), RefPtr<nsInvalidPluginTag> 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 // This is needed in ReloadPlugins to prevent possible recursive reloads
nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChanged) nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChanged)
{ {
Telemetry::AutoTimer<Telemetry::FIND_PLUGINS> telemetry;
NS_ENSURE_ARG_POINTER(aPluginsChanged); NS_ENSURE_ARG_POINTER(aPluginsChanged);
*aPluginsChanged = false; *aPluginsChanged = false;
@ -3412,7 +3406,6 @@ nsPluginHost::StopPluginInstance(nsNPAPIPluginInstance* aInstance)
return NS_OK; return NS_OK;
} }
Telemetry::AutoTimer<Telemetry::PLUGIN_SHUTDOWN_MS> timer;
aInstance->Stop(); aInstance->Stop();
// if the instance does not want to be 'cached' just remove it // if the instance does not want to be 'cached' just remove it

View file

@ -504,8 +504,6 @@ PluginAsyncSurrogate::WaitForInit()
if (mAcceptCalls) { if (mAcceptCalls) {
return true; return true;
} }
Telemetry::AutoTimer<Telemetry::BLOCKED_ON_PLUGINASYNCSURROGATE_WAITFORINIT_MS>
timer(mParent->GetHistogramKey());
bool result = false; bool result = false;
MOZ_ASSERT(mParent); MOZ_ASSERT(mParent);
if (mParent->IsChrome()) { if (mParent->IsChrome()) {

View file

@ -205,13 +205,9 @@ NPError
PluginInstanceParent::Destroy() PluginInstanceParent::Destroy()
{ {
NPError retval; NPError retval;
{ // Scope for timer
Telemetry::AutoTimer<Telemetry::BLOCKED_ON_PLUGIN_INSTANCE_DESTROY_MS>
timer(Module()->GetHistogramKey());
if (!CallNPP_Destroy(&retval)) { if (!CallNPP_Destroy(&retval)) {
retval = NPERR_GENERIC_ERROR; retval = NPERR_GENERIC_ERROR;
} }
}
#if defined(OS_WIN) #if defined(OS_WIN)
UnsubclassPluginWindow(); UnsubclassPluginWindow();
@ -1785,9 +1781,6 @@ PluginInstanceParent::NPP_NewStream(NPMIMEType type, NPStream* stream,
return NPERR_GENERIC_ERROR; return NPERR_GENERIC_ERROR;
} }
Telemetry::AutoTimer<Telemetry::BLOCKED_ON_PLUGIN_STREAM_INIT_MS>
timer(Module()->GetHistogramKey());
NPError err = NPERR_NO_ERROR; NPError err = NPERR_NO_ERROR;
if (mParent->IsStartingAsync()) { if (mParent->IsStartingAsync()) {
MOZ_ASSERT(mSurrogate); MOZ_ASSERT(mSurrogate);

View file

@ -2284,9 +2284,6 @@ PluginModuleParent::NPP_NewInternal(NPMIMEType pluginType, NPP instance,
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
{ // Scope for timer
Telemetry::AutoTimer<Telemetry::BLOCKED_ON_PLUGIN_INSTANCE_INIT_MS>
timer(GetHistogramKey());
if (mIsStartingAsync) { if (mIsStartingAsync) {
MOZ_ASSERT(surrogate); MOZ_ASSERT(surrogate);
surrogate->AsyncCallDeparting(); surrogate->AsyncCallDeparting();
@ -2306,7 +2303,6 @@ PluginModuleParent::NPP_NewInternal(NPMIMEType pluginType, NPP instance,
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
} }
}
if (*error != NPERR_NO_ERROR) { if (*error != NPERR_NO_ERROR) {
if (!mIsStartingAsync) { if (!mIsStartingAsync) {

View file

@ -163,8 +163,6 @@ DOMStorageDBThread::Shutdown()
return NS_ERROR_NOT_INITIALIZED; return NS_ERROR_NOT_INITIALIZED;
} }
Telemetry::AutoTimer<Telemetry::LOCALDOMSTORAGE_SHUTDOWN_DATABASE_MS> timer;
{ {
MonitorAutoLock monitor(mThreadObserver->GetMonitor()); MonitorAutoLock monitor(mThreadObserver->GetMonitor());

View file

@ -654,8 +654,6 @@ gfxGDIFontList::GetFontSubstitutes()
nsresult nsresult
gfxGDIFontList::InitFontListForPlatform() gfxGDIFontList::InitFontListForPlatform()
{ {
Telemetry::AutoTimer<Telemetry::GDI_INITFONTLIST_TOTAL> timer;
mFontSubstitutes.Clear(); mFontSubstitutes.Clear();
mNonExistingFonts.Clear(); mNonExistingFonts.Clear();

View file

@ -737,8 +737,6 @@ gfxMacPlatformFontList::InitFontListForPlatform()
{ {
nsAutoreleasePool localPool; nsAutoreleasePool localPool;
Telemetry::AutoTimer<Telemetry::MAC_INITFONTLIST_TOTAL> timer;
// reset system font list // reset system font list
mSystemFontFamilies.Clear(); mSystemFontFamilies.Clear();

View file

@ -2516,7 +2516,6 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext,
PROFILER_LABEL("nsCSSRendering", "PaintGradient", PROFILER_LABEL("nsCSSRendering", "PaintGradient",
js::ProfileEntry::Category::GRAPHICS); js::ProfileEntry::Category::GRAPHICS);
Telemetry::AutoTimer<Telemetry::GRADIENT_DURATION, Telemetry::Microsecond> gradientTimer;
if (aDest.IsEmpty() || aFillArea.IsEmpty()) { if (aDest.IsEmpty() || aFillArea.IsEmpty()) {
return; return;
} }

View file

@ -1206,11 +1206,8 @@ nsDocumentViewer::PermitUnloadInternal(bool *aShouldPrompt,
nsIDocument::PageUnloadingEventTimeStamp timestamp(mDocument); nsIDocument::PageUnloadingEventTimeStamp timestamp(mDocument);
mInPermitUnload = true; mInPermitUnload = true;
{
Telemetry::AutoTimer<Telemetry::HANDLE_BEFOREUNLOAD_MS> telemetryTimer;
EventDispatcher::DispatchDOMEvent(window, nullptr, event, mPresContext, EventDispatcher::DispatchDOMEvent(window, nullptr, event, mPresContext,
nullptr); nullptr);
}
mInPermitUnload = false; mInPermitUnload = false;
} }
@ -1389,11 +1386,8 @@ nsDocumentViewer::PageHide(bool aIsUnload)
nsIDocument::PageUnloadingEventTimeStamp timestamp(mDocument); nsIDocument::PageUnloadingEventTimeStamp timestamp(mDocument);
{
Telemetry::AutoTimer<Telemetry::HANDLE_UNLOAD_MS> telemetryTimer;
EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status); EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status);
} }
}
#ifdef MOZ_XUL #ifdef MOZ_XUL
// look for open menupopups and close them after the unload event, in case // look for open menupopups and close them after the unload event, in case

View file

@ -1184,7 +1184,6 @@ nsCacheService::Shutdown()
} }
nsCOMPtr<nsIThread> cacheIOThread; nsCOMPtr<nsIThread> cacheIOThread;
Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_SHUTDOWN> totalTimer;
bool shouldSanitize = false; bool shouldSanitize = false;
nsCOMPtr<nsIFile> parentDir; nsCOMPtr<nsIFile> parentDir;
@ -1261,10 +1260,8 @@ nsCacheService::Shutdown()
if (NS_SUCCEEDED(parentDir->Exists(&exists)) && exists) if (NS_SUCCEEDED(parentDir->Exists(&exists)) && exists)
nsDeleteDir::DeleteDir(parentDir, false); nsDeleteDir::DeleteDir(parentDir, false);
} }
Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_SHUTDOWN_CLEAR_PRIVATE> timer;
nsDeleteDir::Shutdown(shouldSanitize); nsDeleteDir::Shutdown(shouldSanitize);
} else { } else {
Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_DELETEDIR_SHUTDOWN> timer;
nsDeleteDir::Shutdown(shouldSanitize); nsDeleteDir::Shutdown(shouldSanitize);
} }
} }
@ -2175,7 +2172,6 @@ nsCacheService::ActivateEntry(nsCacheRequest * request,
nsCacheEntry * nsCacheEntry *
nsCacheService::SearchCacheDevices(nsCString * key, nsCacheStoragePolicy policy, bool *collision) nsCacheService::SearchCacheDevices(nsCString * key, nsCacheStoragePolicy policy, bool *collision)
{ {
Telemetry::AutoTimer<Telemetry::CACHE_DEVICE_SEARCH_2> timer;
nsCacheEntry * entry = nullptr; nsCacheEntry * entry = nullptr;
CACHE_LOG_DEBUG(("mMemoryDevice: 0x%p\n", mMemoryDevice)); CACHE_LOG_DEBUG(("mMemoryDevice: 0x%p\n", mMemoryDevice));

View file

@ -155,7 +155,6 @@ nsDeleteDir::DestroyThread()
void void
nsDeleteDir::TimerCallback(nsITimer *aTimer, void *arg) nsDeleteDir::TimerCallback(nsITimer *aTimer, void *arg)
{ {
Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_DELETEDIR> timer;
{ {
MutexAutoLock lock(gInstance->mLock); MutexAutoLock lock(gInstance->mLock);
@ -193,8 +192,6 @@ nsDeleteDir::TimerCallback(nsITimer *aTimer, void *arg)
nsresult nsresult
nsDeleteDir::DeleteDir(nsIFile *dirIn, bool moveToTrash, uint32_t delay) nsDeleteDir::DeleteDir(nsIFile *dirIn, bool moveToTrash, uint32_t delay)
{ {
Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_TRASHRENAME> timer;
if (!gInstance) if (!gInstance)
return NS_ERROR_NOT_INITIALIZED; return NS_ERROR_NOT_INITIALIZED;

View file

@ -457,7 +457,6 @@ nsDiskCacheDevice::GetDeviceID()
nsCacheEntry * nsCacheEntry *
nsDiskCacheDevice::FindEntry(nsCString * key, bool *collision) nsDiskCacheDevice::FindEntry(nsCString * key, bool *collision)
{ {
Telemetry::AutoTimer<Telemetry::CACHE_DISK_SEARCH_2> timer;
if (!Initialized()) return nullptr; // NS_ERROR_NOT_INITIALIZED if (!Initialized()) return nullptr; // NS_ERROR_NOT_INITIALIZED
if (mClearingDiskCache) return nullptr; if (mClearingDiskCache) return nullptr;
nsDiskCacheRecord record; nsDiskCacheRecord record;
@ -955,7 +954,6 @@ nsDiskCacheDevice::EvictEntries(const char * clientID)
nsresult nsresult
nsDiskCacheDevice::OpenDiskCache() nsDiskCacheDevice::OpenDiskCache()
{ {
Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_OPEN> timer;
// if we don't have a cache directory, create one and open it // if we don't have a cache directory, create one and open it
bool exists; bool exists;
nsresult rv = mCacheDirectory->Exists(&exists); nsresult rv = mCacheDirectory->Exists(&exists);

View file

@ -1523,7 +1523,6 @@ nsOfflineCacheDevice::FindEntry(nsCString *fullKey, bool *collision)
{ {
NS_ENSURE_TRUE(Initialized(), nullptr); NS_ENSURE_TRUE(Initialized(), nullptr);
mozilla::Telemetry::AutoTimer<mozilla::Telemetry::CACHE_OFFLINE_SEARCH_2> timer;
LOG(("nsOfflineCacheDevice::FindEntry [key=%s]\n", fullKey->get())); LOG(("nsOfflineCacheDevice::FindEntry [key=%s]\n", fullKey->get()));
// SELECT * FROM moz_cache WHERE key = ? // SELECT * FROM moz_cache WHERE key = ?

View file

@ -113,7 +113,6 @@ nsMemoryCacheDevice::GetDeviceID()
nsCacheEntry * nsCacheEntry *
nsMemoryCacheDevice::FindEntry(nsCString * key, bool *collision) nsMemoryCacheDevice::FindEntry(nsCString * key, bool *collision)
{ {
mozilla::Telemetry::AutoTimer<mozilla::Telemetry::CACHE_MEMORY_SEARCH_2> timer;
nsCacheEntry * entry = mMemCacheEntries.GetEntry(key); nsCacheEntry * entry = mMemCacheEntries.GetEntry(key);
if (!entry) return nullptr; if (!entry) return nullptr;

View file

@ -1172,8 +1172,6 @@ CacheFileIOManager::Shutdown()
return NS_ERROR_NOT_INITIALIZED; return NS_ERROR_NOT_INITIALIZED;
} }
Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_SHUTDOWN_V2> shutdownTimer;
CacheIndex::PreShutdown(); CacheIndex::PreShutdown();
ShutdownMetadataWriteScheduling(); ShutdownMetadataWriteScheduling();
@ -1191,7 +1189,6 @@ CacheFileIOManager::Shutdown()
CacheIndex::Shutdown(); CacheIndex::Shutdown();
if (CacheObserver::ClearCacheOnShutdown()) { if (CacheObserver::ClearCacheOnShutdown()) {
Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE2_SHUTDOWN_CLEAR_PRIVATE> totalTimer;
gInstance->SyncRemoveAllCacheFiles(); gInstance->SyncRemoveAllCacheFiles();
} }

View file

@ -954,10 +954,6 @@ nsCookieService::TryInitDB(bool aRecreateDB)
NS_ENSURE_SUCCESS(rv, RESULT_FAILURE); 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); ReadAheadFile(mDefaultDBState->cookieFile);
// open a connection to the cookie database, and only cache our connection // open a connection to the cookie database, and only cache our connection
@ -966,7 +962,6 @@ nsCookieService::TryInitDB(bool aRecreateDB)
rv = mStorageService->OpenUnsharedDatabase(mDefaultDBState->cookieFile, rv = mStorageService->OpenUnsharedDatabase(mDefaultDBState->cookieFile,
getter_AddRefs(mDefaultDBState->dbConn)); getter_AddRefs(mDefaultDBState->dbConn));
NS_ENSURE_SUCCESS(rv, RESULT_RETRY); NS_ENSURE_SUCCESS(rv, RESULT_RETRY);
}
// Set up our listeners. // Set up our listeners.
mDefaultDBState->insertListener = new InsertCookieDBListener(mDefaultDBState); mDefaultDBState->insertListener = new InsertCookieDBListener(mDefaultDBState);

View file

@ -407,7 +407,6 @@ xTruncate(sqlite3_file *pFile, sqlite_int64 size)
IOThreadAutoTimer ioTimer(Telemetry::MOZ_SQLITE_TRUNCATE_MS); IOThreadAutoTimer ioTimer(Telemetry::MOZ_SQLITE_TRUNCATE_MS);
telemetry_file *p = (telemetry_file *)pFile; telemetry_file *p = (telemetry_file *)pFile;
int rc; int rc;
Telemetry::AutoTimer<Telemetry::MOZ_SQLITE_TRUNCATE_MS> timer;
if (p->quotaObject) { if (p->quotaObject) {
if (p->fileChunkSize > 0) { if (p->fileChunkSize > 0) {
// Round up to the smallest multiple of the chunk size that will hold all // 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, IOThreadAutoTimer ioTimer(Telemetry::MOZ_SQLITE_OPEN_MS,
IOInterposeObserver::OpCreateOrOpen); IOInterposeObserver::OpCreateOrOpen);
Telemetry::AutoTimer<Telemetry::MOZ_SQLITE_OPEN_MS> timer;
sqlite3_vfs *orig_vfs = static_cast<sqlite3_vfs*>(vfs->pAppData); sqlite3_vfs *orig_vfs = static_cast<sqlite3_vfs*>(vfs->pAppData);
int rc; int rc;
telemetry_file *p = (telemetry_file *)pFile; telemetry_file *p = (telemetry_file *)pFile;

View file

@ -226,7 +226,6 @@ bool
AsyncExecuteStatements::executeStatement(sqlite3_stmt *aStatement) AsyncExecuteStatements::executeStatement(sqlite3_stmt *aStatement)
{ {
mMutex.AssertNotCurrentThreadOwns(); mMutex.AssertNotCurrentThreadOwns();
Telemetry::AutoTimer<Telemetry::MOZ_STORAGE_ASYNC_REQUESTS_MS> finallySendExecutionDuration(mRequestStartDate);
while (true) { while (true) {
// lock the sqlite mutex so sqlite3_errmsg cannot change // lock the sqlite mutex so sqlite3_errmsg cannot change
SQLiteMutexAutoLock lockedScope(mDBMutex); SQLiteMutexAutoLock lockedScope(mDBMutex);

View file

@ -412,8 +412,6 @@ Classifier::Check(const nsACString& aSpec,
uint32_t aFreshnessGuarantee, uint32_t aFreshnessGuarantee,
LookupResultArray& aResults) LookupResultArray& aResults)
{ {
Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_CL_CHECK_TIME> timer;
// Get the set of fragments based on the url. This is necessary because we // 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 // only look up at most 5 URLs per aSpec, even if aSpec has more than 5
// components. // components.
@ -505,8 +503,6 @@ Classifier::Check(const nsACString& aSpec,
nsresult nsresult
Classifier::ApplyUpdates(nsTArray<TableUpdate*>* aUpdates) Classifier::ApplyUpdates(nsTArray<TableUpdate*>* aUpdates)
{ {
Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_CL_UPDATE_TIME> timer;
PRIntervalTime clockStart = 0; PRIntervalTime clockStart = 0;
if (LOG_ENABLED()) { if (LOG_ENABLED()) {
clockStart = PR_IntervalNow(); clockStart = PR_IntervalNow();

View file

@ -541,8 +541,6 @@ static void EnsureSorted(T* aArray)
nsresult nsresult
LookupCacheV2::ConstructPrefixSet(AddPrefixArray& aAddPrefixes) LookupCacheV2::ConstructPrefixSet(AddPrefixArray& aAddPrefixes)
{ {
Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_PS_CONSTRUCT_TIME> timer;
nsTArray<uint32_t> array; nsTArray<uint32_t> array;
if (!array.SetCapacity(aAddPrefixes.Length(), fallible)) { if (!array.SetCapacity(aAddPrefixes.Length(), fallible)) {
return NS_ERROR_OUT_OF_MEMORY; return NS_ERROR_OUT_OF_MEMORY;

View file

@ -209,8 +209,6 @@ VariableLengthPrefixSet::LoadFromFile(nsIFile* aFile)
NS_ENSURE_ARG_POINTER(aFile); NS_ENSURE_ARG_POINTER(aFile);
Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_VLPS_FILELOAD_TIME> timer;
nsCOMPtr<nsIInputStream> localInFile; nsCOMPtr<nsIInputStream> localInFile;
nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(localInFile), aFile, nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(localInFile), aFile,
PR_RDONLY | nsIFile::OS_READAHEAD); PR_RDONLY | nsIFile::OS_READAHEAD);
@ -255,15 +253,12 @@ VariableLengthPrefixSet::StoreToFile(nsIFile* aFile)
uint32_t fileSize = 0; uint32_t fileSize = 0;
// Preallocate the file storage // Preallocate the file storage
{
nsCOMPtr<nsIFileOutputStream> fos(do_QueryInterface(localOutFile)); nsCOMPtr<nsIFileOutputStream> fos(do_QueryInterface(localOutFile));
Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_VLPS_FALLOCATE_TIME> timer;
fileSize += mFixedPrefixSet->CalculatePreallocateSize(); fileSize += mFixedPrefixSet->CalculatePreallocateSize();
fileSize += CalculatePreallocateSize(); fileSize += CalculatePreallocateSize();
Unused << fos->Preallocate(fileSize); Unused << fos->Preallocate(fileSize);
}
// Convert to buffered stream // Convert to buffered stream
nsCOMPtr<nsIOutputStream> out = nsCOMPtr<nsIOutputStream> out =

View file

@ -1814,8 +1814,6 @@ nsUrlClassifierDBService::Shutdown()
gShuttingDownThread = true; gShuttingDownThread = true;
Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_SHUTDOWN_TIME> timer;
mCompleters.Clear(); mCompleters.Clear();
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);

View file

@ -315,8 +315,6 @@ nsUrlClassifierPrefixSet::LoadFromFile(nsIFile* aFile)
{ {
MutexAutoLock lock(mLock); MutexAutoLock lock(mLock);
Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_PS_FILELOAD_TIME> timer;
nsCOMPtr<nsIInputStream> localInFile; nsCOMPtr<nsIInputStream> localInFile;
nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(localInFile), aFile, nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(localInFile), aFile,
PR_RDONLY | nsIFile::OS_READAHEAD); PR_RDONLY | nsIFile::OS_READAHEAD);
@ -356,17 +354,13 @@ nsUrlClassifierPrefixSet::StoreToFile(nsIFile* aFile)
uint32_t fileSize; uint32_t fileSize;
// Preallocate the file storage
{
nsCOMPtr<nsIFileOutputStream> fos(do_QueryInterface(localOutFile)); nsCOMPtr<nsIFileOutputStream> fos(do_QueryInterface(localOutFile));
Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_PS_FALLOCATE_TIME> timer;
fileSize = CalculatePreallocateSize(); fileSize = CalculatePreallocateSize();
// Ignore failure, the preallocation is a hint and we write out the entire // Ignore failure, the preallocation is a hint and we write out the entire
// file later on // file later on
Unused << fos->Preallocate(fileSize); Unused << fos->Preallocate(fileSize);
}
// Convert to buffered stream // Convert to buffered stream
nsCOMPtr<nsIOutputStream> out = nsCOMPtr<nsIOutputStream> out =

View file

@ -716,9 +716,6 @@ nsIdleService::IdleTimerCallback(void)
return; return;
} }
// Tell expired listeners they are expired,and find the next timeout
Telemetry::AutoTimer<Telemetry::IDLE_NOTIFY_IDLE_MS> timer;
// We need to initialise the time to the next idle switch. // We need to initialise the time to the next idle switch.
mDeltaToNextIdleSwitchInS = UINT32_MAX; mDeltaToNextIdleSwitchInS = UINT32_MAX;

View file

@ -440,7 +440,6 @@ ResidentDistinguishedAmountHelper(int64_t* aN, bool aDoPurge)
{ {
#ifdef HAVE_JEMALLOC_STATS #ifdef HAVE_JEMALLOC_STATS
if (aDoPurge) { if (aDoPurge) {
Telemetry::AutoTimer<Telemetry::MEMORY_FREE_PURGED_PAGES_MS> timer;
jemalloc_purge_freed_pages(); jemalloc_purge_freed_pages();
} }
#endif #endif