Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 583ca72

Browse files
author
David Rajchenbach-Teller
committed
Bug 1224374 - Profiler labels for the top 26-100 chrome hangs;r=BenWa
--HG-- extra : rebase_source : 39e94507c0288863e495322a6899ff009840870d
1 parent 42b6a41 commit 583ca72

24 files changed

Lines changed: 50 additions & 0 deletions

dom/media/webspeech/synth/windows/SapiService.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "SapiService.h"
99
#include "nsServiceManagerUtils.h"
1010
#include "nsWin32Locale.h"
11+
#include "GeckoProfiler.h"
1112

1213
#include "mozilla/dom/nsSynthVoiceRegistry.h"
1314
#include "mozilla/dom/nsSpeechTask.h"
@@ -196,6 +197,8 @@ SapiService::~SapiService()
196197
bool
197198
SapiService::Init()
198199
{
200+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
201+
199202
MOZ_ASSERT(!mInitialized);
200203

201204
if (Preferences::GetBool("media.webspeech.synth.test") ||

dom/plugins/base/nsJSNPRuntime.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,6 +1646,8 @@ NPObjWrapper_Resolve(JSContext *cx, JS::Handle<JSObject*> obj, JS::Handle<jsid>
16461646
if (JSID_IS_SYMBOL(id))
16471647
return true;
16481648

1649+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::JS);
1650+
16491651
NPObject *npobj = GetNPObject(cx, obj);
16501652

16511653
if (!npobj || !npobj->_class || !npobj->_class->hasProperty ||
@@ -2110,6 +2112,8 @@ static bool
21102112
NPObjectMember_GetProperty(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
21112113
JS::MutableHandleValue vp)
21122114
{
2115+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
2116+
21132117
if (JSID_IS_SYMBOL(id)) {
21142118
JS::RootedSymbol sym(cx, JSID_TO_SYMBOL(id));
21152119
if (JS::GetSymbolCode(sym) == JS::SymbolCode::toPrimitive) {

dom/plugins/base/nsNPAPIPlugin.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
265265
inline PluginLibrary*
266266
GetNewPluginLibrary(nsPluginTag *aPluginTag)
267267
{
268+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
269+
268270
if (!aPluginTag) {
269271
return nullptr;
270272
}
@@ -283,6 +285,7 @@ GetNewPluginLibrary(nsPluginTag *aPluginTag)
283285
nsresult
284286
nsNPAPIPlugin::CreatePlugin(nsPluginTag *aPluginTag, nsNPAPIPlugin** aResult)
285287
{
288+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
286289
*aResult = nullptr;
287290

288291
if (!aPluginTag) {

dom/plugins/base/nsNPAPIPluginInstance.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ nsNPAPIPluginInstance::StopTime()
280280

281281
nsresult nsNPAPIPluginInstance::Initialize(nsNPAPIPlugin *aPlugin, nsPluginInstanceOwner* aOwner, const nsACString& aMIMEType)
282282
{
283+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
283284
PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("nsNPAPIPluginInstance::Initialize this=%p\n",this));
284285

285286
NS_ENSURE_ARG_POINTER(aPlugin);
@@ -655,6 +656,8 @@ nsresult nsNPAPIPluginInstance::HandleEvent(void* event, int16_t* result,
655656
if (RUNNING != mRunning)
656657
return NS_OK;
657658

659+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
660+
658661
if (!event)
659662
return NS_ERROR_FAILURE;
660663

dom/plugins/base/nsNPAPIPluginStreamListener.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ nsNPAPIPluginStreamListener::CallURLNotify(NPReason reason)
286286
nsresult
287287
nsNPAPIPluginStreamListener::OnStartBinding(nsPluginStreamListenerPeer* streamPeer)
288288
{
289+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
289290
if (!mInst || !mInst->CanFireNotifications() || mStreamCleanedUp)
290291
return NS_ERROR_FAILURE;
291292

dom/plugins/base/nsPluginHost.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3522,6 +3522,7 @@ nsPluginHost::AddHeadersToChannel(const char *aHeadersData,
35223522
nsresult
35233523
nsPluginHost::StopPluginInstance(nsNPAPIPluginInstance* aInstance)
35243524
{
3525+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
35253526
if (PluginDestructionGuard::DelayDestroy(aInstance)) {
35263527
return NS_OK;
35273528
}

dom/plugins/base/nsPluginInstanceOwner.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3600,6 +3600,8 @@ nsPluginInstanceOwner::UpdateWindowVisibility(bool aVisible)
36003600
void
36013601
nsPluginInstanceOwner::UpdateDocumentActiveState(bool aIsActive)
36023602
{
3603+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
3604+
36033605
mPluginDocumentActiveState = aIsActive;
36043606
#ifndef XP_MACOSX
36053607
UpdateWindowPositionAndClipRect(true);

dom/storage/DOMStorageDBThread.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ DOMStorageDBThread::Shutdown()
154154
void
155155
DOMStorageDBThread::SyncPreload(DOMStorageCacheBridge* aCache, bool aForceSync)
156156
{
157+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::STORAGE);
157158
if (!aForceSync && aCache->LoadedCount()) {
158159
// Preload already started for this cache, just wait for it to finish.
159160
// LoadWait will exit after LoadDone on the cache has been called.

gfx/thebes/gfxDWriteFontList.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,8 @@ gfxDWriteFontEntry::GetFontTable(uint32_t aTag)
524524
nsresult
525525
gfxDWriteFontEntry::ReadCMAP(FontInfoData *aFontInfoData)
526526
{
527+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS);
528+
527529
// attempt this once, if errors occur leave a blank cmap
528530
if (mCharacterMap) {
529531
return NS_OK;

gfx/thebes/gfxGDIFontList.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "nsISimpleEnumerator.h"
2525
#include "nsIWindowsRegKey.h"
2626
#include "gfxFontConstants.h"
27+
#include "GeckoProfiler.h"
2728

2829
#include "mozilla/MemoryReporting.h"
2930
#include "mozilla/Telemetry.h"
@@ -143,6 +144,8 @@ GDIFontEntry::GDIFontEntry(const nsAString& aFaceName,
143144
nsresult
144145
GDIFontEntry::ReadCMAP(FontInfoData *aFontInfoData)
145146
{
147+
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
148+
146149
// attempt this once, if errors occur leave a blank cmap
147150
if (mCharacterMap) {
148151
return NS_OK;

0 commit comments

Comments
 (0)