Bug 1007203 - Always add categories when pushing to the pseudostack, r=djvj

This commit is contained in:
Victor Porof 2014-05-23 17:12:29 -04:00
Родитель 8b46d73b7c
Коммит 9ce7e9c089
79 изменённых файлов: 573 добавлений и 319 удалений

Просмотреть файл

@ -453,7 +453,8 @@ nsFrameLoader::ReallyStartLoadingInternal()
{
NS_ENSURE_STATE(mURIToLoad && mOwnerContent && mOwnerContent->IsInDoc());
PROFILER_LABEL("nsFrameLoader", "ReallyStartLoading");
PROFILER_LABEL("nsFrameLoader", "ReallyStartLoading",
js::ProfileEntry::Category::OTHER);
nsresult rv = MaybeCreateDocShell();
if (NS_FAILED(rv)) {
@ -2099,7 +2100,8 @@ nsFrameLoader::TryRemoteBrowser()
return false;
}
PROFILER_LABEL("nsFrameLoader", "CreateRemoteBrowser");
PROFILER_LABEL("nsFrameLoader", "CreateRemoteBrowser",
js::ProfileEntry::Category::OTHER);
MutableTabContext context;
nsCOMPtr<mozIApplication> ownApp = GetOwnApp();

Просмотреть файл

@ -920,7 +920,8 @@ NS_IMETHODIMP
nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
nsISupports *aContext)
{
PROFILER_LABEL("nsObjectLoadingContent", "OnStartRequest");
PROFILER_LABEL("nsObjectLoadingContent", "OnStartRequest",
js::ProfileEntry::Category::NETWORK);
LOG(("OBJLC [%p]: Channel OnStartRequest", this));
@ -982,6 +983,9 @@ nsObjectLoadingContent::OnStopRequest(nsIRequest *aRequest,
nsISupports *aContext,
nsresult aStatusCode)
{
PROFILER_LABEL("nsObjectLoadingContent", "OnStopRequest",
js::ProfileEntry::Category::NETWORK);
NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_NOT_AVAILABLE);
if (aRequest != mChannel) {

Просмотреть файл

@ -1913,7 +1913,9 @@ nsXMLHttpRequest::OnDataAvailable(nsIRequest *request,
NS_IMETHODIMP
nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
{
PROFILER_LABEL("nsXMLHttpRequest", "OnStartRequest");
PROFILER_LABEL("nsXMLHttpRequest", "OnStartRequest",
js::ProfileEntry::Category::NETWORK);
nsresult rv = NS_OK;
if (!mFirstStartRequestSeen && mRequestObserver) {
mFirstStartRequestSeen = true;
@ -2155,7 +2157,9 @@ nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
NS_IMETHODIMP
nsXMLHttpRequest::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult status)
{
PROFILER_LABEL("content", "nsXMLHttpRequest::OnStopRequest");
PROFILER_LABEL("nsXMLHttpRequest", "OnStopRequest",
js::ProfileEntry::Category::NETWORK);
if (request != mChannel) {
// Can this still happen?
return NS_OK;

Просмотреть файл

@ -76,7 +76,8 @@ nsGenericHTMLFrameElement::BindToTree(nsIDocument* aDocument,
NS_ASSERTION(!nsContentUtils::IsSafeToRunScript(),
"Missing a script blocker!");
PROFILER_LABEL("nsGenericHTMLFrameElement", "BindToTree");
PROFILER_LABEL("nsGenericHTMLFrameElement", "BindToTree",
js::ProfileEntry::Category::OTHER);
// We're in a document now. Kick off the frame load.
LoadSrc();

Просмотреть файл

@ -73,7 +73,8 @@ private:
NS_IMETHODIMP
PluginStreamListener::OnStartRequest(nsIRequest* request, nsISupports *ctxt)
{
PROFILER_LABEL("PluginStreamListener", "OnStartRequest");
PROFILER_LABEL("PluginStreamListener", "OnStartRequest",
js::ProfileEntry::Category::NETWORK);
nsCOMPtr<nsIContent> embed = mPluginDoc->GetPluginContent();
nsCOMPtr<nsIObjectLoadingContent> objlc = do_QueryInterface(embed);

Просмотреть файл

@ -275,7 +275,8 @@ SVGIFrameElement::BindToTree(nsIDocument* aDocument,
NS_ASSERTION(!nsContentUtils::IsSafeToRunScript(),
"Missing a script blocker!");
PROFILER_LABEL("SVGIFrameElement", "BindToTree");
PROFILER_LABEL("SVGIFrameElement", "BindToTree",
js::ProfileEntry::Category::OTHER);
// We're in a document now. Kick off the frame load.
LoadSrc();

Просмотреть файл

@ -663,7 +663,9 @@ nsDOMWindowUtils::SendMouseEventToWindow(const nsAString& aType,
bool aIsSynthesized,
uint8_t aOptionalArgCount)
{
PROFILER_LABEL("nsDOMWindowUtils", "SendMouseEventToWindow");
PROFILER_LABEL("nsDOMWindowUtils", "SendMouseEventToWindow",
js::ProfileEntry::Category::EVENTS);
return SendMouseEventCommon(aType, aX, aY, aButton, aClickCount, aModifiers,
aIgnoreRootScrollFrame, aPressure,
aInputSourceArg, true, nullptr,
@ -1425,7 +1427,9 @@ NS_IMETHODIMP
nsDOMWindowUtils::GarbageCollect(nsICycleCollectorListener *aListener,
int32_t aExtraForgetSkippableCalls)
{
PROFILER_LABEL("GC", "GarbageCollect");
PROFILER_LABEL("nsDOMWindowUtils", "GarbageCollect",
js::ProfileEntry::Category::GC);
// Always permit this in debug builds.
#ifndef DEBUG
if (!nsContentUtils::IsCallerChrome()) {

Просмотреть файл

@ -1717,7 +1717,8 @@ nsJSContext::GarbageCollectNow(JS::gcreason::Reason aReason,
IsShrinking aShrinking,
int64_t aSliceMillis)
{
PROFILER_LABEL("GC", "GarbageCollectNow");
PROFILER_LABEL("nsJSContext", "GarbageCollectNow",
js::ProfileEntry::Category::GC);
MOZ_ASSERT_IF(aSliceMillis, aIncremental == IncrementalGC);
@ -1759,7 +1760,8 @@ nsJSContext::GarbageCollectNow(JS::gcreason::Reason aReason,
void
nsJSContext::ShrinkGCBuffersNow()
{
PROFILER_LABEL("GC", "ShrinkGCBuffersNow");
PROFILER_LABEL("nsJSContext", "ShrinkGCBuffersNow",
js::ProfileEntry::Category::GC);
KillShrinkGCBuffersTimer();
@ -1940,7 +1942,9 @@ nsJSContext::CycleCollectNow(nsICycleCollectorListener *aListener,
return;
}
PROFILER_LABEL("CC", "CycleCollectNow");
PROFILER_LABEL("nsJSContext", "CycleCollectNow",
js::ProfileEntry::Category::CC);
gCCStats.PrepareForCycleCollectionSlice(aExtraForgetSkippableCalls);
nsCycleCollector_collect(aListener);
gCCStats.FinishCycleCollectionSlice();
@ -1954,7 +1958,8 @@ nsJSContext::RunCycleCollectorSlice()
return;
}
PROFILER_LABEL("CC", "RunCycleCollectorSlice");
PROFILER_LABEL("nsJSContext", "RunCycleCollectorSlice",
js::ProfileEntry::Category::CC);
gCCStats.PrepareForCycleCollectionSlice();
@ -1990,7 +1995,8 @@ nsJSContext::RunCycleCollectorWorkSlice(int64_t aWorkBudget)
return;
}
PROFILER_LABEL("CC", "RunCycleCollectorWorkSlice");
PROFILER_LABEL("nsJSContext", "RunCycleCollectorWorkSlice",
js::ProfileEntry::Category::CC);
gCCStats.PrepareForCycleCollectionSlice();
nsCycleCollector_collectSliceWork(aWorkBudget);

Просмотреть файл

@ -196,7 +196,9 @@ nsJSUtils::EvaluateString(JSContext* aCx,
JS::MutableHandle<JS::Value> aRetValue,
void **aOffThreadToken)
{
PROFILER_LABEL("JS", "EvaluateString");
PROFILER_LABEL("nsJSUtils", "EvaluateString",
js::ProfileEntry::Category::JS);
MOZ_ASSERT_IF(aCompileOptions.versionSet,
aCompileOptions.version != JSVERSION_UNKNOWN);
MOZ_ASSERT_IF(aEvaluateOptions.coerceToString, aEvaluateOptions.needResult);

Просмотреть файл

@ -388,7 +388,9 @@ EventDispatcher::Dispatch(nsISupports* aTarget,
EventDispatchingCallback* aCallback,
nsCOMArray<EventTarget>* aTargets)
{
PROFILER_LABEL("EventDispatcher", "Dispatch");
PROFILER_LABEL("EventDispatcher", "Dispatch",
js::ProfileEntry::Category::EVENTS);
NS_ASSERTION(aEvent, "Trying to dispatch without WidgetEvent!");
NS_ENSURE_TRUE(!aEvent->mFlags.mIsBeingDispatched,
NS_ERROR_DOM_INVALID_STATE_ERR);

Просмотреть файл

@ -3573,7 +3573,9 @@ CreateMouseOrPointerWidgetEvent(WidgetMouseEvent* aMouseEvent,
{
WidgetPointerEvent* sourcePointer = aMouseEvent->AsPointerEvent();
if (sourcePointer) {
PROFILER_LABEL("Input", "DispatchPointerEvent");
PROFILER_LABEL("Input", "DispatchPointerEvent",
js::ProfileEntry::Category::EVENTS);
nsAutoPtr<WidgetPointerEvent> newPointerEvent;
newPointerEvent =
new WidgetPointerEvent(aMouseEvent->mFlags.mIsTrusted, aMessage,
@ -3644,7 +3646,8 @@ EventStateManager::DispatchMouseOrPointerEvent(WidgetMouseEvent* aMouseEvent,
nsIFrame* targetFrame = nullptr;
if (aMouseEvent->AsMouseEvent()) {
PROFILER_LABEL("Input", "DispatchMouseEvent");
PROFILER_LABEL("Input", "DispatchMouseEvent",
js::ProfileEntry::Category::EVENTS);
}
nsEventStatus status = nsEventStatus_eIgnore;

Просмотреть файл

@ -189,7 +189,8 @@ NS_IMETHODIMP
AsyncConnectionHelper::Run()
{
if (NS_IsMainThread()) {
PROFILER_MAIN_THREAD_LABEL("IndexedDB", "AsyncConnectionHelper::Run");
PROFILER_MAIN_THREAD_LABEL("AsyncConnectionHelper", "Run",
js::ProfileEntry::Category::STORAGE);
if (mTransaction &&
mTransaction->IsAborted()) {
@ -271,7 +272,8 @@ AsyncConnectionHelper::Run()
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "AsyncConnectionHelper::Run");
PROFILER_LABEL("AsyncConnectionHelper", "Run",
js::ProfileEntry::Category::STORAGE);
IDB_PROFILER_MARK_IF(mRequest,
"IndexedDB Request %llu: Beginning database work",
@ -452,7 +454,8 @@ AsyncConnectionHelper::OnSuccess()
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(mRequest, "Null request!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB", "AsyncConnectionHelper::OnSuccess");
PROFILER_MAIN_THREAD_LABEL("AsyncConnectionHelper", "OnSuccess",
js::ProfileEntry::Category::STORAGE);
nsRefPtr<nsIDOMEvent> event = CreateSuccessEvent(mRequest);
if (!event) {
@ -488,7 +491,8 @@ AsyncConnectionHelper::OnError()
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(mRequest, "Null request!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB", "AsyncConnectionHelper::OnError");
PROFILER_MAIN_THREAD_LABEL("AsyncConnectionHelper", "OnError",
js::ProfileEntry::Category::STORAGE);
// Make an error event and fire it at the target.
nsRefPtr<nsIDOMEvent> event =

Просмотреть файл

@ -983,7 +983,8 @@ CursorHelper::Dispatch(nsIEventTarget* aDatabaseThread)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB", "CursorHelper::Dispatch");
PROFILER_MAIN_THREAD_LABEL("CursorHelper", "Dispatch",
js::ProfileEntry::Category::STORAGE);
if (IndexedDatabaseManager::IsMainProcess()) {
return AsyncConnectionHelper::Dispatch(aDatabaseThread);
@ -1019,7 +1020,8 @@ ContinueHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "ContinueHelper::DoDatabaseWork");
PROFILER_LABEL("ContinueHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
// We need to pick a query based on whether or not the cursor's mContinueToKey
// is set. If it is unset then othing was passed to continue so we'll grab the
@ -1101,8 +1103,8 @@ ContinueHelper::PackArgumentsForParentProcess(CursorRequestParams& aParams)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"ContinueHelper::PackArgumentsForParentProcess");
PROFILER_MAIN_THREAD_LABEL("ContinueHelper", "PackArgumentsForParentProcess",
js::ProfileEntry::Category::STORAGE);
ContinueParams params;
@ -1119,8 +1121,8 @@ ContinueHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"ContinueHelper::SendResponseToChildProcess");
PROFILER_MAIN_THREAD_LABEL("ContinueHelper", "SendResponseToChildProcess",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");

Просмотреть файл

@ -802,7 +802,8 @@ CreateObjectStoreHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "CreateObjectStoreHelper::DoDatabaseWork");
PROFILER_LABEL("CreateObjectStoreHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
if (IndexedDatabaseManager::InLowDiskSpaceMode()) {
NS_WARNING("Refusing to create additional objectStore because disk space "
@ -862,7 +863,8 @@ DeleteObjectStoreHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "DeleteObjectStoreHelper::DoDatabaseWork");
PROFILER_LABEL("DeleteObjectStoreHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
nsCOMPtr<mozIStorageStatement> stmt =
mTransaction->GetCachedStatement(NS_LITERAL_CSTRING(
@ -888,7 +890,8 @@ CreateFileHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "CreateFileHelper::DoDatabaseWork");
PROFILER_LABEL("CreateFileHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
if (IndexedDatabaseManager::InLowDiskSpaceMode()) {
NS_WARNING("Refusing to create file because disk space is low!");

Просмотреть файл

@ -1033,7 +1033,8 @@ IndexHelper::Dispatch(nsIEventTarget* aDatabaseThread)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB", "IndexHelper::Dispatch");
PROFILER_MAIN_THREAD_LABEL("IndexHelper", "Dispatch",
js::ProfileEntry::Category::STORAGE);
if (IndexedDatabaseManager::IsMainProcess()) {
return AsyncConnectionHelper::Dispatch(aDatabaseThread);
@ -1070,7 +1071,8 @@ GetKeyHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(mKeyRange, "Must have a key range here!");
PROFILER_LABEL("IndexedDB", "GetKeyHelper::DoDatabaseWork");
PROFILER_LABEL("GetKeyHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
nsCString indexTable;
if (mIndex->IsUnique()) {
@ -1136,8 +1138,8 @@ GetKeyHelper::PackArgumentsForParentProcess(IndexRequestParams& aParams)
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(mKeyRange, "This should never be null!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetKeyHelper::PackArgumentsForParentProcess");
PROFILER_MAIN_THREAD_LABEL("GetKeyHelper", "PackArgumentsForParentProcess",
js::ProfileEntry::Category::STORAGE);
GetKeyParams params;
@ -1153,8 +1155,8 @@ GetKeyHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetKeyHelper::SendResponseToChildProcess");
PROFILER_MAIN_THREAD_LABEL("GetKeyHelper", "SendResponseToChildProcess",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -1194,7 +1196,8 @@ GetHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(mKeyRange, "Must have a key range here!");
PROFILER_LABEL("IndexedDB", "GetHelper::DoDatabaseWork [IDBIndex.cpp]");
PROFILER_LABEL("GetHelper", "DoDatabaseWork [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
nsCString indexTable;
if (mIndex->IsUnique()) {
@ -1268,9 +1271,8 @@ GetHelper::PackArgumentsForParentProcess(IndexRequestParams& aParams)
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(mKeyRange, "This should never be null!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetHelper::PackArgumentsForParentProcess "
"[IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetHelper", "PackArgumentsForParentProcess [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
GetParams params;
@ -1286,9 +1288,8 @@ GetHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetHelper::SendResponseToChildProcess "
"[IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetHelper", "SendResponseToChildProcess [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -1362,8 +1363,8 @@ GetAllKeysHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
MOZ_ASSERT(!NS_IsMainThread());
MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
PROFILER_LABEL("IndexedDB",
"GetAllKeysHelper::DoDatabaseWork [IDBIndex.cpp]");
PROFILER_LABEL("GetAllKeysHelper", "DoDatabaseWork [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
nsCString tableName;
if (mIndex->IsUnique()) {
@ -1429,9 +1430,8 @@ GetAllKeysHelper::GetSuccessResult(JSContext* aCx,
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mKeys.Length() <= mLimit);
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetAllKeysHelper::GetSuccessResult "
"[IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetAllKeysHelper", "GetSuccessResult [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
nsTArray<Key> keys;
mKeys.SwapElements(keys);
@ -1476,9 +1476,8 @@ GetAllKeysHelper::PackArgumentsForParentProcess(IndexRequestParams& aParams)
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetAllKeysHelper::PackArgumentsForParentProcess "
"[IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetAllKeysHelper", "PackArgumentsForParentProcess [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
GetAllKeysParams params;
@ -1503,9 +1502,8 @@ GetAllKeysHelper::SendResponseToChildProcess(nsresult aResultCode)
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetAllKeysHelper::SendResponseToChildProcess "
"[IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetAllKeysHelper", "SendResponseToChildProcess [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -1545,7 +1543,8 @@ GetAllHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "GetAllHelper::DoDatabaseWork [IDBIndex.cpp]");
PROFILER_LABEL("GetAllHelper", "DoDatabaseWork [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
nsCString indexTable;
if (mIndex->IsUnique()) {
@ -1637,9 +1636,8 @@ GetAllHelper::PackArgumentsForParentProcess(IndexRequestParams& aParams)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetAllHelper::PackArgumentsForParentProcess "
"[IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetAllHelper", "PackArgumentsForParentProcess [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
GetAllParams params;
@ -1664,9 +1662,8 @@ GetAllHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetAllHelper::SendResponseToChildProcess "
"[IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetAllHelper", "SendResponseToChildProcess [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -1770,7 +1767,8 @@ OpenKeyCursorHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(aConnection, "Passed a null connection!");
PROFILER_LABEL("IndexedDB", "OpenKeyCursorHelper::DoDatabaseWork");
PROFILER_LABEL("OpenKeyCursorHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
nsCString table;
if (mIndex->IsUnique()) {
@ -1979,9 +1977,8 @@ OpenKeyCursorHelper::PackArgumentsForParentProcess(IndexRequestParams& aParams)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenKeyCursorHelper::"
"PackArgumentsForParentProcess [IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("OpenKeyCursorHelper", "PackArgumentsForParentProcess [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
OpenKeyCursorParams params;
@ -2007,8 +2004,8 @@ OpenKeyCursorHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(!mCursor, "Shouldn't have this yet!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenKeyCursorHelper::SendResponseToChildProcess");
PROFILER_MAIN_THREAD_LABEL("OpenKeyCursorHelper", "SendResponseToChildProcess",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -2104,8 +2101,8 @@ OpenCursorHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(aConnection, "Passed a null connection!");
PROFILER_LABEL("IndexedDB",
"OpenCursorHelper::DoDatabaseWork [IDBIndex.cpp]");
PROFILER_LABEL("OpenCursorHelper", "DoDatabaseWork [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
nsCString indexTable;
if (mIndex->IsUnique()) {
@ -2322,9 +2319,8 @@ OpenCursorHelper::PackArgumentsForParentProcess(IndexRequestParams& aParams)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenCursorHelper::PackArgumentsForParentProcess "
"[IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("OpenCursorHelper", "PackArgumentsForParentProcess [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
OpenCursorParams params;
@ -2350,9 +2346,8 @@ OpenCursorHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(!mCursor, "Shouldn't have this yet!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenCursorHelper::SendResponseToChildProcess "
"[IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("OpenCursorHelper", "SendResponseToChildProcess [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -2437,7 +2432,8 @@ CountHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "CountHelper::DoDatabaseWork [IDBIndex.cpp]");
PROFILER_LABEL("CountHelper", "DoDatabaseWork [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
nsCString table;
if (mIndex->IsUnique()) {
@ -2516,9 +2512,8 @@ CountHelper::PackArgumentsForParentProcess(IndexRequestParams& aParams)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"CountHelper::PackArgumentsForParentProcess "
"[IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("CountHelper", "PackArgumentsForParentProcess [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
CountParams params;
@ -2541,9 +2536,8 @@ CountHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"CountHelper::SendResponseToChildProcess "
"[IDBIndex.cpp]");
PROFILER_MAIN_THREAD_LABEL("CountHelper", "SendResponseToChildProcess [IDBIndex.cpp]",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");

Просмотреть файл

@ -1081,7 +1081,8 @@ IDBObjectStore::UpdateIndexes(IDBTransaction* aTransaction,
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "IDBObjectStore::UpdateIndexes");
PROFILER_LABEL("IDBObjectStore", "UpdateIndexes",
js::ProfileEntry::Category::STORAGE);
nsresult rv;
@ -1186,8 +1187,8 @@ IDBObjectStore::GetStructuredCloneReadInfoFromStatement(
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB",
"IDBObjectStore::GetStructuredCloneReadInfoFromStatement");
PROFILER_LABEL("IDBObjectStore", "GetStructuredCloneReadInfoFromStatement",
js::ProfileEntry::Category::STORAGE);
#ifdef DEBUG
{
@ -2977,7 +2978,8 @@ CopyData(nsIInputStream* aInputStream, nsIOutputStream* aOutputStream)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "CopyData");
PROFILER_LABEL("IDBObjectStore", "CopyData",
js::ProfileEntry::Category::STORAGE);
nsresult rv;
@ -3020,7 +3022,8 @@ ObjectStoreHelper::Dispatch(nsIEventTarget* aDatabaseThread)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB", "ObjectStoreHelper::Dispatch");
PROFILER_MAIN_THREAD_LABEL("ObjectStoreHelper", "Dispatch",
js::ProfileEntry::Category::STORAGE);
if (IndexedDatabaseManager::IsMainProcess()) {
return AsyncConnectionHelper::Dispatch(aDatabaseThread);
@ -3106,7 +3109,8 @@ AddHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(aConnection, "Passed a null connection!");
PROFILER_LABEL("IndexedDB", "AddHelper::DoDatabaseWork");
PROFILER_LABEL("AddHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
if (IndexedDatabaseManager::InLowDiskSpaceMode()) {
NS_WARNING("Refusing to add more data because disk space is low!");
@ -3321,8 +3325,8 @@ AddHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"AddHelper::PackArgumentsForParentProcess");
PROFILER_MAIN_THREAD_LABEL("AddHelper", "PackArgumentsForParentProcess",
js::ProfileEntry::Category::STORAGE);
AddPutParams commonParams;
commonParams.cloneInfo() = mCloneWriteInfo;
@ -3376,8 +3380,8 @@ AddHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"AddHelper::SendResponseToChildProcess");
PROFILER_MAIN_THREAD_LABEL("AddHelper", "SendResponseToChildProcess",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -3425,7 +3429,8 @@ GetHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(mKeyRange, "Must have a key range here!");
PROFILER_LABEL("IndexedDB", "GetHelper::DoDatabaseWork [IDBObjectStore.cpp]");
PROFILER_LABEL("GetHelper", "DoDatabaseWork [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
nsCString keyRangeClause;
mKeyRange->GetBindingClause(NS_LITERAL_CSTRING("key_value"), keyRangeClause);
@ -3488,9 +3493,8 @@ GetHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(mKeyRange, "This should never be null!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetHelper::PackArgumentsForParentProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
GetParams params;
@ -3506,9 +3510,8 @@ GetHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetHelper::SendResponseToChildProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetHelper", "SendResponseToChildProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -3583,7 +3586,8 @@ DeleteHelper::DoDatabaseWork(mozIStorageConnection* /*aConnection */)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(mKeyRange, "Must have a key range here!");
PROFILER_LABEL("IndexedDB", "DeleteHelper::DoDatabaseWork");
PROFILER_LABEL("DeleteHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
nsCString keyRangeClause;
mKeyRange->GetBindingClause(NS_LITERAL_CSTRING("key_value"), keyRangeClause);
@ -3627,8 +3631,8 @@ DeleteHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(mKeyRange, "This should never be null!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"DeleteHelper::PackArgumentsForParentProcess");
PROFILER_MAIN_THREAD_LABEL("DeleteHelper", "PackArgumentsForParentProcess",
js::ProfileEntry::Category::STORAGE);
DeleteParams params;
@ -3644,8 +3648,8 @@ DeleteHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"DeleteHelper::SendResponseToChildProcess");
PROFILER_MAIN_THREAD_LABEL("DeleteHelper", "SendResponseToChildProcess",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -3682,7 +3686,8 @@ ClearHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(aConnection, "Passed a null connection!");
PROFILER_LABEL("IndexedDB", "ClearHelper::DoDatabaseWork");
PROFILER_LABEL("ClearHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
nsCOMPtr<mozIStorageStatement> stmt =
mTransaction->GetCachedStatement(
@ -3708,8 +3713,8 @@ ClearHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"ClearHelper::PackArgumentsForParentProcess");
PROFILER_MAIN_THREAD_LABEL("ClearHelper", "PackArgumentsForParentProcess",
js::ProfileEntry::Category::STORAGE);
aParams = ClearParams();
return NS_OK;
@ -3721,8 +3726,8 @@ ClearHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"ClearHelper::SendResponseToChildProcess");
PROFILER_MAIN_THREAD_LABEL("ClearHelper", "SendResponseToChildProcess",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -3758,8 +3763,8 @@ OpenCursorHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB",
"OpenCursorHelper::DoDatabaseWork [IDBObjectStore.cpp]");
PROFILER_LABEL("OpenCursorHelper", "DoDatabaseWork [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
NS_NAMED_LITERAL_CSTRING(keyValue, "key_value");
@ -3943,9 +3948,8 @@ OpenCursorHelper::PackArgumentsForParentProcess(
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenCursorHelper::PackArgumentsForParentProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("OpenCursorHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
OpenCursorParams params;
@ -3971,9 +3975,8 @@ OpenCursorHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(!mCursor, "Shouldn't have this yet!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenCursorHelper::SendResponseToChildProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("OpenCursorHelper", "SendResponseToChildProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -4095,8 +4098,8 @@ OpenKeyCursorHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
MOZ_ASSERT(!NS_IsMainThread());
MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
PROFILER_LABEL("IndexedDB",
"OpenKeyCursorHelper::DoDatabaseWork [IDBObjectStore.cpp]");
PROFILER_LABEL("OpenKeyCursorHelper", "DoDatabaseWork [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
NS_NAMED_LITERAL_CSTRING(keyValue, "key_value");
NS_NAMED_LITERAL_CSTRING(id, "id");
@ -4212,9 +4215,8 @@ OpenKeyCursorHelper::EnsureCursor()
{
MOZ_ASSERT(NS_IsMainThread());
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenKeyCursorHelper::EnsureCursor "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("OpenKeyCursorHelper", "EnsureCursor [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
if (mCursor || mKey.IsUnset()) {
return NS_OK;
@ -4234,9 +4236,8 @@ OpenKeyCursorHelper::GetSuccessResult(JSContext* aCx,
{
MOZ_ASSERT(NS_IsMainThread());
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenKeyCursorHelper::GetSuccessResult "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("OpenKeyCursorHelper", "GetSuccessResult [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
nsresult rv = EnsureCursor();
NS_ENSURE_SUCCESS(rv, rv);
@ -4270,10 +4271,8 @@ OpenKeyCursorHelper::PackArgumentsForParentProcess(
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenKeyCursorHelper::"
"PackArgumentsForParentProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("OpenKeyCursorHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
OpenKeyCursorParams params;
@ -4299,9 +4298,8 @@ OpenKeyCursorHelper::SendResponseToChildProcess(nsresult aResultCode)
MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
MOZ_ASSERT(!mCursor);
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenKeyCursorHelper::SendResponseToChildProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("OpenKeyCursorHelper", "SendResponseToChildProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
MOZ_ASSERT(actor);
@ -4365,10 +4363,8 @@ OpenKeyCursorHelper::UnpackResponseFromParentProcess(
OpenCursorResponse::TPIndexedDBCursorChild);
MOZ_ASSERT(!mCursor);
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenKeyCursorHelper::"
"UnpackResponseFromParentProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("OpenKeyCursorHelper", "UnpackResponseFromParentProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
const OpenCursorResponse& response =
aResponseValue.get_OpenCursorResponse();
@ -4400,7 +4396,8 @@ CreateIndexHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "CreateIndexHelper::DoDatabaseWork");
PROFILER_LABEL("CreateIndexHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
if (IndexedDatabaseManager::InLowDiskSpaceMode()) {
NS_WARNING("Refusing to create index because disk space is low!");
@ -4571,7 +4568,8 @@ DeleteIndexHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "DeleteIndexHelper::DoDatabaseWork");
PROFILER_LABEL("DeleteIndexHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
nsCOMPtr<mozIStorageStatement> stmt =
mTransaction->GetCachedStatement(
@ -4598,8 +4596,8 @@ GetAllHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB",
"GetAllHelper::DoDatabaseWork [IDBObjectStore.cpp]");
PROFILER_LABEL("GetAllHelper", "DoDatabaseWork [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
NS_NAMED_LITERAL_CSTRING(lowerKeyName, "lower_key");
NS_NAMED_LITERAL_CSTRING(upperKeyName, "upper_key");
@ -4712,9 +4710,8 @@ GetAllHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetAllHelper::PackArgumentsForParentProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetAllHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
GetAllParams params;
@ -4739,9 +4736,8 @@ GetAllHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetAllHelper::SendResponseToChildProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetAllHelper", "SendResponseToChildProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");
@ -4840,8 +4836,8 @@ GetAllKeysHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
MOZ_ASSERT(!NS_IsMainThread());
MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
PROFILER_LABEL("IndexedDB",
"GetAllKeysHelper::DoDatabaseWork [IDObjectStore.cpp]");
PROFILER_LABEL("GetAllKeysHelper", "DoDatabaseWork [IDObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
NS_NAMED_LITERAL_CSTRING(keyValue, "key_value");
@ -4904,9 +4900,8 @@ GetAllKeysHelper::GetSuccessResult(JSContext* aCx,
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mKeys.Length() <= mLimit);
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetAllKeysHelper::GetSuccessResult "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetAllKeysHelper", "GetSuccessResult [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
nsTArray<Key> keys;
mKeys.SwapElements(keys);
@ -4962,9 +4957,8 @@ GetAllKeysHelper::PackArgumentsForParentProcess(
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetAllKeysHelper::PackArgumentsForParentProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetAllKeysHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
GetAllKeysParams params;
@ -4988,9 +4982,8 @@ GetAllKeysHelper::SendResponseToChildProcess(nsresult aResultCode)
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"GetAllKeysHelper::SendResponseToChildProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("GetAllKeysHelper", "SendResponseToChildProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
MOZ_ASSERT(actor);
@ -5030,8 +5023,8 @@ CountHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB",
"CountHelper::DoDatabaseWork [IDBObjectStore.cpp]");
PROFILER_LABEL("CountHelper", "DoDatabaseWork [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
NS_NAMED_LITERAL_CSTRING(lowerKeyName, "lower_key");
NS_NAMED_LITERAL_CSTRING(upperKeyName, "upper_key");
@ -5115,9 +5108,8 @@ CountHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"CountHelper::PackArgumentsForParentProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("CountHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
CountParams params;
@ -5140,9 +5132,8 @@ CountHelper::SendResponseToChildProcess(nsresult aResultCode)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"CountHelper::SendResponseToChildProcess "
"[IDBObjectStore.cpp]");
PROFILER_MAIN_THREAD_LABEL("CountHelper", "SendResponseToChildProcess [IDBObjectStore.cpp]",
js::ProfileEntry::Category::STORAGE);
IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
NS_ASSERTION(actor, "How did we get this far without an actor?");

Просмотреть файл

@ -373,7 +373,8 @@ IDBTransaction::GetOrCreateConnection(mozIStorageConnection** aResult)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "IDBTransaction::GetOrCreateConnection");
PROFILER_LABEL("IDBTransaction", "GetOrCreateConnection",
js::ProfileEntry::Category::STORAGE);
if (mDatabase->IsInvalidated()) {
return NS_ERROR_NOT_AVAILABLE;
@ -792,7 +793,8 @@ NS_IMETHODIMP
CommitHelper::Run()
{
if (NS_IsMainThread()) {
PROFILER_MAIN_THREAD_LABEL("IndexedDB", "CommitHelper::Run");
PROFILER_MAIN_THREAD_LABEL("CommitHelper", "Run",
js::ProfileEntry::Category::STORAGE);
NS_ASSERTION(mDoomedObjects.IsEmpty(), "Didn't release doomed objects!");
@ -860,7 +862,8 @@ CommitHelper::Run()
return NS_OK;
}
PROFILER_LABEL("IndexedDB", "CommitHelper::Run");
PROFILER_LABEL("CommitHelper", "Run",
js::ProfileEntry::Category::STORAGE);
IDBDatabase* database = mTransaction->Database();
if (database->IsInvalidated()) {

Просмотреть файл

@ -125,7 +125,8 @@ CreateFileTables(mozIStorageConnection* aDBConn)
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "CreateFileTables");
PROFILER_LABEL("OpenDatabaseHelper", "CreateFileTables",
js::ProfileEntry::Category::STORAGE);
// Table `file`
nsresult rv = aDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
@ -188,7 +189,8 @@ CreateTables(mozIStorageConnection* aDBConn)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(aDBConn, "Passing a null database connection!");
PROFILER_LABEL("IndexedDB", "CreateTables");
PROFILER_LABEL("OpenDatabaseHelper", "CreateTables",
js::ProfileEntry::Category::STORAGE);
// Table `database`
nsresult rv = aDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
@ -304,7 +306,8 @@ UpgradeSchemaFrom4To5(mozIStorageConnection* aConnection)
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "UpgradeSchemaFrom4To5");
PROFILER_LABEL("OpenDatabaseHelper", "UpgradeSchemaFrom4To5",
js::ProfileEntry::Category::STORAGE);
nsresult rv;
@ -393,7 +396,8 @@ UpgradeSchemaFrom5To6(mozIStorageConnection* aConnection)
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "UpgradeSchemaFrom5To6");
PROFILER_LABEL("OpenDatabaseHelper", "UpgradeSchemaFrom5To6",
js::ProfileEntry::Category::STORAGE);
// First, drop all the indexes we're no longer going to use.
nsresult rv = aConnection->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
@ -751,7 +755,8 @@ UpgradeSchemaFrom6To7(mozIStorageConnection* aConnection)
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "UpgradeSchemaFrom6To7");
PROFILER_LABEL("OpenDatabaseHelper", "UpgradeSchemaFrom6To7",
js::ProfileEntry::Category::STORAGE);
nsresult rv = aConnection->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
"CREATE TEMPORARY TABLE temp_upgrade ("
@ -810,7 +815,8 @@ UpgradeSchemaFrom7To8(mozIStorageConnection* aConnection)
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "UpgradeSchemaFrom7To8");
PROFILER_LABEL("OpenDatabaseHelper", "UpgradeSchemaFrom7To8",
js::ProfileEntry::Category::STORAGE);
nsresult rv = aConnection->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
"CREATE TEMPORARY TABLE temp_upgrade ("
@ -882,7 +888,8 @@ public:
OnFunctionCall(mozIStorageValueArray* aArguments,
nsIVariant** aResult)
{
PROFILER_LABEL("IndexedDB", "CompressDataBlobsFunction::OnFunctionCall");
PROFILER_LABEL("CompressDataBlobsFunction", "OnFunctionCall",
js::ProfileEntry::Category::STORAGE);
uint32_t argc;
nsresult rv = aArguments->GetNumEntries(&argc);
@ -932,7 +939,8 @@ UpgradeSchemaFrom8To9_0(mozIStorageConnection* aConnection)
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "UpgradeSchemaFrom8To9_0");
PROFILER_LABEL("OpenDatabaseHelper", "UpgradeSchemaFrom8To9_0",
js::ProfileEntry::Category::STORAGE);
// We no longer use the dataVersion column.
nsresult rv = aConnection->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
@ -973,7 +981,8 @@ UpgradeSchemaFrom9_0To10_0(mozIStorageConnection* aConnection)
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "UpgradeSchemaFrom9_0To10_0");
PROFILER_LABEL("OpenDatabaseHelper", "UpgradeSchemaFrom9_0To10_0",
js::ProfileEntry::Category::STORAGE);
nsresult rv = aConnection->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
"ALTER TABLE object_data ADD COLUMN file_ids TEXT;"
@ -1000,7 +1009,8 @@ UpgradeSchemaFrom10_0To11_0(mozIStorageConnection* aConnection)
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "UpgradeSchemaFrom10_0To11_0");
PROFILER_LABEL("OpenDatabaseHelper", "UpgradeSchemaFrom10_0To11_0",
js::ProfileEntry::Category::STORAGE);
nsresult rv = aConnection->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
"CREATE TEMPORARY TABLE temp_upgrade ("
@ -1139,7 +1149,8 @@ public:
OnFunctionCall(mozIStorageValueArray* aArguments,
nsIVariant** aResult)
{
PROFILER_LABEL("IndexedDB", "EncodeKeysFunction::OnFunctionCall");
PROFILER_LABEL("EncodeKeysFunction", "OnFunctionCall",
js::ProfileEntry::Category::STORAGE);
uint32_t argc;
nsresult rv = aArguments->GetNumEntries(&argc);
@ -1190,7 +1201,8 @@ UpgradeSchemaFrom11_0To12_0(mozIStorageConnection* aConnection)
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "UpgradeSchemaFrom11_0To12_0");
PROFILER_LABEL("OpenDatabaseHelper", "UpgradeSchemaFrom11_0To12_0",
js::ProfileEntry::Category::STORAGE);
NS_NAMED_LITERAL_CSTRING(encoderName, "encode");
@ -1407,7 +1419,8 @@ UpgradeSchemaFrom12_0To13_0(mozIStorageConnection* aConnection,
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "UpgradeSchemaFrom12_0To13_0");
PROFILER_LABEL("OpenDatabaseHelper", "UpgradeSchemaFrom12_0To13_0",
js::ProfileEntry::Category::STORAGE);
nsresult rv;
@ -1627,7 +1640,8 @@ public:
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB", "VersionChangeEventsRunnable::Run");
PROFILER_MAIN_THREAD_LABEL("OpenDatabaseHelper", "VersionChangeEventsRunnable::Run",
js::ProfileEntry::Category::STORAGE);
// Fire version change events at all of the databases that are not already
// closed. Also kick bfcached documents out of bfcache.
@ -1778,7 +1792,8 @@ OpenDatabaseHelper::DoDatabaseWork()
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "OpenDatabaseHelper::DoDatabaseWork");
PROFILER_LABEL("OpenDatabaseHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
mState = eFiringEvents; // In case we fail somewhere along the line.
@ -1931,7 +1946,8 @@ OpenDatabaseHelper::CreateDatabaseConnection(
AssertIsOnIOThread();
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "OpenDatabaseHelper::CreateDatabaseConnection");
PROFILER_LABEL("OpenDatabaseHelper", "CreateDatabaseConnection",
js::ProfileEntry::Category::STORAGE);
nsresult rv;
bool exists;
@ -2195,7 +2211,8 @@ OpenDatabaseHelper::Run()
NS_ASSERTION(mState != eCreated, "Dispatch was not called?!?");
if (NS_IsMainThread()) {
PROFILER_MAIN_THREAD_LABEL("IndexedDB", "OpenDatabaseHelper::Run");
PROFILER_MAIN_THREAD_LABEL("OpenDatabaseHelper", "Run",
js::ProfileEntry::Category::STORAGE);
if (mState == eOpenPending) {
if (NS_FAILED(mResultCode)) {
@ -2292,7 +2309,8 @@ OpenDatabaseHelper::Run()
return NS_OK;
}
PROFILER_LABEL("IndexedDB", "OpenDatabaseHelper::Run");
PROFILER_LABEL("OpenDatabaseHelper", "Run",
js::ProfileEntry::Category::STORAGE);
// We're on the DB thread.
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
@ -2316,8 +2334,8 @@ OpenDatabaseHelper::EnsureSuccessResult()
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenDatabaseHelper::EnsureSuccessResult");
PROFILER_MAIN_THREAD_LABEL("OpenDatabaseHelper", "EnsureSuccessResult",
js::ProfileEntry::Category::STORAGE);
nsRefPtr<DatabaseInfo> dbInfo;
if (DatabaseInfo::Get(mDatabaseId, getter_AddRefs(dbInfo))) {
@ -2461,8 +2479,8 @@ OpenDatabaseHelper::DispatchSuccessEvent()
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenDatabaseHelper::DispatchSuccessEvent");
PROFILER_MAIN_THREAD_LABEL("OpenDatabaseHelper", "DispatchSuccessEvent",
js::ProfileEntry::Category::STORAGE);
nsRefPtr<nsIDOMEvent> event =
CreateGenericEvent(mOpenDBRequest, NS_LITERAL_STRING(SUCCESS_EVT_STR),
@ -2481,8 +2499,8 @@ OpenDatabaseHelper::DispatchErrorEvent()
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"OpenDatabaseHelper::DispatchErrorEvent");
PROFILER_MAIN_THREAD_LABEL("OpenDatabaseHelper", "DispatchErrorEvent",
js::ProfileEntry::Category::STORAGE);
nsRefPtr<nsIDOMEvent> event =
CreateGenericEvent(mOpenDBRequest, NS_LITERAL_STRING(ERROR_EVT_STR),
@ -2533,7 +2551,8 @@ SetVersionHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(aConnection, "Passing a null connection!");
PROFILER_LABEL("IndexedDB", "SetVersionHelper::DoDatabaseWork");
PROFILER_LABEL("SetVersionHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
nsCOMPtr<mozIStorageStatement> stmt;
nsresult rv = aConnection->CreateStatement(NS_LITERAL_CSTRING(
@ -2654,7 +2673,8 @@ DeleteDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
NS_ASSERTION(!aConnection, "How did we get a connection here?");
PROFILER_LABEL("IndexedDB", "DeleteDatabaseHelper::DoDatabaseWork");
PROFILER_LABEL("DeleteDatabaseHelper", "DoDatabaseWork",
js::ProfileEntry::Category::STORAGE);
const StoragePrivilege& privilege = mOpenHelper->Privilege();

Просмотреть файл

@ -154,7 +154,8 @@ TransactionThreadPool::Cleanup()
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB", "TransactionThreadPool::Cleanup");
PROFILER_MAIN_THREAD_LABEL("TransactionThreadPool", "Cleanup",
js::ProfileEntry::Category::STORAGE);
nsresult rv = mThreadPool->Shutdown();
NS_ENSURE_SUCCESS(rv, rv);
@ -206,8 +207,8 @@ TransactionThreadPool::FinishTransaction(IDBTransaction* aTransaction)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(aTransaction, "Null pointer!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"TransactionThreadPool::FinishTransaction");
PROFILER_MAIN_THREAD_LABEL("TransactionThreadPool", "FinishTransaction",
js::ProfileEntry::Category::STORAGE);
// AddRef here because removing from the hash will call Release.
nsRefPtr<IDBTransaction> transaction(aTransaction);
@ -417,9 +418,8 @@ TransactionThreadPool::AbortTransactionsForDatabase(IDBDatabase* aDatabase)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(aDatabase, "Null pointer!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"TransactionThreadPool::"
"AbortTransactionsForDatabase");
PROFILER_MAIN_THREAD_LABEL("TransactionThreadPool", "AbortTransactionsForDatabase",
js::ProfileEntry::Category::STORAGE);
// Get list of transactions for this database id
DatabaseTransactionInfo* dbTransactionInfo;
@ -501,8 +501,8 @@ TransactionThreadPool::MaybeFireCallback(DatabasesCompleteCallback aCallback)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB",
"TransactionThreadPool::MaybeFireCallback");
PROFILER_MAIN_THREAD_LABEL("TransactionThreadPool", "MaybeFireCallback",
js::ProfileEntry::Category::STORAGE);
for (uint32_t index = 0; index < aCallback.mDatabases.Length(); index++) {
IDBDatabase* database = aCallback.mDatabases[index];
@ -573,7 +573,8 @@ TransactionThreadPool::TransactionQueue::Run()
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
PROFILER_LABEL("IndexedDB", "TransactionQueue::Run");
PROFILER_LABEL("TransactionQueue", "Run",
js::ProfileEntry::Category::STORAGE);
IDB_PROFILER_MARK("IndexedDB Transaction %llu: Beginning database work",
"IDBTransaction[%llu] DT Start",
@ -643,7 +644,8 @@ FinishTransactionRunnable::Run()
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
PROFILER_MAIN_THREAD_LABEL("IndexedDB", "FinishTransactionRunnable::Run");
PROFILER_MAIN_THREAD_LABEL("FinishTransactionRunnable", "Run",
js::ProfileEntry::Category::STORAGE);
if (!gThreadPool) {
NS_ERROR("Running after shutdown!");

Просмотреть файл

@ -420,7 +420,8 @@ nsPluginStreamListenerPeer::OnStartRequest(nsIRequest *request,
nsISupports* aContext)
{
nsresult rv = NS_OK;
PROFILER_LABEL("nsPluginStreamListenerPeer", "OnStartRequest");
PROFILER_LABEL("nsPluginStreamListenerPeer", "OnStartRequest",
js::ProfileEntry::Category::OTHER);
if (mRequests.IndexOfObject(GetBaseRequest(request)) == -1) {
NS_ASSERTION(mRequests.Count() == 0,

Просмотреть файл

@ -891,7 +891,9 @@ PluginModuleParent::NPP_NewStream(NPP instance, NPMIMEType type,
NPStream* stream, NPBool seekable,
uint16_t* stype)
{
PROFILER_LABEL("PluginModuleParent", "NPP_NewStream");
PROFILER_LABEL("PluginModuleParent", "NPP_NewStream",
js::ProfileEntry::Category::OTHER);
PluginInstanceParent* i = InstCast(instance);
if (!i)
return NPERR_GENERIC_ERROR;

Просмотреть файл

@ -3455,7 +3455,8 @@ NS_IMPL_ISUPPORTS_INHERITED0(OriginClearRunnable, nsRunnable)
NS_IMETHODIMP
OriginClearRunnable::Run()
{
PROFILER_LABEL("Quota", "OriginClearRunnable::Run");
PROFILER_LABEL("OriginClearRunnable", "Run",
js::ProfileEntry::Category::OTHER);
QuotaManager* quotaManager = QuotaManager::Get();
NS_ASSERTION(quotaManager, "This should never fail!");
@ -3730,7 +3731,8 @@ NS_IMPL_ISUPPORTS_INHERITED(AsyncUsageRunnable, nsRunnable, nsIQuotaRequest)
NS_IMETHODIMP
AsyncUsageRunnable::Run()
{
PROFILER_LABEL("Quota", "AsyncUsageRunnable::Run");
PROFILER_LABEL("Quota", "AsyncUsageRunnable::Run",
js::ProfileEntry::Category::OTHER);
nsresult rv = RunInternal();

Просмотреть файл

@ -174,7 +174,9 @@ GLContextCGL::SupportsRobustness() const
bool
GLContextCGL::SwapBuffers()
{
PROFILER_LABEL("GLContext", "SwapBuffers");
PROFILER_LABEL("GLContextCGL", "SwapBuffers",
js::ProfileEntry::Category::GRAPHICS);
[mContext flushBuffer];
return true;
}

Просмотреть файл

@ -430,7 +430,8 @@ SharedSurface*
SurfaceStream_TripleBuffer::SwapProducer(SurfaceFactory* factory,
const gfx::IntSize& size)
{
PROFILER_LABEL("SurfaceStream_TripleBuffer", "SwapProducer");
PROFILER_LABEL("SurfaceStream_TripleBuffer", "SwapProducer",
js::ProfileEntry::Category::GRAPHICS);
MonitorAutoLock lock(mMonitor);
if (mProducer) {
@ -480,7 +481,8 @@ SurfaceStream_TripleBuffer_Async::~SurfaceStream_TripleBuffer_Async()
void
SurfaceStream_TripleBuffer_Async::WaitForCompositor()
{
PROFILER_LABEL("SurfaceStream_TripleBuffer_Async", "WaitForCompositor");
PROFILER_LABEL("SurfaceStream_TripleBuffer_Async", "WaitForCompositor",
js::ProfileEntry::Category::GRAPHICS);
// If we haven't be notified within 100ms, then
// something must have happened and it will never arrive.

Просмотреть файл

@ -169,7 +169,9 @@ RotatedBuffer::DrawBufferWithRotation(gfx::DrawTarget *aTarget, ContextSource aS
gfx::SourceSurface* aMask,
const gfx::Matrix* aMaskTransform) const
{
PROFILER_LABEL("RotatedBuffer", "DrawBufferWithRotation");
PROFILER_LABEL("RotatedBuffer", "DrawBufferWithRotation",
js::ProfileEntry::Category::GRAPHICS);
// See above, in Azure Repeat should always be a safe, even faster choice
// though! Particularly on D2D Repeat should be a lot faster, need to look
// into that. TODO[Bas]

Просмотреть файл

@ -570,7 +570,9 @@ BasicLayerManager::EndTransactionInternal(DrawThebesLayerCallback aCallback,
void* aCallbackData,
EndTransactionFlags aFlags)
{
PROFILER_LABEL("BasicLayerManager", "EndTransactionInternal");
PROFILER_LABEL("BasicLayerManager", "EndTransactionInternal",
js::ProfileEntry::Category::GRAPHICS);
#ifdef MOZ_LAYERS_HAVE_LOG
MOZ_LAYERS_LOG((" ----- (beginning paint)"));
Log();
@ -880,7 +882,9 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
DrawThebesLayerCallback aCallback,
void* aCallbackData)
{
PROFILER_LABEL("BasicLayerManager", "PaintLayer");
PROFILER_LABEL("BasicLayerManager", "PaintLayer",
js::ProfileEntry::Category::GRAPHICS);
PaintLayerContext paintLayerContext(aTarget, aLayer, aCallback, aCallbackData);
// Don't attempt to paint layers with a singular transform, cairo will

Просмотреть файл

@ -50,7 +50,9 @@ BasicThebesLayer::PaintThebes(gfxContext* aContext,
LayerManager::DrawThebesLayerCallback aCallback,
void* aCallbackData)
{
PROFILER_LABEL("BasicThebesLayer", "PaintThebes");
PROFILER_LABEL("BasicThebesLayer", "PaintThebes",
js::ProfileEntry::Category::GRAPHICS);
NS_ASSERTION(BasicManager()->InDrawing(),
"Can only draw in drawing phase");

Просмотреть файл

@ -126,7 +126,9 @@ ClientCanvasLayer::Initialize(const Data& aData)
void
ClientCanvasLayer::RenderLayer()
{
PROFILER_LABEL("ClientCanvasLayer", "Paint");
PROFILER_LABEL("ClientCanvasLayer", "RenderLayer",
js::ProfileEntry::Category::GRAPHICS);
if (!IsDirty()) {
return;
}

Просмотреть файл

@ -183,7 +183,9 @@ ClientLayerManager::EndTransactionInternal(DrawThebesLayerCallback aCallback,
void* aCallbackData,
EndTransactionFlags)
{
PROFILER_LABEL("ClientLayerManager", "EndTransactionInternal");
PROFILER_LABEL("ClientLayerManager", "EndTransactionInternal",
js::ProfileEntry::Category::GRAPHICS);
#ifdef MOZ_LAYERS_HAVE_LOG
MOZ_LAYERS_LOG((" ----- (beginning paint)"));
Log();

Просмотреть файл

@ -33,7 +33,9 @@ using namespace mozilla::gfx;
void
ClientThebesLayer::PaintThebes()
{
PROFILER_LABEL("ClientThebesLayer", "PaintThebes");
PROFILER_LABEL("ClientThebesLayer", "PaintThebes",
js::ProfileEntry::Category::GRAPHICS);
NS_ASSERTION(ClientManager()->InDrawing(),
"Can only draw in drawing phase");

Просмотреть файл

@ -53,7 +53,8 @@ SimpleTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
// If this region is empty XMost() - 1 will give us a negative value.
NS_ASSERTION(!aPaintRegion.GetBounds().IsEmpty(), "Empty paint region\n");
PROFILER_LABEL("SimpleTiledLayerBuffer", "PaintThebesUpdate");
PROFILER_LABEL("SimpleTiledLayerBuffer", "PaintThebesUpdate",
js::ProfileEntry::Category::GRAPHICS);
Update(aNewValidRegion, aPaintRegion);
@ -74,7 +75,9 @@ SimpleTiledLayerBuffer::ValidateTile(SimpleTiledLayerTile aTile,
const nsIntPoint& aTileOrigin,
const nsIntRegion& aDirtyRegion)
{
PROFILER_LABEL("SimpleTiledLayerBuffer", "ValidateTile");
PROFILER_LABEL("SimpleTiledLayerBuffer", "ValidateTile",
js::ProfileEntry::Category::GRAPHICS);
static gfx::IntSize kTileSize(gfxPrefs::LayersTileWidth(), gfxPrefs::LayersTileHeight());
gfx::SurfaceFormat tileFormat = gfxPlatform::GetPlatform()->Optimal2DFormatForContent(GetContentType());

Просмотреть файл

@ -658,7 +658,9 @@ ClientTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
const nsIntRect bounds = aPaintRegion.GetBounds();
{
PROFILER_LABEL("ClientTiledLayerBuffer", "PaintThebesSingleBufferAlloc");
PROFILER_LABEL("ClientTiledLayerBuffer", "PaintThebesSingleBufferAlloc",
js::ProfileEntry::Category::GRAPHICS);
gfxImageFormat format =
gfxPlatform::GetPlatform()->OptimalFormatForContent(
GetContentType());
@ -686,7 +688,8 @@ ClientTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
}
start = PR_IntervalNow();
#endif
PROFILER_LABEL("ClientTiledLayerBuffer", "PaintThebesSingleBufferDraw");
PROFILER_LABEL("ClientTiledLayerBuffer", "PaintThebesSingleBufferDraw",
js::ProfileEntry::Category::GRAPHICS);
mCallback(mThebesLayer, ctxt, aPaintRegion, DrawRegionClip::CLIP_NONE, nsIntRegion(), mCallbackData);
}
@ -706,7 +709,9 @@ ClientTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
start = PR_IntervalNow();
#endif
PROFILER_LABEL("ClientTiledLayerBuffer", "PaintThebesUpdate");
PROFILER_LABEL("ClientTiledLayerBuffer", "PaintThebesUpdate",
js::ProfileEntry::Category::GRAPHICS);
Update(aNewValidRegion, aPaintRegion);
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
@ -727,7 +732,8 @@ ClientTiledLayerBuffer::ValidateTile(TileClient aTile,
const nsIntPoint& aTileOrigin,
const nsIntRegion& aDirtyRegion)
{
PROFILER_LABEL("ClientTiledLayerBuffer", "ValidateTile");
PROFILER_LABEL("ClientTiledLayerBuffer", "ValidateTile",
js::ProfileEntry::Category::GRAPHICS);
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
if (aDirtyRegion.IsComplex()) {
@ -962,7 +968,9 @@ ClientTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& aInval
// non-low-precision paint, as in that situation, we're about to override
// front-end's page/viewport metrics.
if (!aPaintData->mFirstPaint || drawingLowPrecision) {
PROFILER_LABEL("ContentClient", "Abort painting");
PROFILER_LABEL("ClientTiledLayerBuffer", "ComputeProgressiveUpdateRegion",
js::ProfileEntry::Category::GRAPHICS);
aRegionToPaint.SetEmpty();
return aIsRepeated;
}

Просмотреть файл

@ -854,7 +854,9 @@ AsyncCompositionManager::TransformScrollableLayer(Layer* aLayer)
bool
AsyncCompositionManager::TransformShadowTree(TimeStamp aCurrentFrame)
{
PROFILER_LABEL("AsyncCompositionManager", "TransformShadowTree");
PROFILER_LABEL("AsyncCompositionManager", "TransformShadowTree",
js::ProfileEntry::Category::GRAPHICS);
Layer* root = mLayerManager->GetRoot();
if (!root) {
return false;

Просмотреть файл

@ -376,7 +376,9 @@ LayerManagerComposite::RenderDebugOverlay(const Rect& aBounds)
void
LayerManagerComposite::Render()
{
PROFILER_LABEL("LayerManagerComposite", "Render");
PROFILER_LABEL("LayerManagerComposite", "Render",
js::ProfileEntry::Category::GRAPHICS);
if (mDestroyed) {
NS_WARNING("Call on destroyed layer manager");
return;
@ -401,7 +403,9 @@ LayerManagerComposite::Render()
}
{
PROFILER_LABEL("LayerManagerComposite", "PreRender");
PROFILER_LABEL("LayerManagerComposite", "PreRender",
js::ProfileEntry::Category::GRAPHICS);
if (!mCompositor->GetWidget()->PreRender(this)) {
return;
}
@ -465,7 +469,9 @@ LayerManagerComposite::Render()
RenderDebugOverlay(actualBounds);
{
PROFILER_LABEL("LayerManagerComposite", "EndFrame");
PROFILER_LABEL("LayerManagerComposite", "EndFrame",
js::ProfileEntry::Category::GRAPHICS);
mCompositor->EndFrame();
mCompositor->SetFBAcquireFence(mRoot);
}

Просмотреть файл

@ -111,7 +111,8 @@ ThebesLayerComposite::RenderLayer(const nsIntRect& aClipRect)
if (!mBuffer || !mBuffer->IsAttached()) {
return;
}
PROFILER_LABEL("ThebesLayerComposite", "RenderLayer");
PROFILER_LABEL("ThebesLayerComposite", "RenderLayer",
js::ProfileEntry::Category::GRAPHICS);
MOZ_ASSERT(mBuffer->GetCompositor() == mCompositeManager->GetCompositor() &&
mBuffer->GetLayer() == this,

Просмотреть файл

@ -612,7 +612,9 @@ void
CompositorParent::CompositeToTarget(DrawTarget* aTarget, const nsIntRect* aRect)
{
profiler_tracing("Paint", "Composite", TRACING_INTERVAL_START);
PROFILER_LABEL("CompositorParent", "Composite");
PROFILER_LABEL("CompositorParent", "Composite",
js::ProfileEntry::Category::GRAPHICS);
NS_ABORT_IF_FALSE(CompositorThreadID() == PlatformThread::CurrentId(),
"Composite can only be called on the compositor thread");
@ -703,7 +705,9 @@ CompositorParent::CompositeToTarget(DrawTarget* aTarget, const nsIntRect* aRect)
void
CompositorParent::ForceComposeToTarget(DrawTarget* aTarget, const nsIntRect* aRect)
{
PROFILER_LABEL("CompositorParent", "ForceComposeToTarget");
PROFILER_LABEL("CompositorParent", "ForceComposeToTarget",
js::ProfileEntry::Category::GRAPHICS);
AutoRestore<bool> override(mOverrideComposeReadiness);
mOverrideComposeReadiness = true;

Просмотреть файл

@ -200,7 +200,9 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
InfallibleTArray<EditReply>* reply)
{
profiler_tracing("Paint", "Composite", TRACING_INTERVAL_START);
PROFILER_LABEL("LayerTransactionParent", "RecvUpdate");
PROFILER_LABEL("LayerTransactionParent", "RecvUpdate",
js::ProfileEntry::Category::GRAPHICS);
#ifdef COMPOSITOR_PERFORMANCE_WARNING
TimeStamp updateStart = TimeStamp::Now();
#endif

Просмотреть файл

@ -460,7 +460,9 @@ ShadowLayerForwarder::EndTransaction(InfallibleTArray<EditReply>* aReplies,
MOZ_ASSERT(aId);
PROFILER_LABEL("ShadowLayerForwarder", "EndTranscation");
PROFILER_LABEL("ShadowLayerForwarder", "EndTranscation",
js::ProfileEntry::Category::GRAPHICS);
RenderTraceScope rendertrace("Foward Transaction", "000091");
NS_ABORT_IF_FALSE(HasShadowManager(), "no manager to forward to");
NS_ABORT_IF_FALSE(!mTxn->Finished(), "forgot BeginTransaction?");

Просмотреть файл

@ -674,7 +674,9 @@ CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
Rect *aClipRectOut,
Rect *aRenderBoundsOut)
{
PROFILER_LABEL("CompositorOGL", "BeginFrame");
PROFILER_LABEL("CompositorOGL", "BeginFrame",
js::ProfileEntry::Category::GRAPHICS);
MOZ_ASSERT(!mFrameInProgress, "frame still in progress (should have called EndFrame or AbortFrame");
LayerScope::BeginFrame(mGLContext, PR_Now());
@ -973,7 +975,9 @@ CompositorOGL::DrawQuad(const Rect& aRect,
Float aOpacity,
const gfx::Matrix4x4 &aTransform)
{
PROFILER_LABEL("CompositorOGL", "DrawQuad");
PROFILER_LABEL("CompositorOGL", "DrawQuad",
js::ProfileEntry::Category::GRAPHICS);
MOZ_ASSERT(mFrameInProgress, "frame not started");
IntRect intClipRect;
@ -1244,7 +1248,9 @@ CompositorOGL::DrawQuad(const Rect& aRect,
void
CompositorOGL::EndFrame()
{
PROFILER_LABEL("CompositorOGL", "EndFrame");
PROFILER_LABEL("CompositorOGL", "EndFrame",
js::ProfileEntry::Category::GRAPHICS);
MOZ_ASSERT(mCurrentRenderTarget == mWindowRenderTarget, "Rendering target not properly restored");
#ifdef MOZ_DUMP_PAINTING

Просмотреть файл

@ -354,7 +354,9 @@ gfxContext::Stroke()
void
gfxContext::Fill()
{
PROFILER_LABEL("gfxContext", "Fill");
PROFILER_LABEL("gfxContext", "Fill",
js::ProfileEntry::Category::GRAPHICS);
if (mCairo) {
cairo_fill_preserve(mCairo);
} else {
@ -1504,7 +1506,9 @@ gfxContext::Mask(gfxPattern *pattern)
void
gfxContext::Mask(gfxASurface *surface, const gfxPoint& offset)
{
PROFILER_LABEL("gfxContext", "Mask");
PROFILER_LABEL("gfxContext", "Mask",
js::ProfileEntry::Category::GRAPHICS);
if (mCairo) {
cairo_mask_surface(mCairo, surface->CairoSurface(), offset.x, offset.y);
} else {
@ -1538,7 +1542,9 @@ gfxContext::Mask(SourceSurface *surface, const Point& offset)
void
gfxContext::Paint(gfxFloat alpha)
{
PROFILER_LABEL("gfxContext", "Paint");
PROFILER_LABEL("gfxContext", "Paint",
js::ProfileEntry::Category::GRAPHICS);
if (mCairo) {
cairo_paint_with_alpha(mCairo, alpha);
} else {

Просмотреть файл

@ -2790,7 +2790,9 @@ struct GlyphBuffer {
FlushStroke(aCR, aContextPaint, aGlobalMatrix);
}
if (int(aDrawMode) & int(DrawMode::GLYPH_FILL)) {
PROFILER_LABEL("GlyphBuffer", "cairo_show_glyphs");
PROFILER_LABEL("GlyphBuffer", "Flush::cairo_show_glyphs",
js::ProfileEntry::Category::GRAPHICS);
nsRefPtr<gfxPattern> pattern;
if (aContextPaint &&
!!(pattern = aContextPaint->GetFillPattern(aGlobalMatrix))) {

Просмотреть файл

@ -242,7 +242,9 @@ CreateSamplingRestrictedDrawable(gfxDrawable* aDrawable,
const gfxRect& aSubimage,
const gfxImageFormat aFormat)
{
PROFILER_LABEL("gfxUtils", "CreateSamplingRestricedDrawable");
PROFILER_LABEL("gfxUtils", "CreateSamplingRestricedDrawable",
js::ProfileEntry::Category::GRAPHICS);
gfxRect userSpaceClipExtents = aContext->GetClipExtents();
// This isn't optimal --- if aContext has a rotation then GetClipExtents
// will have to do a bounding-box computation, and TransformBounds might
@ -448,7 +450,9 @@ gfxUtils::DrawPixelSnapped(gfxContext* aContext,
GraphicsFilter aFilter,
uint32_t aImageFlags)
{
PROFILER_LABEL("gfxUtils", "DrawPixelSnapped");
PROFILER_LABEL("gfxUtils", "DrawPixelSnapped",
js::ProfileEntry::Category::GRAPHICS);
bool doTile = !aImageRect.Contains(aSourceRect) &&
!(aImageFlags & imgIContainer::FLAG_CLAMP);

Просмотреть файл

@ -87,7 +87,9 @@ Decoder::InitSharedDecoder(uint8_t* imageData, uint32_t imageDataLength,
void
Decoder::Write(const char* aBuffer, uint32_t aCount, DecodeStrategy aStrategy)
{
PROFILER_LABEL("ImageDecoder", "Write");
PROFILER_LABEL("ImageDecoder", "Write",
js::ProfileEntry::Category::GRAPHICS);
MOZ_ASSERT(NS_IsMainThread() || aStrategy == DECODE_ASYNC);
// We're strict about decoder errors

Просмотреть файл

@ -2392,7 +2392,9 @@ RasterImage::RequestDecodeCore(RequestDecodeType aDecodeType)
// large images will decode a bit and post themselves to the event loop
// to finish decoding.
if (!mDecoded && !mInDecoder && mHasSourceData && aDecodeType == SYNCHRONOUS_NOTIFY_AND_SOME_DECODE) {
PROFILER_LABEL_PRINTF("RasterImage", "DecodeABitOf", "%s", GetURIString().get());
PROFILER_LABEL_PRINTF("RasterImage", "DecodeABitOf",
js::ProfileEntry::Category::GRAPHICS, "%s", GetURIString().get());
DecodePool::Singleton()->DecodeABitOf(this, DECODE_SYNC);
return NS_OK;
}
@ -2411,7 +2413,8 @@ RasterImage::RequestDecodeCore(RequestDecodeType aDecodeType)
nsresult
RasterImage::SyncDecode()
{
PROFILER_LABEL_PRINTF("RasterImage", "SyncDecode", "%s", GetURIString().get());;
PROFILER_LABEL_PRINTF("RasterImage", "SyncDecode",
js::ProfileEntry::Category::GRAPHICS, "%s", GetURIString().get());
// If we have a size decoder open, make sure we get the size
if (mDecoder && mDecoder->IsSizeDecode()) {

Просмотреть файл

@ -483,7 +483,9 @@ bool imgFrame::Draw(gfxContext *aContext, GraphicsFilter aFilter,
const nsIntMargin &aPadding, const nsIntRect &aSubimage,
uint32_t aImageFlags)
{
PROFILER_LABEL("image", "imgFrame::Draw");
PROFILER_LABEL("imgFrame", "Draw",
js::ProfileEntry::Category::GRAPHICS);
NS_ASSERTION(!aFill.IsEmpty(), "zero dest size --- fix caller");
NS_ASSERTION(!aSubimage.IsEmpty(), "zero source size --- fix caller");
NS_ASSERTION(!mPalettedImageData, "Directly drawing a paletted image!");

Просмотреть файл

@ -53,7 +53,8 @@ void MessagePumpDefault::Run(Delegate* delegate) {
if (delayed_work_time_.is_null()) {
hangMonitor.NotifyWait();
PROFILER_LABEL("MessagePump", "Wait");
PROFILER_LABEL("MessagePump", "Wait",
js::ProfileEntry::Category::OTHER);
{
GeckoProfilerSleepRAII profiler_sleep;
event_.Wait();
@ -62,7 +63,8 @@ void MessagePumpDefault::Run(Delegate* delegate) {
TimeDelta delay = delayed_work_time_ - TimeTicks::Now();
if (delay > TimeDelta()) {
hangMonitor.NotifyWait();
PROFILER_LABEL("MessagePump", "Wait");
PROFILER_LABEL("MessagePump", "Wait",
js::ProfileEntry::Category::OTHER);
{
GeckoProfilerSleepRAII profiler_sleep;
event_.TimedWait(delay);

Просмотреть файл

@ -5369,7 +5369,8 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
def profilerLabel(self, tag, msgname):
return StmtExpr(ExprCall(ExprVar('PROFILER_LABEL'),
[ ExprLiteral.String('IPDL::' + self.protocol.name),
ExprLiteral.String(tag + msgname) ]))
ExprLiteral.String(tag + msgname),
ExprVar('js::ProfileEntry::Category::OTHER') ]))
def saveActorId(self, md):
idvar = ExprVar('__id')

Просмотреть файл

@ -63,6 +63,18 @@ class ProfileEntry
FRAME_LABEL_COPY = 0x02
};
enum class Category {
OTHER = 0x04,
CSS = 0x08,
JS = 0x16,
GC = 0x32,
CC = 0x64,
NETWORK = 0x128,
GRAPHICS = 0x256,
STORAGE = 0x512,
EVENTS = 0x1024
};
// All of these methods are marked with the 'volatile' keyword because SPS's
// representation of the stack is stored such that all ProfileEntry
// instances are volatile. These methods would not be available unless they

Просмотреть файл

@ -2416,7 +2416,8 @@ void
ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
uint32_t aFlags)
{
PROFILER_LABEL("ContainerState", "ProcessDisplayItems");
PROFILER_LABEL("ContainerState", "ProcessDisplayItems",
js::ProfileEntry::Category::GRAPHICS);
const nsIFrame* lastAnimatedGeometryRoot = mContainerReferenceFrame;
nsPoint topLeft(0,0);
@ -3772,7 +3773,8 @@ FrameLayerBuilder::DrawThebesLayer(ThebesLayer* aLayer,
const nsIntRegion& aRegionToInvalidate,
void* aCallbackData)
{
PROFILER_LABEL("gfx", "DrawThebesLayer");
PROFILER_LABEL("FrameLayerBuilder", "DrawThebesLayer",
js::ProfileEntry::Category::GRAPHICS);
nsDisplayListBuilder* builder = static_cast<nsDisplayListBuilder*>
(aCallbackData);

Просмотреть файл

@ -590,7 +590,8 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
if (!count)
return NS_OK;
PROFILER_LABEL("CSS", "ProcessRestyledFrames");
PROFILER_LABEL("RestyleManager", "ProcessRestyledFrames",
js::ProfileEntry::Category::CSS);
// Make sure to not rebuild quote or counter lists while we're
// processing restyles
@ -2908,7 +2909,8 @@ RestyleManager::ComputeStyleChangeFor(nsIFrame* aFrame,
RestyleTracker& aRestyleTracker,
bool aRestyleDescendants)
{
PROFILER_LABEL("CSS", "ComputeStyleChangeFor");
PROFILER_LABEL("RestyleManager", "ComputeStyleChangeFor",
js::ProfileEntry::Category::CSS);
nsIContent *content = aFrame->GetContent();
if (aMinChange) {

Просмотреть файл

@ -134,7 +134,8 @@ RestyleTracker::ProcessOneRestyle(Element* aElement,
void
RestyleTracker::DoProcessRestyles()
{
PROFILER_LABEL("CSS", "ProcessRestyles");
PROFILER_LABEL("RestyleTracker", "ProcessRestyles",
js::ProfileEntry::Category::CSS);
mRestyleManager->BeginProcessingRestyles();

Просмотреть файл

@ -575,7 +575,9 @@ nsCSSRendering::PaintBorder(nsPresContext* aPresContext,
nsStyleContext* aStyleContext,
int aSkipSides)
{
PROFILER_LABEL("nsCSSRendering", "PaintBorder");
PROFILER_LABEL("nsCSSRendering", "PaintBorder",
js::ProfileEntry::Category::GRAPHICS);
nsStyleContext *styleIfVisited = aStyleContext->GetStyleIfVisited();
const nsStyleBorder *styleBorder = aStyleContext->StyleBorder();
// Don't check RelevantLinkVisited here, since we want to take the
@ -1551,7 +1553,9 @@ nsCSSRendering::PaintBackground(nsPresContext* aPresContext,
nsRect* aBGClipRect,
int32_t aLayer)
{
PROFILER_LABEL("nsCSSRendering", "PaintBackground");
PROFILER_LABEL("nsCSSRendering", "PaintBackground",
js::ProfileEntry::Category::GRAPHICS);
NS_PRECONDITION(aForFrame,
"Frame is expected to be provided to PaintBackground");
@ -1588,7 +1592,9 @@ nsCSSRendering::PaintBackgroundColor(nsPresContext* aPresContext,
const nsRect& aBorderArea,
uint32_t aFlags)
{
PROFILER_LABEL("nsCSSRendering", "PaintBackgroundColor");
PROFILER_LABEL("nsCSSRendering", "PaintBackgroundColor",
js::ProfileEntry::Category::GRAPHICS);
NS_PRECONDITION(aForFrame,
"Frame is expected to be provided to PaintBackground");
@ -2228,7 +2234,9 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext,
const CSSIntRect& aSrc,
const nsSize& aIntrinsicSize)
{
PROFILER_LABEL("nsCSSRendering", "PaintGradient");
PROFILER_LABEL("nsCSSRendering", "PaintGradient",
js::ProfileEntry::Category::GRAPHICS);
Telemetry::AutoTimer<Telemetry::GRADIENT_DURATION, Telemetry::Microsecond> gradientTimer;
if (aDest.IsEmpty() || aFillArea.IsEmpty()) {
return;

Просмотреть файл

@ -1770,7 +1770,9 @@ nsCSSBorderRenderer::DrawBorders()
DrawBorderSides(SIDE_BITS_ALL);
SN("---------------- (1)");
} else {
PROFILER_LABEL("nsCSSBorderRenderer", "DrawBorders::multipass");
PROFILER_LABEL("nsCSSBorderRenderer", "DrawBorders::multipass",
js::ProfileEntry::Category::GRAPHICS);
/* We have more than one pass to go. Draw the corners separately from the sides. */
/*

Просмотреть файл

@ -1039,7 +1039,9 @@ bool
nsDisplayList::ComputeVisibilityForRoot(nsDisplayListBuilder* aBuilder,
nsRegion* aVisibleRegion,
nsIFrame* aDisplayPortFrame) {
PROFILER_LABEL("nsDisplayList", "ComputeVisibilityForRoot");
PROFILER_LABEL("nsDisplayList", "ComputeVisibilityForRoot",
js::ProfileEntry::Category::GRAPHICS);
nsRegion r;
r.And(*aVisibleRegion, GetBounds(aBuilder));
return ComputeVisibilityForSublist(aBuilder, aVisibleRegion,
@ -1207,7 +1209,9 @@ nsDisplayList::ComputeVisibilityForSublist(nsDisplayListBuilder* aBuilder,
void nsDisplayList::PaintRoot(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx,
uint32_t aFlags) const {
PROFILER_LABEL("nsDisplayList", "PaintRoot");
PROFILER_LABEL("nsDisplayList", "PaintRoot",
js::ProfileEntry::Category::GRAPHICS);
PaintForFrame(aBuilder, aCtx, aBuilder->RootReferenceFrame(), aFlags);
}
@ -2853,7 +2857,9 @@ nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder,
nsAutoTArray<nsRect,10> rects;
ComputeDisjointRectangles(mVisibleRegion, &rects);
PROFILER_LABEL("nsDisplayBoxShadowOuter", "Paint");
PROFILER_LABEL("nsDisplayBoxShadowOuter", "Paint",
js::ProfileEntry::Category::GRAPHICS);
for (uint32_t i = 0; i < rects.Length(); ++i) {
nsCSSRendering::PaintBoxShadowOuter(presContext, *aCtx, mFrame,
borderRect, rects[i], mOpacity);
@ -2936,7 +2942,9 @@ nsDisplayBoxShadowInner::Paint(nsDisplayListBuilder* aBuilder,
nsAutoTArray<nsRect,10> rects;
ComputeDisjointRectangles(mVisibleRegion, &rects);
PROFILER_LABEL("nsDisplayBoxShadowInner", "Paint");
PROFILER_LABEL("nsDisplayBoxShadowInner", "Paint",
js::ProfileEntry::Category::GRAPHICS);
for (uint32_t i = 0; i < rects.Length(); ++i) {
aCtx->PushState();
aCtx->IntersectClip(rects[i]);

Просмотреть файл

@ -2484,7 +2484,9 @@ nsLayoutUtils::GetRemoteContentIds(nsIFrame* aFrame,
nsIFrame*
nsLayoutUtils::GetFrameForPoint(nsIFrame* aFrame, nsPoint aPt, uint32_t aFlags)
{
PROFILER_LABEL("nsLayoutUtils", "GetFrameForPoint");
PROFILER_LABEL("nsLayoutUtils", "GetFrameForPoint",
js::ProfileEntry::Category::GRAPHICS);
nsresult rv;
nsAutoTArray<nsIFrame*,8> outFrames;
rv = GetFramesForArea(aFrame, nsRect(aPt, nsSize(1, 1)), outFrames, aFlags);
@ -2497,7 +2499,9 @@ nsLayoutUtils::GetFramesForArea(nsIFrame* aFrame, const nsRect& aRect,
nsTArray<nsIFrame*> &aOutFrames,
uint32_t aFlags)
{
PROFILER_LABEL("nsLayoutUtils","GetFramesForArea");
PROFILER_LABEL("nsLayoutUtils", "GetFramesForArea",
js::ProfileEntry::Category::GRAPHICS);
nsDisplayListBuilder builder(aFrame, nsDisplayListBuilder::EVENT_DELIVERY,
false);
nsDisplayList list;
@ -2639,7 +2643,9 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
const nsRegion& aDirtyRegion, nscolor aBackstop,
uint32_t aFlags)
{
PROFILER_LABEL("nsLayoutUtils","PaintFrame");
PROFILER_LABEL("nsLayoutUtils", "PaintFrame",
js::ProfileEntry::Category::GRAPHICS);
if (aFlags & PAINT_WIDGET_LAYERS) {
nsView* view = aFrame->GetView();
if (!(view && view->GetWidget() && GetDisplayRootFrame(aFrame) == aFrame)) {
@ -2757,7 +2763,9 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
}
nsDisplayListBuilder::AutoCurrentScrollParentIdSetter idSetter(&builder, id);
PROFILER_LABEL("nsLayoutUtils","PaintFrame::BuildDisplayList");
PROFILER_LABEL("nsLayoutUtils", "PaintFrame::BuildDisplayList",
js::ProfileEntry::Category::GRAPHICS);
aFrame->BuildDisplayListForStackingContext(&builder, dirtyRect, &list);
}
const bool paintAllContinuations = aFlags & PAINT_ALL_CONTINUATIONS;
@ -2770,7 +2778,9 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
if (paintAllContinuations) {
nsIFrame* currentFrame = aFrame;
while ((currentFrame = currentFrame->GetNextContinuation()) != nullptr) {
PROFILER_LABEL("nsLayoutUtils","PaintFrame::ContinuationsBuildDisplayList");
PROFILER_LABEL("nsLayoutUtils", "PaintFrame::ContinuationsBuildDisplayList",
js::ProfileEntry::Category::GRAPHICS);
nsRect frameDirty = dirtyRect - builder.ToReferenceFrame(currentFrame);
currentFrame->BuildDisplayListForStackingContext(&builder,
frameDirty, &list);
@ -5069,7 +5079,8 @@ nsLayoutUtils::DrawBackgroundImage(nsRenderingContext* aRenderingContext,
const nsRect& aDirty,
uint32_t aImageFlags)
{
PROFILER_LABEL("layout", "nsLayoutUtils::DrawBackgroundImage");
PROFILER_LABEL("nsLayoutUtils", "DrawBackgroundImage",
js::ProfileEntry::Category::GRAPHICS);
if (UseBackgroundNearestFiltering()) {
aGraphicsFilter = GraphicsFilter::FILTER_NEAREST;

Просмотреть файл

@ -3966,8 +3966,8 @@ PresShell::FlushPendingNotifications(mozilla::ChangesToFlush aFlush)
// Make sure that we don't miss things added to mozFlushType!
MOZ_ASSERT(static_cast<uint32_t>(flushType) <= ArrayLength(flushTypeNames));
PROFILER_LABEL_PRINTF("layout", "Flush", "(Flush_%s)",
flushTypeNames[flushType - 1]);
PROFILER_LABEL_PRINTF("PresShell", "Flush",
js::ProfileEntry::Category::GRAPHICS, "(Flush_%s)", flushTypeNames[flushType - 1]);
#endif
#ifdef ACCESSIBILITY
@ -5813,7 +5813,9 @@ PresShell::Paint(nsView* aViewToPaint,
const nsRegion& aDirtyRegion,
uint32_t aFlags)
{
PROFILER_LABEL("Paint", "PresShell::Paint");
PROFILER_LABEL("PresShell", "Paint",
js::ProfileEntry::Category::GRAPHICS);
NS_ASSERTION(!mIsDestroying, "painting a destroyed PresShell");
NS_ASSERTION(aViewToPaint, "null view");
@ -8370,7 +8372,9 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
nsIURI *uri = mDocument->GetDocumentURI();
if (uri)
uri->GetSpec(docURL);
PROFILER_LABEL_PRINTF("layout", "DoReflow", "(%s)", docURL.get());
PROFILER_LABEL_PRINTF("PresShell", "DoReflow",
js::ProfileEntry::Category::GRAPHICS, "(%s)", docURL.get());
if (mReflowContinueTimer) {
mReflowContinueTimer->Cancel();

Просмотреть файл

@ -1056,7 +1056,8 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
return;
}
PROFILER_LABEL("nsRefreshDriver", "Tick");
PROFILER_LABEL("nsRefreshDriver", "Tick",
js::ProfileEntry::Category::GRAPHICS);
// We're either frozen or we were disconnected (likely in the middle
// of a tick iteration). Just do nothing here, since our

Просмотреть файл

@ -4527,7 +4527,9 @@ public:
void
nsDisplayText::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) {
PROFILER_LABEL("nsDisplayText", "Paint");
PROFILER_LABEL("nsDisplayText", "Paint",
js::ProfileEntry::Category::GRAPHICS);
// Add 1 pixel of dirty area around mVisibleRect to allow us to paint
// antialiased pixels beyond the measured text extents.
// This is temporary until we do this in the actual calculation of text extents.
@ -5333,7 +5335,9 @@ nsTextFrame::PaintOneShadow(uint32_t aOffset, uint32_t aLength,
const nsCharClipDisplayItem::ClipEdges& aClipEdges,
nscoord aLeftSideOffset, gfxRect& aBoundingBox)
{
PROFILER_LABEL("nsTextFrame", "PaintOneShadow");
PROFILER_LABEL("nsTextFrame", "PaintOneShadow",
js::ProfileEntry::Category::GRAPHICS);
gfxPoint shadowOffset(aShadowDetails->mXOffset, aShadowDetails->mYOffset);
nscoord blurRadius = std::max(aShadowDetails->mRadius, 0);

Просмотреть файл

@ -48,7 +48,9 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
PROFILER_LABEL("ViewportFrame", "BuildDisplayList");
PROFILER_LABEL("ViewportFrame", "BuildDisplayList",
js::ProfileEntry::Category::GRAPHICS);
nsIFrame* kid = mFrames.FirstChild();
if (!kid)
return;

Просмотреть файл

@ -409,7 +409,8 @@ nsChangeHint
nsStyleContext::CalcStyleDifference(nsStyleContext* aOther,
nsChangeHint aParentHintsNotHandledForDescendants)
{
PROFILER_LABEL("nsStyleContext", "CalcStyleDifference");
PROFILER_LABEL("nsStyleContext", "CalcStyleDifference",
js::ProfileEntry::Category::CSS);
NS_ABORT_IF_FALSE(NS_IsHintSubset(aParentHintsNotHandledForDescendants,
nsChangeHint_Hints_NotHandledForDescendants),

Просмотреть файл

@ -950,7 +950,8 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
RuleProcessorData* aData, Element* aElement,
nsRuleWalker* aRuleWalker)
{
PROFILER_LABEL("nsStyleSet", "FileRules");
PROFILER_LABEL("nsStyleSet", "FileRules",
js::ProfileEntry::Category::CSS);
// Cascading order:
// [least important]

Просмотреть файл

@ -400,7 +400,9 @@ nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream *stream)
{
LOG(("nsInputStreamPump::OnInputStreamReady [this=%p]\n", this));
PROFILER_LABEL("Input", "nsInputStreamPump::OnInputStreamReady");
PROFILER_LABEL("nsInputStreamPump", "OnInputStreamReady",
js::ProfileEntry::Category::NETWORK);
// this function has been called from a PLEvent, so we can safely call
// any listener or progress sink methods directly from here.
@ -494,7 +496,9 @@ nsInputStreamPump::OnStateStart()
{
mMonitor.AssertCurrentThreadIn();
PROFILER_LABEL("nsInputStreamPump", "OnStateStart");
PROFILER_LABEL("nsInputStreamPump", "OnStateStart",
js::ProfileEntry::Category::NETWORK);
LOG((" OnStateStart [this=%p]\n", this));
nsresult rv;
@ -531,7 +535,9 @@ nsInputStreamPump::OnStateTransfer()
{
mMonitor.AssertCurrentThreadIn();
PROFILER_LABEL("Input", "nsInputStreamPump::OnStateTransfer");
PROFILER_LABEL("nsInputStreamPump", "OnStateTransfer",
js::ProfileEntry::Category::NETWORK);
LOG((" OnStateTransfer [this=%p]\n", this));
// if canceled, go directly to STATE_STOP...
@ -674,7 +680,9 @@ nsInputStreamPump::OnStateStop()
return STATE_IDLE;
}
PROFILER_LABEL("Input", "nsInputStreamPump::OnStateTransfer");
PROFILER_LABEL("nsInputStreamPump", "OnStateStop",
js::ProfileEntry::Category::NETWORK);
LOG((" OnStateStop [this=%p status=%x]\n", this, mStatus));
// if an error occurred, we must be sure to pass the error onto the async

Просмотреть файл

@ -91,7 +91,9 @@ NS_IMETHODIMP
nsStreamLoader::OnStopRequest(nsIRequest* request, nsISupports *ctxt,
nsresult aStatus)
{
PROFILER_LABEL("network", "nsStreamLoader::OnStopRequest");
PROFILER_LABEL("nsStreamLoader", "OnStopRequest",
js::ProfileEntry::Category::NETWORK);
if (mObserver) {
// provide nsIStreamLoader::request during call to OnStreamComplete
mRequest = request;

Просмотреть файл

@ -4907,7 +4907,9 @@ nsHttpChannel::GetRequestMethod(nsACString& aMethod)
NS_IMETHODIMP
nsHttpChannel::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
{
PROFILER_LABEL("nsHttpChannel", "OnStartRequest");
PROFILER_LABEL("nsHttpChannel", "OnStartRequest",
js::ProfileEntry::Category::NETWORK);
if (!(mCanceled || NS_FAILED(mStatus))) {
// capture the request's status, so our consumers will know ASAP of any
// connection failures, etc - bug 93581
@ -5012,7 +5014,9 @@ nsHttpChannel::ContinueOnStartRequest3(nsresult result)
NS_IMETHODIMP
nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult status)
{
PROFILER_LABEL("network", "nsHttpChannel::OnStopRequest");
PROFILER_LABEL("nsHttpChannel", "OnStopRequest",
js::ProfileEntry::Category::NETWORK);
LOG(("nsHttpChannel::OnStopRequest [this=%p request=%p status=%x]\n",
this, request, status));
@ -5246,7 +5250,9 @@ nsHttpChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
nsIInputStream *input,
uint64_t offset, uint32_t count)
{
PROFILER_LABEL("network", "nsHttpChannel::OnDataAvailable");
PROFILER_LABEL("nsHttpChannel", "OnDataAvailable",
js::ProfileEntry::Category::NETWORK);
LOG(("nsHttpChannel::OnDataAvailable [this=%p request=%p offset=%llu count=%u]\n",
this, request, offset, count));

Просмотреть файл

@ -338,7 +338,9 @@ class nsHtml5FlushLoopGuard
void
nsHtml5TreeOpExecutor::RunFlushLoop()
{
PROFILER_LABEL("html5", "RunFlushLoop");
PROFILER_LABEL("nsHtml5TreeOpExecutor", "RunFlushLoop",
js::ProfileEntry::Category::OTHER);
if (mRunFlushLoopOnStack) {
// There's already a RunFlushLoop() on the call stack.
return;

Просмотреть файл

@ -563,7 +563,8 @@ nsresult
Connection::initialize()
{
NS_ASSERTION (!mDBConn, "Initialize called on already opened database!");
PROFILER_LABEL("storage", "Connection::initialize");
PROFILER_LABEL("mozStorageConnection", "initialize",
js::ProfileEntry::Category::STORAGE);
// in memory database requested, sqlite uses a magic file name
int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, nullptr);
@ -580,7 +581,8 @@ Connection::initialize(nsIFile *aDatabaseFile)
{
NS_ASSERTION (aDatabaseFile, "Passed null file!");
NS_ASSERTION (!mDBConn, "Initialize called on already opened database!");
PROFILER_LABEL("storage", "Connection::initialize");
PROFILER_LABEL("mozStorageConnection", "initialize",
js::ProfileEntry::Category::STORAGE);
mDatabaseFile = aDatabaseFile;
@ -608,7 +610,8 @@ Connection::initialize(nsIFileURL *aFileURL)
{
NS_ASSERTION (aFileURL, "Passed null file URL!");
NS_ASSERTION (!mDBConn, "Initialize called on already opened database!");
PROFILER_LABEL("storage", "Connection::initialize");
PROFILER_LABEL("mozStorageConnection", "initialize",
js::ProfileEntry::Category::STORAGE);
nsCOMPtr<nsIFile> databaseFile;
nsresult rv = aFileURL->GetFile(getter_AddRefs(databaseFile));
@ -1167,7 +1170,9 @@ NS_IMETHODIMP
Connection::AsyncClone(bool aReadOnly,
mozIStorageCompletionCallback *aCallback)
{
PROFILER_LABEL("storage", "Connection::Clone");
PROFILER_LABEL("mozStorageConnection", "AsyncClone",
js::ProfileEntry::Category::STORAGE);
if (!NS_IsMainThread()) {
return NS_ERROR_NOT_SAME_THREAD;
}
@ -1248,7 +1253,9 @@ Connection::Clone(bool aReadOnly,
{
MOZ_ASSERT(threadOpenedOn == NS_GetCurrentThread());
PROFILER_LABEL("storage", "Connection::Clone");
PROFILER_LABEL("mozStorageConnection", "Clone",
js::ProfileEntry::Category::STORAGE);
if (!mDBConn)
return NS_ERROR_NOT_INITIALIZED;
if (!mDatabaseFile)

Просмотреть файл

@ -609,7 +609,9 @@ Statement::Execute()
NS_IMETHODIMP
Statement::ExecuteStep(bool *_moreResults)
{
PROFILER_LABEL("storage", "Statement::ExecuteStep");
PROFILER_LABEL("Statement", "ExecuteStep",
js::ProfileEntry::Category::STORAGE);
if (!mDBStatement)
return NS_ERROR_NOT_INITIALIZED;

Просмотреть файл

@ -259,7 +259,9 @@ nsAnnotationService::SetItemAnnotation(int64_t aItemId,
int32_t aFlags,
uint16_t aExpiration)
{
PROFILER_LABEL("AnnotationService", "SetItemAnnotation");
PROFILER_LABEL("AnnotationService", "SetItemAnnotation",
js::ProfileEntry::Category::OTHER);
NS_ENSURE_ARG_MIN(aItemId, 1);
NS_ENSURE_ARG(aValue);

Просмотреть файл

@ -657,7 +657,9 @@ nsNavBookmarks::InsertBookmark(int64_t aFolder,
NS_IMETHODIMP
nsNavBookmarks::RemoveItem(int64_t aItemId)
{
PROFILER_LABEL("bookmarks", "RemoveItem");
PROFILER_LABEL("nsNavBookmarks", "RemoveItem",
js::ProfileEntry::Category::OTHER);
NS_ENSURE_ARG(!IsRoot(aItemId));
BookmarkData bookmark;
@ -1153,7 +1155,9 @@ nsNavBookmarks::GetDescendantChildren(int64_t aFolderId,
NS_IMETHODIMP
nsNavBookmarks::RemoveFolderChildren(int64_t aFolderId)
{
PROFILER_LABEL("bookmarks", "RemoveFolderChilder");
PROFILER_LABEL("nsNavBookmarks", "RemoveFolderChilder",
js::ProfileEntry::Category::OTHER);
NS_ENSURE_ARG_MIN(aFolderId, 1);
NS_ENSURE_ARG(aFolderId != mRoot);
@ -2661,7 +2665,9 @@ nsNavBookmarks::EnsureKeywordsHash() {
NS_IMETHODIMP
nsNavBookmarks::RunInBatchMode(nsINavHistoryBatchCallback* aCallback,
nsISupports* aUserData) {
PROFILER_LABEL("bookmarks", "RunInBatchMode");
PROFILER_LABEL("nsNavBookmarks", "RunInBatchMode",
js::ProfileEntry::Category::OTHER);
NS_ENSURE_ARG(aCallback);
mBatching = true;

Просмотреть файл

@ -4027,7 +4027,9 @@ XREMain::XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
{
char aLocal;
GeckoProfilerInitRAII profilerGuard(&aLocal);
PROFILER_LABEL("Startup", "XRE_Main");
PROFILER_LABEL("Startup", "XRE_Main",
js::ProfileEntry::Category::OTHER);
nsresult rv = NS_OK;
@ -4232,7 +4234,9 @@ XRE_mainMetro(int argc, char* argv[], const nsXREAppData* aAppData)
{
char aLocal;
GeckoProfilerInitRAII profilerGuard(&aLocal);
PROFILER_LABEL("Startup", "XRE_Main");
PROFILER_LABEL("Startup", "XRE_Main",
js::ProfileEntry::Category::OTHER);
mozilla::IOInterposerInit ioInterposerGuard;

Просмотреть файл

@ -303,7 +303,9 @@ XRE_InitChildProcess(int aArgc,
char aLocal;
profiler_init(&aLocal);
PROFILER_LABEL("Startup", "XRE_InitChildProcess");
PROFILER_LABEL("Startup", "XRE_InitChildProcess",
js::ProfileEntry::Category::OTHER);
sChildProcessType = aProcess;

Просмотреть файл

@ -722,7 +722,8 @@ nsViewManager::DispatchEvent(WidgetGUIEvent *aEvent,
nsView* aView,
nsEventStatus* aStatus)
{
PROFILER_LABEL("event", "nsViewManager::DispatchEvent");
PROFILER_LABEL("nsViewManager", "DispatchEvent",
js::ProfileEntry::Category::EVENTS);
WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
if ((mouseEvent &&

Просмотреть файл

@ -228,14 +228,18 @@ nsAppShell::ProcessNextNativeEvent(bool mayWait)
{
EVLOG("nsAppShell::ProcessNextNativeEvent %d", mayWait);
PROFILER_LABEL("nsAppShell", "ProcessNextNativeEvent");
PROFILER_LABEL("nsAppShell", "ProcessNextNativeEvent",
js::ProfileEntry::Category::EVENTS);
nsAutoPtr<AndroidGeckoEvent> curEvent;
{
MutexAutoLock lock(mCondLock);
curEvent = PopNextEvent();
if (!curEvent && mayWait) {
PROFILER_LABEL("nsAppShell::ProcessNextNativeEvent", "Wait");
PROFILER_LABEL("nsAppShell", "ProcessNextNativeEvent::Wait",
js::ProfileEntry::Category::EVENTS);
// hmm, should we really hardcode this 10s?
#if defined(DEBUG_ANDROID_EVENTS)
PRTime t0, t1;

Просмотреть файл

@ -2437,7 +2437,9 @@ nsWindow::DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect)
void
nsWindow::DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect)
{
PROFILER_LABEL("nsWindow", "DrawWindowOverlay");
PROFILER_LABEL("nsWindow", "DrawWindowOverlay",
js::ProfileEntry::Category::GRAPHICS);
JNIEnv *env = GetJNIForThread();
AutoLocalJNIFrame jniFrame(env);

Просмотреть файл

@ -249,7 +249,9 @@ void
nsAppShell::ProcessGeckoEvents(void* aInfo)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
PROFILER_LABEL("Events", "ProcessGeckoEvents");
PROFILER_LABEL("Events", "ProcessGeckoEvents",
js::ProfileEntry::Category::EVENTS);
nsAppShell* self = static_cast<nsAppShell*> (aInfo);
if (self->mRunningEventLoop) {

Просмотреть файл

@ -3549,7 +3549,8 @@ NSEvent* gLastDragMouseDownEvent = nil;
return;
}
PROFILER_LABEL("widget", "ChildView::drawRect");
PROFILER_LABEL("ChildView", "drawRect",
js::ProfileEntry::Category::GRAPHICS);
// The CGContext that drawRect supplies us with comes with a transform that
// scales one user space unit to one Cocoa point, which can consist of
@ -3668,7 +3669,8 @@ NSEvent* gLastDragMouseDownEvent = nil;
- (void)drawUsingOpenGL
{
PROFILER_LABEL("widget", "ChildView::drawUsingOpenGL");
PROFILER_LABEL("ChildView", "drawUsingOpenGL",
js::ProfileEntry::Category::GRAPHICS);
if (![self isUsingOpenGL] || !mGeckoChild->IsVisible())
return;

Просмотреть файл

@ -1070,12 +1070,16 @@ nsAppShell::ScheduleNativeEventCallback()
bool
nsAppShell::ProcessNextNativeEvent(bool mayWait)
{
PROFILER_LABEL("nsAppShell", "ProcessNextNativeEvent");
PROFILER_LABEL("nsAppShell", "ProcessNextNativeEvent",
js::ProfileEntry::Category::EVENTS);
epoll_event events[16] = {{ 0 }};
int event_count;
{
PROFILER_LABEL("nsAppShell", "ProcessNextNativeEvent::Wait");
PROFILER_LABEL("nsAppShell", "ProcessNextNativeEvent::Wait",
js::ProfileEntry::Category::EVENTS);
if ((event_count = epoll_wait(epollfd, events, 16, mayWait ? -1 : 0)) <= 0)
return true;
}

Просмотреть файл

@ -4074,7 +4074,9 @@ nsCycleCollector_forgetSkippable(bool aRemoveChildlessNodes,
MOZ_ASSERT(data);
MOZ_ASSERT(data->mCollector);
PROFILER_LABEL("CC", "nsCycleCollector_forgetSkippable");
PROFILER_LABEL("nsCycleCollector", "forgetSkippable",
js::ProfileEntry::Category::CC);
TimeLog timeLog;
data->mCollector->ForgetSkippable(aRemoveChildlessNodes,
aAsyncSnowWhiteFreeing);
@ -4122,7 +4124,9 @@ nsCycleCollector_collect(nsICycleCollectorListener* aManualListener)
MOZ_ASSERT(data);
MOZ_ASSERT(data->mCollector);
PROFILER_LABEL("CC", "nsCycleCollector_collect");
PROFILER_LABEL("nsCycleCollector", "collect",
js::ProfileEntry::Category::CC);
SliceBudget unlimitedBudget;
data->mCollector->Collect(ManualCC, unlimitedBudget, aManualListener);
}
@ -4136,7 +4140,9 @@ nsCycleCollector_collectSlice(int64_t aSliceTime)
MOZ_ASSERT(data);
MOZ_ASSERT(data->mCollector);
PROFILER_LABEL("CC", "nsCycleCollector_collectSlice");
PROFILER_LABEL("nsCycleCollector", "collectSlice",
js::ProfileEntry::Category::CC);
SliceBudget budget;
if (aSliceTime >= 0) {
budget = SliceBudget(SliceBudget::TimeBudget(aSliceTime));
@ -4153,7 +4159,9 @@ nsCycleCollector_collectSliceWork(int64_t aSliceWork)
MOZ_ASSERT(data);
MOZ_ASSERT(data->mCollector);
PROFILER_LABEL("CC", "nsCycleCollector_collectSliceWork");
PROFILER_LABEL("nsCycleCollector", "collectSliceWork",
js::ProfileEntry::Category::CC);
SliceBudget budget;
if (aSliceWork >= 0) {
budget = SliceBudget(SliceBudget::WorkBudget(aSliceWork));
@ -4196,7 +4204,9 @@ nsCycleCollector_shutdown()
if (data) {
MOZ_ASSERT(data->mCollector);
PROFILER_LABEL("CC", "nsCycleCollector_shutdown");
PROFILER_LABEL("nsCycleCollector", "shutdown",
js::ProfileEntry::Category::CC);
data->mCollector->Shutdown();
data->mCollector = nullptr;
if (!data->mRuntime) {

Просмотреть файл

@ -547,7 +547,8 @@ nsTimerImpl::Fire()
return;
}
PROFILER_LABEL("Timer", "Fire");
PROFILER_LABEL("Timer", "Fire",
js::ProfileEntry::Category::OTHER);
#ifdef MOZ_TASK_TRACER
mozilla::tasktracer::AutoRunFakeTracedTask runTracedTask(mTracedTask);