diff --git a/dom/media/webspeech/synth/windows/SapiService.cpp b/dom/media/webspeech/synth/windows/SapiService.cpp index 22f5fa4cdd8..1aa58cfbca5 100644 --- a/dom/media/webspeech/synth/windows/SapiService.cpp +++ b/dom/media/webspeech/synth/windows/SapiService.cpp @@ -196,6 +196,8 @@ SapiService::~SapiService() bool SapiService::Init() { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); + MOZ_ASSERT(!mInitialized); if (Preferences::GetBool("media.webspeech.synth.test") || diff --git a/dom/plugins/base/nsJSNPRuntime.cpp b/dom/plugins/base/nsJSNPRuntime.cpp index 8b91297e56d..130ab7d89b4 100644 --- a/dom/plugins/base/nsJSNPRuntime.cpp +++ b/dom/plugins/base/nsJSNPRuntime.cpp @@ -1646,6 +1646,8 @@ NPObjWrapper_Resolve(JSContext *cx, JS::Handle obj, JS::Handle if (JSID_IS_SYMBOL(id)) return true; + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::JS); + NPObject *npobj = GetNPObject(cx, obj); if (!npobj || !npobj->_class || !npobj->_class->hasProperty || @@ -2110,6 +2112,8 @@ static bool NPObjectMember_GetProperty(JSContext *cx, JS::HandleObject obj, JS::HandleId id, JS::MutableHandleValue vp) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); + if (JSID_IS_SYMBOL(id)) { JS::RootedSymbol sym(cx, JSID_TO_SYMBOL(id)); if (JS::GetSymbolCode(sym) == JS::SymbolCode::toPrimitive) { diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index 2438da164be..c437147aca9 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -265,6 +265,8 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag) inline PluginLibrary* GetNewPluginLibrary(nsPluginTag *aPluginTag) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); + if (!aPluginTag) { return nullptr; } @@ -283,6 +285,7 @@ GetNewPluginLibrary(nsPluginTag *aPluginTag) nsresult nsNPAPIPlugin::CreatePlugin(nsPluginTag *aPluginTag, nsNPAPIPlugin** aResult) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); *aResult = nullptr; if (!aPluginTag) { diff --git a/dom/plugins/base/nsNPAPIPluginInstance.cpp b/dom/plugins/base/nsNPAPIPluginInstance.cpp index b2f1ad374b6..e99010ead15 100644 --- a/dom/plugins/base/nsNPAPIPluginInstance.cpp +++ b/dom/plugins/base/nsNPAPIPluginInstance.cpp @@ -280,6 +280,7 @@ nsNPAPIPluginInstance::StopTime() nsresult nsNPAPIPluginInstance::Initialize(nsNPAPIPlugin *aPlugin, nsPluginInstanceOwner* aOwner, const nsACString& aMIMEType) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("nsNPAPIPluginInstance::Initialize this=%p\n",this)); NS_ENSURE_ARG_POINTER(aPlugin); @@ -655,6 +656,8 @@ nsresult nsNPAPIPluginInstance::HandleEvent(void* event, int16_t* result, if (RUNNING != mRunning) return NS_OK; + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); + if (!event) return NS_ERROR_FAILURE; diff --git a/dom/plugins/base/nsNPAPIPluginStreamListener.cpp b/dom/plugins/base/nsNPAPIPluginStreamListener.cpp index f5f0c40007a..0f500a1ae45 100644 --- a/dom/plugins/base/nsNPAPIPluginStreamListener.cpp +++ b/dom/plugins/base/nsNPAPIPluginStreamListener.cpp @@ -286,6 +286,7 @@ nsNPAPIPluginStreamListener::CallURLNotify(NPReason reason) nsresult nsNPAPIPluginStreamListener::OnStartBinding(nsPluginStreamListenerPeer* streamPeer) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); if (!mInst || !mInst->CanFireNotifications() || mStreamCleanedUp) return NS_ERROR_FAILURE; diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 171ee97b5c6..9b36fa542df 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -3522,6 +3522,7 @@ nsPluginHost::AddHeadersToChannel(const char *aHeadersData, nsresult nsPluginHost::StopPluginInstance(nsNPAPIPluginInstance* aInstance) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); if (PluginDestructionGuard::DelayDestroy(aInstance)) { return NS_OK; } diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index 31446ad2811..b29981bae22 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -3600,6 +3600,8 @@ nsPluginInstanceOwner::UpdateWindowVisibility(bool aVisible) void nsPluginInstanceOwner::UpdateDocumentActiveState(bool aIsActive) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); + mPluginDocumentActiveState = aIsActive; #ifndef XP_MACOSX UpdateWindowPositionAndClipRect(true); diff --git a/dom/storage/DOMStorageDBThread.cpp b/dom/storage/DOMStorageDBThread.cpp index 69142203cb8..37adce11f8f 100644 --- a/dom/storage/DOMStorageDBThread.cpp +++ b/dom/storage/DOMStorageDBThread.cpp @@ -154,6 +154,7 @@ DOMStorageDBThread::Shutdown() void DOMStorageDBThread::SyncPreload(DOMStorageCacheBridge* aCache, bool aForceSync) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::STORAGE); if (!aForceSync && aCache->LoadedCount()) { // Preload already started for this cache, just wait for it to finish. // LoadWait will exit after LoadDone on the cache has been called. diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index 269b87084d2..808341a445b 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -524,6 +524,8 @@ gfxDWriteFontEntry::GetFontTable(uint32_t aTag) nsresult gfxDWriteFontEntry::ReadCMAP(FontInfoData *aFontInfoData) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS); + // attempt this once, if errors occur leave a blank cmap if (mCharacterMap) { return NS_OK; diff --git a/gfx/thebes/gfxGDIFontList.cpp b/gfx/thebes/gfxGDIFontList.cpp index acb29b644ec..51e3c98db22 100644 --- a/gfx/thebes/gfxGDIFontList.cpp +++ b/gfx/thebes/gfxGDIFontList.cpp @@ -143,6 +143,8 @@ GDIFontEntry::GDIFontEntry(const nsAString& aFaceName, nsresult GDIFontEntry::ReadCMAP(FontInfoData *aFontInfoData) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); + // attempt this once, if errors occur leave a blank cmap if (mCharacterMap) { return NS_OK; diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index 6d1867daf06..b9230d211b6 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -1205,6 +1205,8 @@ InvalidateWindowForDeviceReset(HWND aWnd, LPARAM aMsg) bool gfxWindowsPlatform::UpdateForDeviceReset() { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS); + if (!DidRenderingDeviceReset()) { return false; } diff --git a/image/FrameAnimator.cpp b/image/FrameAnimator.cpp index f87ce242e0b..f1d8faea740 100644 --- a/image/FrameAnimator.cpp +++ b/image/FrameAnimator.cpp @@ -79,6 +79,7 @@ FrameAnimator::AdvanceFrame(TimeStamp aTime) { NS_ASSERTION(aTime <= TimeStamp::Now(), "Given time appears to be in the future"); + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS); uint32_t currentFrameIndex = mCurrentAnimationFrameIndex; uint32_t nextFrameIndex = currentFrameIndex + 1; diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp index f140d000b0b..0c3f6da1b32 100644 --- a/ipc/glue/GeckoChildProcessHost.cpp +++ b/ipc/glue/GeckoChildProcessHost.cpp @@ -381,6 +381,8 @@ GeckoChildProcessHost::AsyncLaunch(std::vector aExtraOpts, bool GeckoChildProcessHost::WaitUntilConnected(int32_t aTimeoutMs) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); + // NB: this uses a different mechanism than the chromium parent // class. PRIntervalTime timeoutTicks = (aTimeoutMs > 0) ? diff --git a/js/ipc/WrapperOwner.cpp b/js/ipc/WrapperOwner.cpp index 60093070352..93426e7ed8f 100644 --- a/js/ipc/WrapperOwner.cpp +++ b/js/ipc/WrapperOwner.cpp @@ -145,6 +145,7 @@ const char CPOWProxyHandler::family = 0; const CPOWProxyHandler CPOWProxyHandler::singleton; #define FORWARD(call, args) \ + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::JS); \ WrapperOwner* owner = OwnerOf(proxy); \ if (!owner->active()) { \ JS_ReportError(cx, "cannot use a CPOW whose process is gone"); \ diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp index 982c615cdac..fad59a1ff58 100644 --- a/js/xpconnect/src/XPCComponents.cpp +++ b/js/xpconnect/src/XPCComponents.cpp @@ -3010,6 +3010,7 @@ nsXPCComponents_Utils::SetGCZeal(int32_t aValue, JSContext* cx) NS_IMETHODIMP nsXPCComponents_Utils::NukeSandbox(HandleValue obj, JSContext* cx) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::JS); NS_ENSURE_TRUE(obj.isObject(), NS_ERROR_INVALID_ARG); JSObject* wrapper = &obj.toObject(); NS_ENSURE_TRUE(IsWrapper(wrapper), NS_ERROR_INVALID_ARG); diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp index bf505c42e53..5bd92624557 100644 --- a/startupcache/StartupCache.cpp +++ b/startupcache/StartupCache.cpp @@ -305,7 +305,10 @@ GetBufferFromZipArchive(nsZipArchive *zip, bool doCRC, const char* id, nsresult StartupCache::GetBuffer(const char* id, char** outbuf, uint32_t* length) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); + NS_ASSERTION(NS_IsMainThread(), "Startup cache only available on main thread"); + WaitOnWriteThread(); if (!mStartupWriteInitiated) { CacheEntry* entry; diff --git a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp index 7250cb889dd..47e9d4faf78 100644 --- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp +++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp @@ -1310,6 +1310,7 @@ nsUrlClassifierDBService::ClassifyLocalWithTables(nsIURI *aURI, const nsACString & aTables, nsACString & aTableResults) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); MOZ_ASSERT(NS_IsMainThread(), "ClassifyLocalWithTables must be on main thread"); nsCOMPtr uri = NS_GetInnermostURI(aURI); diff --git a/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp b/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp index 941de81e1ae..160965b81b0 100644 --- a/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp +++ b/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp @@ -203,6 +203,7 @@ nsWindowsSystemProxySettings::PatternMatch(const nsACString& aHost, nsresult nsWindowsSystemProxySettings::GetPACURI(nsACString& aResult) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::STORAGE); nsresult rv; uint32_t flags = 0; nsAutoString buf; diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp index d90887964bb..fe6d7826cb5 100644 --- a/toolkit/xre/nsXREDirProvider.cpp +++ b/toolkit/xre/nsXREDirProvider.cpp @@ -910,6 +910,8 @@ nsXREDirProvider::DoStartup() void nsXREDirProvider::DoShutdown() { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); + if (mProfileNotified) { nsCOMPtr obsSvc = mozilla::services::GetObserverService(); diff --git a/widget/nsBaseDragService.cpp b/widget/nsBaseDragService.cpp index 97e315706ad..eff398cd69d 100644 --- a/widget/nsBaseDragService.cpp +++ b/widget/nsBaseDragService.cpp @@ -211,6 +211,8 @@ nsBaseDragService::InvokeDragSession(nsIDOMNode *aDOMNode, nsIScriptableRegion* aDragRgn, uint32_t aActionType) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); + NS_ENSURE_TRUE(aDOMNode, NS_ERROR_INVALID_ARG); NS_ENSURE_TRUE(mSuppressLevel == 0, NS_ERROR_FAILURE); diff --git a/widget/windows/nsFilePicker.cpp b/widget/windows/nsFilePicker.cpp index 0a1fb327f75..caa473ad755 100644 --- a/widget/windows/nsFilePicker.cpp +++ b/widget/windows/nsFilePicker.cpp @@ -868,6 +868,7 @@ nsFilePicker::ShowXPFilePicker(const nsString& aInitialDir) bool nsFilePicker::ShowFilePicker(const nsString& aInitialDir, bool &aWasInitError) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); RefPtr dialog; if (mMode != modeSave) { if (FAILED(CoCreateInstance(CLSID_FileOpenDialog, nullptr, CLSCTX_INPROC, diff --git a/xpcom/io/FileUtilsWin.cpp b/xpcom/io/FileUtilsWin.cpp index 6781264ecf6..349bd8496e3 100644 --- a/xpcom/io/FileUtilsWin.cpp +++ b/xpcom/io/FileUtilsWin.cpp @@ -36,6 +36,8 @@ bool HandleToFilename(HANDLE aHandle, const LARGE_INTEGER& aOffset, nsAString& aFilename) { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::NETWORK); + aFilename.Truncate(); // This implementation is nice because it uses fully documented APIs that // are available on all Windows versions that we support. diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index 7eec0280ae1..bdf28b7d8d0 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -1070,6 +1070,7 @@ nsLocalFile::ResolveAndStat() return NS_OK; } + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); // we can't resolve/stat anything that isn't a valid NSPR addressable path if (mWorkingPath.IsEmpty()) { return NS_ERROR_FILE_INVALID_PATH; diff --git a/xpfe/appshell/nsXULWindow.cpp b/xpfe/appshell/nsXULWindow.cpp index 221f1b66934..675a2ff4ce0 100644 --- a/xpfe/appshell/nsXULWindow.cpp +++ b/xpfe/appshell/nsXULWindow.cpp @@ -383,6 +383,8 @@ NS_IMETHODIMP nsXULWindow::RemoveChildWindow(nsIXULWindow *aChild) NS_IMETHODIMP nsXULWindow::ShowModal() { + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER); + // Store locally so it doesn't die on us nsCOMPtr window = mWindow; nsCOMPtr tempRef = this;