Bug 1168606 - Remove duplication in uses of IDB_LOG_MARK. r=ttung,asuth
authorSimon Giesecke <sgiesecke@mozilla.com>
Fri, 27 Sep 2019 10:11:45 +0000
changeset 495622 340dfa69aed87f29b9fdeef59a650ad5eb8c1b7b
parent 495621 a864ed2ae59a54616d40dabc67265ab4341a73a8
child 495623 d2772a7482ed9394a2c30acc6d03caa36317e75f
push id114140
push userdvarga@mozilla.com
push dateWed, 02 Oct 2019 18:04:51 +0000
treeherdermozilla-inbound@32eb0ea893f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttung, asuth
bugs1168606
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1168606 - Remove duplication in uses of IDB_LOG_MARK. r=ttung,asuth Differential Revision: https://phabricator.services.mozilla.com/D46576
dom/indexedDB/ActorsChild.cpp
dom/indexedDB/ActorsParent.cpp
dom/indexedDB/IDBCursor.cpp
dom/indexedDB/IDBDatabase.cpp
dom/indexedDB/IDBFactory.cpp
dom/indexedDB/IDBIndex.cpp
dom/indexedDB/IDBObjectStore.cpp
dom/indexedDB/IDBTransaction.cpp
dom/indexedDB/ProfilerHelpers.h
--- a/dom/indexedDB/ActorsChild.cpp
+++ b/dom/indexedDB/ActorsChild.cpp
@@ -669,29 +669,25 @@ void DispatchErrorEvent(IDBRequest* aReq
   }
 
   Maybe<AutoSetCurrentTransaction> asct;
   if (aTransaction) {
     asct.emplace(aTransaction);
   }
 
   if (transaction) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
-        "Firing %s event with error 0x%x",
-        "IndexedDB %s: C T[%lld] R[%llu]: %s (0x%x)", IDB_LOG_ID_STRING(),
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
+        "Firing %s event with error 0x%x", "%s (0x%x)",
         transaction->LoggingSerialNumber(), request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(aEvent, kErrorEventType), aErrorCode);
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Request[%llu]: "
-        "Firing %s event with error 0x%x",
-        "IndexedDB %s: C R[%llu]: %s (0x%x)", IDB_LOG_ID_STRING(),
-        request->LoggingSerialNumber(),
-        IDB_LOG_STRINGIFY(aEvent, kErrorEventType), aErrorCode);
+    IDB_LOG_MARK_CHILD_REQUEST("Firing %s event with error 0x%x", "%s (0x%x)",
+                               request->LoggingSerialNumber(),
+                               IDB_LOG_STRINGIFY(aEvent, kErrorEventType),
+                               aErrorCode);
   }
 
   IgnoredErrorResult rv;
   bool doDefault = request->DispatchEvent(*aEvent, CallerType::System, rv);
   if (NS_WARN_IF(rv.Failed())) {
     return;
   }
 
@@ -742,27 +738,24 @@ void DispatchSuccessEvent(ResultHelper* 
   }
 
   request->SetResultCallback(aResultHelper);
 
   MOZ_ASSERT(aEvent);
   MOZ_ASSERT_IF(transaction, transaction->IsOpen());
 
   if (transaction) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
-        "Firing %s event",
-        "IndexedDB %s: C T[%lld] R[%llu]: %s", IDB_LOG_ID_STRING(),
-        transaction->LoggingSerialNumber(), request->LoggingSerialNumber(),
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
+        "Firing %s event", "%s", transaction->LoggingSerialNumber(),
+        request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(aEvent, kSuccessEventType));
   } else {
-    IDB_LOG_MARK("IndexedDB %s: Child  Request[%llu]: Firing %s event",
-                 "IndexedDB %s: C R[%llu]: %s", IDB_LOG_ID_STRING(),
-                 request->LoggingSerialNumber(),
-                 IDB_LOG_STRINGIFY(aEvent, kSuccessEventType));
+    IDB_LOG_MARK_CHILD_REQUEST("Firing %s event", "%s",
+                               request->LoggingSerialNumber(),
+                               IDB_LOG_STRINGIFY(aEvent, kSuccessEventType));
   }
 
   MOZ_ASSERT_IF(transaction,
                 transaction->IsOpen() && !transaction->IsAborted());
 
   IgnoredErrorResult rv;
   request->DispatchEvent(*aEvent, rv);
   if (NS_WARN_IF(rv.Failed())) {
@@ -1762,19 +1755,18 @@ mozilla::ipc::IPCResult BackgroundFactor
   } else {
     blockedEvent = IDBVersionChangeEvent::Create(
         mRequest, type, aCurrentVersion, mRequestedVersion);
     MOZ_ASSERT(blockedEvent);
   }
 
   RefPtr<IDBRequest> kungFuDeathGrip = mRequest;
 
-  IDB_LOG_MARK("IndexedDB %s: Child  Request[%llu]: Firing \"blocked\" event",
-               "IndexedDB %s: C R[%llu]: \"blocked\"", IDB_LOG_ID_STRING(),
-               kungFuDeathGrip->LoggingSerialNumber());
+  IDB_LOG_MARK_CHILD_REQUEST("Firing \"blocked\" event", "\"blocked\"",
+                             kungFuDeathGrip->LoggingSerialNumber());
 
   IgnoredErrorResult rv;
   kungFuDeathGrip->DispatchEvent(*blockedEvent, rv);
   if (rv.Failed()) {
     NS_WARNING("Failed to dispatch event!");
   }
 
   return IPC_OK();
@@ -2052,19 +2044,18 @@ mozilla::ipc::IPCResult BackgroundDataba
         IDBVersionChangeEvent::Create(kungFuDeathGrip, type, aOldVersion);
     MOZ_ASSERT(versionChangeEvent);
   } else {
     versionChangeEvent = IDBVersionChangeEvent::Create(
         kungFuDeathGrip, type, aOldVersion, aNewVersion.value());
     MOZ_ASSERT(versionChangeEvent);
   }
 
-  IDB_LOG_MARK("IndexedDB %s: Child : Firing \"versionchange\" event",
-               "IndexedDB %s: C: IDBDatabase \"versionchange\" event",
-               IDB_LOG_ID_STRING());
+  IDB_LOG_MARK("Child : Firing \"versionchange\" event",
+               "C: IDBDatabase \"versionchange\" event", IDB_LOG_ID_STRING());
 
   IgnoredErrorResult rv;
   kungFuDeathGrip->DispatchEvent(*versionChangeEvent, rv);
   if (rv.Failed()) {
     NS_WARNING("Failed to dispatch event!");
   }
 
   if (!kungFuDeathGrip->IsClosed()) {
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -13288,21 +13288,19 @@ mozilla::ipc::IPCResult Database::RecvCl
   return IPC_OK();
 }
 
 void Database::StartTransactionOp::RunOnConnectionThread() {
   MOZ_ASSERT(!IsOnBackgroundThread());
   MOZ_ASSERT(Transaction());
   MOZ_ASSERT(NS_SUCCEEDED(mResultCode));
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Parent Transaction[%lld]: "
-      "Beginning database work",
-      "IndexedDB %s: P T[%lld]: DB Start",
-      IDB_LOG_ID_STRING(mBackgroundChildLoggingId), mLoggingSerialNumber);
+  IDB_LOG_MARK_PARENT_TRANSACTION("Beginning database work", "DB Start",
+                                  IDB_LOG_ID_STRING(mBackgroundChildLoggingId),
+                                  mLoggingSerialNumber);
 
   TransactionDatabaseOperationBase::RunOnConnectionThread();
 }
 
 nsresult Database::StartTransactionOp::DoDatabaseWork(
     DatabaseConnection* aConnection) {
   MOZ_ASSERT(aConnection);
   aConnection->AssertIsOnConnectionThread();
@@ -21225,21 +21223,19 @@ nsresult OpenDatabaseOp::VersionChangeOp
   if (NS_WARN_IF(QuotaClient::IsShuttingDownOnNonBackgroundThread()) ||
       !OperationMayProceed()) {
     IDB_REPORT_INTERNAL_ERR();
     return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
   }
 
   AUTO_PROFILER_LABEL("OpenDatabaseOp::VersionChangeOp::DoDatabaseWork", DOM);
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Parent Transaction[%lld]: "
-      "Beginning database work",
-      "IndexedDB %s: P T[%lld]: DB Start",
-      IDB_LOG_ID_STRING(mBackgroundChildLoggingId), mLoggingSerialNumber);
+  IDB_LOG_MARK_PARENT_TRANSACTION("Beginning database work", "DB Start",
+                                  IDB_LOG_ID_STRING(mBackgroundChildLoggingId),
+                                  mLoggingSerialNumber);
 
   Transaction()->SetActiveOnConnectionThread();
 
   nsresult rv = aConnection->BeginWriteTransaction();
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
@@ -21865,31 +21861,27 @@ void TransactionDatabaseOperationBase::R
         rv = autoProgress.Register(connection->GetStorageConnection(), this);
         if (NS_WARN_IF(NS_FAILED(rv))) {
           mResultCode = rv;
         }
       }
 
       if (NS_SUCCEEDED(rv)) {
         if (mLoggingSerialNumber) {
-          IDB_LOG_MARK(
-              "IndexedDB %s: Parent Transaction[%lld] Request[%llu]: "
-              "Beginning database work",
-              "IndexedDB %s: P T[%lld] R[%llu]: DB Start",
+          IDB_LOG_MARK_PARENT_TRANSACTION_REQUEST(
+              "Beginning database work", "DB Start",
               IDB_LOG_ID_STRING(mBackgroundChildLoggingId),
               mTransactionLoggingSerialNumber, mLoggingSerialNumber);
         }
 
         rv = DoDatabaseWork(connection);
 
         if (mLoggingSerialNumber) {
-          IDB_LOG_MARK(
-              "IndexedDB %s: Parent Transaction[%lld] Request[%llu]: "
-              "Finished database work",
-              "IndexedDB %s: P T[%lld] R[%llu]: DB End",
+          IDB_LOG_MARK_PARENT_TRANSACTION_REQUEST(
+              "Finished database work", "DB End",
               IDB_LOG_ID_STRING(mBackgroundChildLoggingId),
               mTransactionLoggingSerialNumber, mLoggingSerialNumber);
         }
 
         if (NS_FAILED(rv)) {
           mResultCode = rv;
         }
       }
@@ -22198,20 +22190,18 @@ NS_IMPL_ISUPPORTS_INHERITED0(Transaction
 
 NS_IMETHODIMP
 TransactionBase::CommitOp::Run() {
   MOZ_ASSERT(mTransaction);
   mTransaction->AssertIsOnConnectionThread();
 
   AUTO_PROFILER_LABEL("TransactionBase::CommitOp::Run", DOM);
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Parent Transaction[%lld] Request[%llu]: "
-      "Beginning database work",
-      "IndexedDB %s: P T[%lld] R[%llu]: DB Start",
+  IDB_LOG_MARK_PARENT_TRANSACTION_REQUEST(
+      "Beginning database work", "DB Start",
       IDB_LOG_ID_STRING(mBackgroundChildLoggingId),
       mTransaction->LoggingSerialNumber(), mLoggingSerialNumber);
 
   if (mTransaction->GetMode() != IDBTransaction::READ_ONLY &&
       mTransaction->mHasBeenActiveOnConnectionThread) {
     Database* database = mTransaction->GetDatabase();
     MOZ_ASSERT(database);
 
@@ -22265,28 +22255,24 @@ TransactionBase::CommitOp::Run() {
       if (mTransaction->GetMode() == IDBTransaction::CLEANUP) {
         connection->DoIdleProcessing(/* aNeedsCheckpoint */ true);
 
         connection->EnableQuotaChecks();
       }
     }
   }
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Parent Transaction[%lld] Request[%llu]: "
-      "Finished database work",
-      "IndexedDB %s: P T[%lld] R[%llu]: DB End",
+  IDB_LOG_MARK_PARENT_TRANSACTION_REQUEST(
+      "Finished database work", "DB End",
       IDB_LOG_ID_STRING(mBackgroundChildLoggingId),
       mTransaction->LoggingSerialNumber(), mLoggingSerialNumber);
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Parent Transaction[%lld]: "
-      "Finished database work",
-      "IndexedDB %s: P T[%lld]: DB End",
-      IDB_LOG_ID_STRING(mBackgroundChildLoggingId), mLoggingSerialNumber);
+  IDB_LOG_MARK_PARENT_TRANSACTION("Finished database work", "DB End",
+                                  IDB_LOG_ID_STRING(mBackgroundChildLoggingId),
+                                  mLoggingSerialNumber);
 
   return NS_OK;
 }
 
 void TransactionBase::CommitOp::TransactionFinishedBeforeUnblock() {
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(mTransaction);
 
@@ -22296,20 +22282,18 @@ void TransactionBase::CommitOp::Transact
     mTransaction->UpdateMetadata(mResultCode);
   }
 }
 
 void TransactionBase::CommitOp::TransactionFinishedAfterUnblock() {
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(mTransaction);
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Parent Transaction[%lld]: "
-      "Finished with result 0x%x",
-      "IndexedDB %s: P T[%lld]: Transaction finished (0x%x)",
+  IDB_LOG_MARK_PARENT_TRANSACTION(
+      "Finished with result 0x%x", "Transaction finished (0x%x)",
       IDB_LOG_ID_STRING(mTransaction->GetLoggingInfo()->Id()),
       mTransaction->LoggingSerialNumber(), mResultCode);
 
   mTransaction->SendCompleteNotification(ClampResultCode(mResultCode));
 
   Database* database = mTransaction->GetDatabase();
   MOZ_ASSERT(database);
 
--- a/dom/indexedDB/IDBCursor.cpp
+++ b/dom/indexedDB/IDBCursor.cpp
@@ -425,32 +425,28 @@ void IDBCursor::Continue(JSContext* aCx,
         MOZ_CRASH("Unknown direction type!");
     }
   }
 
   const uint64_t requestSerialNumber = IDBRequest::NextSerialNumber();
   mRequest->SetLoggingSerialNumber(requestSerialNumber);
 
   if (mType == Type_ObjectStore || mType == Type_ObjectStoreKey) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s)."
         "cursor(%s).continue(%s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBCursor.continue()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBCursor.continue()", mTransaction->LoggingSerialNumber(),
         requestSerialNumber, IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(mSourceObjectStore),
         IDB_LOG_STRINGIFY(mDirection), IDB_LOG_STRINGIFY(key));
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s)."
         "index(%s).cursor(%s).continue(%s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBCursor.continue()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBCursor.continue()", mTransaction->LoggingSerialNumber(),
         requestSerialNumber, IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction),
         IDB_LOG_STRINGIFY(mSourceIndex->ObjectStore()),
         IDB_LOG_STRINGIFY(mSourceIndex), IDB_LOG_STRINGIFY(mDirection),
         IDB_LOG_STRINGIFY(key));
   }
 
   mBackgroundActor->SendContinueInternal(ContinueParams(key));
@@ -543,22 +539,20 @@ void IDBCursor::ContinuePrimaryKey(JSCon
 
     default:
       MOZ_CRASH("Unknown direction type!");
   }
 
   const uint64_t requestSerialNumber = IDBRequest::NextSerialNumber();
   mRequest->SetLoggingSerialNumber(requestSerialNumber);
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
       "database(%s).transaction(%s).objectStore(%s)."
       "index(%s).cursor(%s).continuePrimaryKey(%s, %s)",
-      "IndexedDB %s: C T[%lld] R[%llu]: IDBCursor.continuePrimaryKey()",
-      IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+      "IDBCursor.continuePrimaryKey()", mTransaction->LoggingSerialNumber(),
       requestSerialNumber, IDB_LOG_STRINGIFY(mTransaction->Database()),
       IDB_LOG_STRINGIFY(mTransaction),
       IDB_LOG_STRINGIFY(mSourceIndex->ObjectStore()),
       IDB_LOG_STRINGIFY(mSourceIndex), IDB_LOG_STRINGIFY(mDirection),
       IDB_LOG_STRINGIFY(key), IDB_LOG_STRINGIFY(primaryKey));
 
   mBackgroundActor->SendContinueInternal(
       ContinuePrimaryKeyParams(key, primaryKey));
@@ -583,32 +577,28 @@ void IDBCursor::Advance(uint32_t aCount,
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR);
     return;
   }
 
   const uint64_t requestSerialNumber = IDBRequest::NextSerialNumber();
   mRequest->SetLoggingSerialNumber(requestSerialNumber);
 
   if (mType == Type_ObjectStore || mType == Type_ObjectStoreKey) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s)."
         "cursor(%s).advance(%ld)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBCursor.advance()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBCursor.advance()", mTransaction->LoggingSerialNumber(),
         requestSerialNumber, IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(mSourceObjectStore),
         IDB_LOG_STRINGIFY(mDirection), aCount);
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s)."
         "index(%s).cursor(%s).advance(%ld)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBCursor.advance()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBCursor.advance()", mTransaction->LoggingSerialNumber(),
         requestSerialNumber, IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction),
         IDB_LOG_STRINGIFY(mSourceIndex->ObjectStore()),
         IDB_LOG_STRINGIFY(mSourceIndex), IDB_LOG_STRINGIFY(mDirection), aCount);
   }
 
   mBackgroundActor->SendContinueInternal(AdvanceParams(aCount));
 
@@ -696,34 +686,31 @@ already_AddRefed<IDBRequest> IDBCursor::
     if (aRv.Failed()) {
       return nullptr;
     }
   }
 
   request->SetSource(this);
 
   if (mType == Type_ObjectStore) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
+        " %s: Child  Transaction[%lld] Request[%llu]: "
         "database(%s).transaction(%s).objectStore(%s)."
         "cursor(%s).update(%s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBCursor.update()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBCursor.update()", mTransaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(objectStore),
         IDB_LOG_STRINGIFY(mDirection),
         IDB_LOG_STRINGIFY(objectStore, primaryKey));
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s)."
         "index(%s).cursor(%s).update(%s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBCursor.update()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBCursor.update()", mTransaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(objectStore),
         IDB_LOG_STRINGIFY(mSourceIndex), IDB_LOG_STRINGIFY(mDirection),
         IDB_LOG_STRINGIFY(objectStore, primaryKey));
   }
 
   return request.forget();
@@ -773,34 +760,30 @@ already_AddRefed<IDBRequest> IDBCursor::
       objectStore->DeleteInternal(aCx, key, /* aFromCursor */ true, aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
 
   request->SetSource(this);
 
   if (mType == Type_ObjectStore) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s)."
         "cursor(%s).delete(%s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBCursor.delete()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBCursor.delete()", mTransaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(objectStore),
         IDB_LOG_STRINGIFY(mDirection),
         IDB_LOG_STRINGIFY(objectStore, primaryKey));
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s)."
         "index(%s).cursor(%s).delete(%s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBCursor.delete()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBCursor.delete()", mTransaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(objectStore),
         IDB_LOG_STRINGIFY(mSourceIndex), IDB_LOG_STRINGIFY(mDirection),
         IDB_LOG_STRINGIFY(objectStore, primaryKey));
   }
 
   return request.forget();
--- a/dom/indexedDB/IDBDatabase.cpp
+++ b/dom/indexedDB/IDBDatabase.cpp
@@ -419,22 +419,19 @@ already_AddRefed<IDBObjectStore> IDBData
 
   RefPtr<IDBObjectStore> objectStore = transaction->CreateObjectStore(*newSpec);
   MOZ_ASSERT(objectStore);
 
   // Don't do this in the macro because we always need to increment the serial
   // number to keep in sync with the parent.
   const uint64_t requestSerialNumber = IDBRequest::NextSerialNumber();
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
       "database(%s).transaction(%s).createObjectStore(%s)",
-      "IndexedDB %s: C T[%lld] R[%llu]: "
-      "IDBDatabase.createObjectStore()",
-      IDB_LOG_ID_STRING(), transaction->LoggingSerialNumber(),
+      "IDBDatabase.createObjectStore()", transaction->LoggingSerialNumber(),
       requestSerialNumber, IDB_LOG_STRINGIFY(this),
       IDB_LOG_STRINGIFY(transaction), IDB_LOG_STRINGIFY(objectStore));
 
   return objectStore.forget();
 }
 
 void IDBDatabase::DeleteObjectStore(const nsAString& aName, ErrorResult& aRv) {
   AssertIsOnOwningThread();
@@ -477,22 +474,19 @@ void IDBDatabase::DeleteObjectStore(cons
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_FOUND_ERR);
     return;
   }
 
   // Don't do this in the macro because we always need to increment the serial
   // number to keep in sync with the parent.
   const uint64_t requestSerialNumber = IDBRequest::NextSerialNumber();
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
       "database(%s).transaction(%s).deleteObjectStore(\"%s\")",
-      "IndexedDB %s: C T[%lld] R[%llu]: "
-      "IDBDatabase.deleteObjectStore()",
-      IDB_LOG_ID_STRING(), transaction->LoggingSerialNumber(),
+      "IDBDatabase.deleteObjectStore()", transaction->LoggingSerialNumber(),
       requestSerialNumber, IDB_LOG_STRINGIFY(this),
       IDB_LOG_STRINGIFY(transaction), NS_ConvertUTF16toUTF8(aName).get());
 }
 
 already_AddRefed<IDBTransaction> IDBDatabase::Transaction(
     JSContext* aCx, const StringOrStringSequence& aStoreNames,
     IDBTransactionMode aMode, ErrorResult& aRv) {
   AssertIsOnOwningThread();
@@ -624,20 +618,18 @@ nsresult IDBDatabase::Transaction(JSCont
   if (NS_WARN_IF(!transaction)) {
     IDB_REPORT_INTERNAL_ERR();
     return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
   }
 
   BackgroundTransactionChild* actor =
       new BackgroundTransactionChild(transaction);
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld]: "
-      "database(%s).transaction(%s)",
-      "IndexedDB %s: C T[%lld]: IDBDatabase.transaction()", IDB_LOG_ID_STRING(),
+  IDB_LOG_MARK_CHILD_TRANSACTION(
+      "database(%s).transaction(%s)", "IDBDatabase.transaction()",
       transaction->LoggingSerialNumber(), IDB_LOG_STRINGIFY(this),
       IDB_LOG_STRINGIFY(transaction));
 
   MOZ_ALWAYS_TRUE(mBackgroundActor->SendPBackgroundIDBTransactionConstructor(
       actor, sortedStoreNames, mode));
   MOZ_ASSERT(actor->GetActorEventTarget(),
              "The event target shall be inherited from it manager actor.");
 
@@ -687,22 +679,20 @@ already_AddRefed<IDBRequest> IDBDatabase
   CreateFileParams params(nsString(aName), type);
 
   RefPtr<IDBRequest> request = IDBRequest::Create(aCx, this, nullptr);
   MOZ_ASSERT(request);
 
   BackgroundDatabaseRequestChild* actor =
       new BackgroundDatabaseRequestChild(this, request);
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Request[%llu]: "
-      "database(%s).createMutableFile(%s)",
-      "IndexedDB %s: C R[%llu]: IDBDatabase.createMutableFile()",
-      IDB_LOG_ID_STRING(), request->LoggingSerialNumber(),
-      IDB_LOG_STRINGIFY(this), NS_ConvertUTF16toUTF8(aName).get());
+  IDB_LOG_MARK_CHILD_REQUEST(
+      "database(%s).createMutableFile(%s)", "IDBDatabase.createMutableFile()",
+      request->LoggingSerialNumber(), IDB_LOG_STRINGIFY(this),
+      NS_ConvertUTF16toUTF8(aName).get());
 
   mBackgroundActor->SendPBackgroundIDBDatabaseRequestConstructor(actor, params);
 
   MOZ_ASSERT(actor->GetActorEventTarget(),
              "The event target shall be inherited from its manager actor.");
 
   return request.forget();
 }
--- a/dom/indexedDB/IDBFactory.cpp
+++ b/dom/indexedDB/IDBFactory.cpp
@@ -755,27 +755,22 @@ already_AddRefed<IDBOpenDBRequest> IDBFa
     MOZ_ASSERT(!NS_IsMainThread());
     aRv.ThrowUncatchableException();
     return nullptr;
   }
 
   MOZ_ASSERT(request);
 
   if (aDeleting) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Request[%llu]: "
-        "indexedDB.deleteDatabase(\"%s\")",
-        "IndexedDB %s: C R[%llu]: IDBFactory.deleteDatabase()",
-        IDB_LOG_ID_STRING(), request->LoggingSerialNumber(),
-        NS_ConvertUTF16toUTF8(aName).get());
+    IDB_LOG_MARK_CHILD_REQUEST(
+        "indexedDB.deleteDatabase(\"%s\")", "IDBFactory.deleteDatabase()",
+        request->LoggingSerialNumber(), NS_ConvertUTF16toUTF8(aName).get());
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Request[%llu]: "
-        "indexedDB.open(\"%s\", %s)",
-        "IndexedDB %s: C R[%llu]: IDBFactory.open()", IDB_LOG_ID_STRING(),
+    IDB_LOG_MARK_CHILD_REQUEST(
+        "indexedDB.open(\"%s\", %s)", "IDBFactory.open()",
         request->LoggingSerialNumber(), NS_ConvertUTF16toUTF8(aName).get(),
         IDB_LOG_STRINGIFY(aVersion));
   }
 
   nsresult rv = InitiateRequest(request, params);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     IDB_REPORT_INTERNAL_ERR();
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
--- a/dom/indexedDB/IDBIndex.cpp
+++ b/dom/indexedDB/IDBIndex.cpp
@@ -167,23 +167,21 @@ void IDBIndex::SetName(const nsAString& 
     aRv.Throw(rv);
     return;
   }
 
   // Don't do this in the macro because we always need to increment the serial
   // number to keep in sync with the parent.
   const uint64_t requestSerialNumber = IDBRequest::NextSerialNumber();
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
       "database(%s).transaction(%s).objectStore(%s).index(%s)."
       "rename(%s)",
-      "IndexedDB %s: C T[%lld] R[%llu]: IDBIndex.rename()", IDB_LOG_ID_STRING(),
-      transaction->LoggingSerialNumber(), requestSerialNumber,
-      IDB_LOG_STRINGIFY(transaction->Database()),
+      "IDBIndex.rename()", transaction->LoggingSerialNumber(),
+      requestSerialNumber, IDB_LOG_STRINGIFY(transaction->Database()),
       IDB_LOG_STRINGIFY(transaction), IDB_LOG_STRINGIFY(mObjectStore),
       loggingOldIndex.get(), IDB_LOG_STRINGIFY(this));
 
   transaction->RenameIndex(mObjectStore, indexId, aName);
 }
 
 bool IDBIndex::Unique() const {
   AssertIsOnOwningThread();
@@ -311,33 +309,30 @@ already_AddRefed<IDBRequest> IDBIndex::G
   } else {
     params = IndexGetParams(objectStoreId, indexId, serializedKeyRange);
   }
 
   RefPtr<IDBRequest> request = GenerateRequest(aCx, this);
   MOZ_ASSERT(request);
 
   if (aKeyOnly) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s).index(%s)."
         "getKey(%s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBIndex.getKey()",
-        IDB_LOG_ID_STRING(), transaction->LoggingSerialNumber(),
+        "IDBIndex.getKey()", transaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(transaction->Database()),
         IDB_LOG_STRINGIFY(transaction), IDB_LOG_STRINGIFY(mObjectStore),
         IDB_LOG_STRINGIFY(this), IDB_LOG_STRINGIFY(keyRange));
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s).index(%s)."
         "get(%s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBIndex.get()", IDB_LOG_ID_STRING(),
-        transaction->LoggingSerialNumber(), request->LoggingSerialNumber(),
+        "IDBIndex.get()", transaction->LoggingSerialNumber(),
+        request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(transaction->Database()),
         IDB_LOG_STRINGIFY(transaction), IDB_LOG_STRINGIFY(mObjectStore),
         IDB_LOG_STRINGIFY(this), IDB_LOG_STRINGIFY(keyRange));
   }
 
   transaction->StartRequest(request, params);
 
   return request.forget();
@@ -384,34 +379,30 @@ already_AddRefed<IDBRequest> IDBIndex::G
   } else {
     params = IndexGetAllParams(objectStoreId, indexId, optionalKeyRange, limit);
   }
 
   RefPtr<IDBRequest> request = GenerateRequest(aCx, this);
   MOZ_ASSERT(request);
 
   if (aKeysOnly) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s).index(%s)."
         "getAllKeys(%s, %s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBIndex.getAllKeys()",
-        IDB_LOG_ID_STRING(), transaction->LoggingSerialNumber(),
+        "IDBIndex.getAllKeys()", transaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(transaction->Database()),
         IDB_LOG_STRINGIFY(transaction), IDB_LOG_STRINGIFY(mObjectStore),
         IDB_LOG_STRINGIFY(this), IDB_LOG_STRINGIFY(keyRange),
         IDB_LOG_STRINGIFY(aLimit));
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s).index(%s)."
         "getAll(%s, %s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBIndex.getAll()",
-        IDB_LOG_ID_STRING(), transaction->LoggingSerialNumber(),
+        "IDBIndex.getAll()", transaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(transaction->Database()),
         IDB_LOG_STRINGIFY(transaction), IDB_LOG_STRINGIFY(mObjectStore),
         IDB_LOG_STRINGIFY(this), IDB_LOG_STRINGIFY(keyRange),
         IDB_LOG_STRINGIFY(aLimit));
   }
 
   transaction->StartRequest(request, params);
@@ -461,35 +452,30 @@ already_AddRefed<IDBRequest> IDBIndex::O
   const auto params =
       aKeysOnly ? OpenCursorParams{IndexOpenKeyCursorParams{commonIndexParams}}
                 : OpenCursorParams{IndexOpenCursorParams{commonIndexParams}};
 
   RefPtr<IDBRequest> request = GenerateRequest(aCx, this);
   MOZ_ASSERT(request);
 
   if (aKeysOnly) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s).index(%s)."
         "openKeyCursor(%s, %s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBIndex.openKeyCursor()",
-        IDB_LOG_ID_STRING(), transaction->LoggingSerialNumber(),
+        "IDBIndex.openKeyCursor()", transaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(transaction->Database()),
         IDB_LOG_STRINGIFY(transaction), IDB_LOG_STRINGIFY(mObjectStore),
         IDB_LOG_STRINGIFY(this), IDB_LOG_STRINGIFY(keyRange),
         IDB_LOG_STRINGIFY(direction));
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s).index(%s)."
         "openCursor(%s, %s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: "
-        "IDBObjectStore.openCursor()",
-        IDB_LOG_ID_STRING(), transaction->LoggingSerialNumber(),
+        "IDBObjectStore.openCursor()", transaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(transaction->Database()),
         IDB_LOG_STRINGIFY(transaction), IDB_LOG_STRINGIFY(mObjectStore),
         IDB_LOG_STRINGIFY(this), IDB_LOG_STRINGIFY(keyRange),
         IDB_LOG_STRINGIFY(direction));
   }
 
   BackgroundCursorChild* actor =
@@ -530,22 +516,20 @@ already_AddRefed<IDBRequest> IDBIndex::C
     SerializedKeyRange serializedKeyRange;
     keyRange->ToSerialized(serializedKeyRange);
     params.optionalKeyRange().emplace(serializedKeyRange);
   }
 
   RefPtr<IDBRequest> request = GenerateRequest(aCx, this);
   MOZ_ASSERT(request);
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
       "database(%s).transaction(%s).objectStore(%s).index(%s)."
       "count(%s)",
-      "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.count()",
-      IDB_LOG_ID_STRING(), transaction->LoggingSerialNumber(),
+      "IDBObjectStore.count()", transaction->LoggingSerialNumber(),
       request->LoggingSerialNumber(),
       IDB_LOG_STRINGIFY(transaction->Database()),
       IDB_LOG_STRINGIFY(transaction), IDB_LOG_STRINGIFY(mObjectStore),
       IDB_LOG_STRINGIFY(this), IDB_LOG_STRINGIFY(keyRange));
 
   transaction->StartRequest(request, params);
 
   return request.forget();
--- a/dom/indexedDB/IDBObjectStore.cpp
+++ b/dom/indexedDB/IDBObjectStore.cpp
@@ -1641,31 +1641,27 @@ already_AddRefed<IDBRequest> IDBObjectSt
     params = ObjectStoreAddParams(commonParams);
   }
 
   RefPtr<IDBRequest> request = GenerateRequest(aCx, this);
   MOZ_ASSERT(request);
 
   if (!aFromCursor) {
     if (aOverwrite) {
-      IDB_LOG_MARK(
-          "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+      IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
           "database(%s).transaction(%s).objectStore(%s).put(%s)",
-          "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.put()",
-          IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+          "IDBObjectStore.put()", mTransaction->LoggingSerialNumber(),
           request->LoggingSerialNumber(),
           IDB_LOG_STRINGIFY(mTransaction->Database()),
           IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this),
           IDB_LOG_STRINGIFY(key));
     } else {
-      IDB_LOG_MARK(
-          "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+      IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
           "database(%s).transaction(%s).objectStore(%s).add(%s)",
-          "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.add()",
-          IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+          "IDBObjectStore.add()", mTransaction->LoggingSerialNumber(),
           request->LoggingSerialNumber(),
           IDB_LOG_STRINGIFY(mTransaction->Database()),
           IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this),
           IDB_LOG_STRINGIFY(key));
     }
   }
 
   mTransaction->StartRequest(request, params);
@@ -1711,33 +1707,29 @@ already_AddRefed<IDBRequest> IDBObjectSt
   } else {
     params = ObjectStoreGetAllParams(id, optionalKeyRange, limit);
   }
 
   RefPtr<IDBRequest> request = GenerateRequest(aCx, this);
   MOZ_ASSERT(request);
 
   if (aKeysOnly) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s)."
         "getAllKeys(%s, %s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.getAllKeys()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBObjectStore.getAllKeys()", mTransaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this),
         IDB_LOG_STRINGIFY(keyRange), IDB_LOG_STRINGIFY(aLimit));
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s)."
         "getAll(%s, %s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.getAll()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBObjectStore.getAll()", mTransaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this),
         IDB_LOG_STRINGIFY(keyRange), IDB_LOG_STRINGIFY(aLimit));
   }
 
   mTransaction->StartRequest(request, params);
 
@@ -1764,21 +1756,19 @@ already_AddRefed<IDBRequest> IDBObjectSt
   }
 
   ObjectStoreClearParams params;
   params.objectStoreId() = Id();
 
   RefPtr<IDBRequest> request = GenerateRequest(aCx, this);
   MOZ_ASSERT(request);
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
       "database(%s).transaction(%s).objectStore(%s).clear()",
-      "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.clear()",
-      IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+      "IDBObjectStore.clear()", mTransaction->LoggingSerialNumber(),
       request->LoggingSerialNumber(),
       IDB_LOG_STRINGIFY(mTransaction->Database()),
       IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this));
 
   mTransaction->StartRequest(request, params);
 
   return request.forget();
 }
@@ -1957,21 +1947,19 @@ already_AddRefed<IDBRequest> IDBObjectSt
     params = ObjectStoreGetKeyParams(id, serializedKeyRange);
   } else {
     params = ObjectStoreGetParams(id, serializedKeyRange);
   }
 
   RefPtr<IDBRequest> request = GenerateRequest(aCx, this);
   MOZ_ASSERT(request);
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
       "database(%s).transaction(%s).objectStore(%s).get(%s)",
-      "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.get()",
-      IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+      "IDBObjectStore.get()", mTransaction->LoggingSerialNumber(),
       request->LoggingSerialNumber(),
       IDB_LOG_STRINGIFY(mTransaction->Database()),
       IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this),
       IDB_LOG_STRINGIFY(keyRange));
 
   mTransaction->StartRequest(request, params);
 
   return request.forget();
@@ -2012,21 +2000,19 @@ already_AddRefed<IDBRequest> IDBObjectSt
   ObjectStoreDeleteParams params;
   params.objectStoreId() = Id();
   keyRange->ToSerialized(params.keyRange());
 
   RefPtr<IDBRequest> request = GenerateRequest(aCx, this);
   MOZ_ASSERT(request);
 
   if (!aFromCursor) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s).delete(%s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.delete()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        " IDBObjectStore.delete()", mTransaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this),
         IDB_LOG_STRINGIFY(keyRange));
   }
 
   mTransaction->StartRequest(request, params);
 
@@ -2120,21 +2106,19 @@ already_AddRefed<IDBIndex> IDBObjectStor
   MOZ_ASSERT(index);
 
   mIndexes.AppendElement(index);
 
   // Don't do this in the macro because we always need to increment the serial
   // number to keep in sync with the parent.
   const uint64_t requestSerialNumber = IDBRequest::NextSerialNumber();
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
       "database(%s).transaction(%s).objectStore(%s).createIndex(%s)",
-      "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.createIndex()",
-      IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+      "IDBObjectStore.createIndex()", mTransaction->LoggingSerialNumber(),
       requestSerialNumber, IDB_LOG_STRINGIFY(mTransaction->Database()),
       IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this),
       IDB_LOG_STRINGIFY(index));
 
   return index.forget();
 }
 
 void IDBObjectStore::DeleteIndex(const nsAString& aName, ErrorResult& aRv) {
@@ -2191,22 +2175,20 @@ void IDBObjectStore::DeleteIndex(const n
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_FOUND_ERR);
     return;
   }
 
   // Don't do this in the macro because we always need to increment the serial
   // number to keep in sync with the parent.
   const uint64_t requestSerialNumber = IDBRequest::NextSerialNumber();
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
       "database(%s).transaction(%s).objectStore(%s)."
       "deleteIndex(\"%s\")",
-      "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.deleteIndex()",
-      IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+      "IDBObjectStore.deleteIndex()", mTransaction->LoggingSerialNumber(),
       requestSerialNumber, IDB_LOG_STRINGIFY(mTransaction->Database()),
       IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this),
       NS_ConvertUTF16toUTF8(aName).get());
 
   transaction->DeleteIndex(this, foundId);
 }
 
 already_AddRefed<IDBRequest> IDBObjectStore::Count(JSContext* aCx,
@@ -2237,21 +2219,19 @@ already_AddRefed<IDBRequest> IDBObjectSt
     SerializedKeyRange serializedKeyRange;
     keyRange->ToSerialized(serializedKeyRange);
     params.optionalKeyRange().emplace(serializedKeyRange);
   }
 
   RefPtr<IDBRequest> request = GenerateRequest(aCx, this);
   MOZ_ASSERT(request);
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
       "database(%s).transaction(%s).objectStore(%s).count(%s)",
-      "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.count()",
-      IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+      "IDBObjectStore.count()", mTransaction->LoggingSerialNumber(),
       request->LoggingSerialNumber(),
       IDB_LOG_STRINGIFY(mTransaction->Database()),
       IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this),
       IDB_LOG_STRINGIFY(keyRange));
 
   mTransaction->StartRequest(request, params);
 
   return request.forget();
@@ -2300,34 +2280,29 @@ already_AddRefed<IDBRequest> IDBObjectSt
   const auto params =
       aKeysOnly ? OpenCursorParams{ObjectStoreOpenKeyCursorParams{commonParams}}
                 : OpenCursorParams{ObjectStoreOpenCursorParams{commonParams}};
 
   RefPtr<IDBRequest> request = GenerateRequest(aCx, this);
   MOZ_ASSERT(request);
 
   if (aKeysOnly) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s)."
         "openKeyCursor(%s, %s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: "
-        "IDBObjectStore.openKeyCursor()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBObjectStore.openKeyCursor()", mTransaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this),
         IDB_LOG_STRINGIFY(keyRange), IDB_LOG_STRINGIFY(direction));
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+    IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
         "database(%s).transaction(%s).objectStore(%s)."
         "openCursor(%s, %s)",
-        "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.openCursor()",
-        IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+        "IDBObjectStore.openCursor()", mTransaction->LoggingSerialNumber(),
         request->LoggingSerialNumber(),
         IDB_LOG_STRINGIFY(mTransaction->Database()),
         IDB_LOG_STRINGIFY(mTransaction), IDB_LOG_STRINGIFY(this),
         IDB_LOG_STRINGIFY(keyRange), IDB_LOG_STRINGIFY(direction));
   }
 
   BackgroundCursorChild* actor =
       new BackgroundCursorChild(request, this, direction);
@@ -2447,21 +2422,19 @@ void IDBObjectStore::SetName(const nsASt
     aRv.Throw(rv);
     return;
   }
 
   // Don't do this in the macro because we always need to increment the serial
   // number to keep in sync with the parent.
   const uint64_t requestSerialNumber = IDBRequest::NextSerialNumber();
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
       "database(%s).transaction(%s).objectStore(%s).rename(%s)",
-      "IndexedDB %s: C T[%lld] R[%llu]: IDBObjectStore.rename()",
-      IDB_LOG_ID_STRING(), mTransaction->LoggingSerialNumber(),
+      "IDBObjectStore.rename()", mTransaction->LoggingSerialNumber(),
       requestSerialNumber, IDB_LOG_STRINGIFY(mTransaction->Database()),
       IDB_LOG_STRINGIFY(mTransaction), loggingOldObjectStore.get(),
       IDB_LOG_STRINGIFY(this));
 
   transaction->RenameObjectStore(mSpec->metadata().id(), aName);
 }
 
 bool IDBObjectStore::AutoIncrement() const {
--- a/dom/indexedDB/IDBTransaction.cpp
+++ b/dom/indexedDB/IDBTransaction.cpp
@@ -355,41 +355,37 @@ void IDBTransaction::OnRequestFinished(b
       }
     } else {
       // Don't try to send any more messages to the parent if the request actor
       // was killed.
 #ifdef DEBUG
       MOZ_ASSERT(!mSentCommitOrAbort);
       mSentCommitOrAbort = true;
 #endif
-      IDB_LOG_MARK(
-          "IndexedDB %s: Child  Transaction[%lld]: "
+      IDB_LOG_MARK_CHILD_TRANSACTION(
           "Request actor was killed, transaction will be aborted",
-          "IndexedDB %s: C T[%lld]: IDBTransaction abort", IDB_LOG_ID_STRING(),
-          LoggingSerialNumber());
+          "IDBTransaction abort", LoggingSerialNumber());
     }
   }
 }
 
 void IDBTransaction::SendCommit() {
   AssertIsOnOwningThread();
   MOZ_ASSERT(NS_SUCCEEDED(mAbortCode));
   MOZ_ASSERT(IsCommittingOrDone());
   MOZ_ASSERT(!mSentCommitOrAbort);
   MOZ_ASSERT(!mPendingRequestCount);
 
   // Don't do this in the macro because we always need to increment the serial
   // number to keep in sync with the parent.
   const uint64_t requestSerialNumber = IDBRequest::NextSerialNumber();
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
-      "All requests complete, committing transaction",
-      "IndexedDB %s: C T[%lld] R[%llu]: IDBTransaction commit",
-      IDB_LOG_ID_STRING(), LoggingSerialNumber(), requestSerialNumber);
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
+      "All requests complete, committing transaction", "IDBTransaction commit",
+      LoggingSerialNumber(), requestSerialNumber);
 
   if (mMode == VERSION_CHANGE) {
     MOZ_ASSERT(mBackgroundActor.mVersionChangeBackgroundActor);
     mBackgroundActor.mVersionChangeBackgroundActor->SendCommit();
   } else {
     MOZ_ASSERT(mBackgroundActor.mNormalBackgroundActor);
     mBackgroundActor.mNormalBackgroundActor->SendCommit();
   }
@@ -404,22 +400,19 @@ void IDBTransaction::SendAbort(nsresult 
   MOZ_ASSERT(NS_FAILED(aResultCode));
   MOZ_ASSERT(IsCommittingOrDone());
   MOZ_ASSERT(!mSentCommitOrAbort);
 
   // Don't do this in the macro because we always need to increment the serial
   // number to keep in sync with the parent.
   const uint64_t requestSerialNumber = IDBRequest::NextSerialNumber();
 
-  IDB_LOG_MARK(
-      "IndexedDB %s: Child  Transaction[%lld] Request[%llu]: "
-      "Aborting transaction with result 0x%x",
-      "IndexedDB %s: C T[%lld] R[%llu]: IDBTransaction abort (0x%x)",
-      IDB_LOG_ID_STRING(), LoggingSerialNumber(), requestSerialNumber,
-      aResultCode);
+  IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(
+      "Aborting transaction with result 0x%x", "IDBTransaction abort (0x%x)",
+      LoggingSerialNumber(), requestSerialNumber, aResultCode);
 
   if (mMode == VERSION_CHANGE) {
     MOZ_ASSERT(mBackgroundActor.mVersionChangeBackgroundActor);
     mBackgroundActor.mVersionChangeBackgroundActor->SendAbort(aResultCode);
   } else {
     MOZ_ASSERT(mBackgroundActor.mNormalBackgroundActor);
     mBackgroundActor.mNormalBackgroundActor->SendAbort(aResultCode);
   }
@@ -759,27 +752,23 @@ void IDBTransaction::FireCompleteOrAbort
     MOZ_ASSERT(event);
 
     if (NS_SUCCEEDED(mAbortCode)) {
       mAbortCode = aResult;
     }
   }
 
   if (NS_SUCCEEDED(mAbortCode)) {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld]: "
-        "Firing 'complete' event",
-        "IndexedDB %s: C T[%lld]: IDBTransaction 'complete' event",
-        IDB_LOG_ID_STRING(), mLoggingSerialNumber);
+    IDB_LOG_MARK_CHILD_TRANSACTION("Firing 'complete' event",
+                                   "IDBTransaction 'complete' event",
+                                   mLoggingSerialNumber);
   } else {
-    IDB_LOG_MARK(
-        "IndexedDB %s: Child  Transaction[%lld]: "
-        "Firing 'abort' event with error 0x%x",
-        "IndexedDB %s: C T[%lld]: IDBTransaction 'abort' event (0x%x)",
-        IDB_LOG_ID_STRING(), mLoggingSerialNumber, mAbortCode);
+    IDB_LOG_MARK_CHILD_TRANSACTION("Firing 'abort' event with error 0x%x",
+                                   "IDBTransaction 'abort' event (0x%x)",
+                                   mLoggingSerialNumber, mAbortCode);
   }
 
   IgnoredErrorResult rv;
   DispatchEvent(*event, rv);
   if (rv.Failed()) {
     NS_WARNING("DispatchEvent failed!");
   }
 
--- a/dom/indexedDB/ProfilerHelpers.h
+++ b/dom/indexedDB/ProfilerHelpers.h
@@ -285,17 +285,17 @@ inline void MOZ_FORMAT_PRINTF(2, 3)
     }
   }
 }
 
 }  // namespace indexedDB
 }  // namespace dom
 }  // namespace mozilla
 
-#define IDB_LOG_MARK(_detailedFmt, _conciseFmt, ...)                           \
+#define IDB_LOG_MARK2(_detailedFmt, _conciseFmt, ...)                          \
   do {                                                                         \
     using namespace mozilla::dom::indexedDB;                                   \
                                                                                \
     const IndexedDatabaseManager::LoggingMode mode =                           \
         IndexedDatabaseManager::GetLoggingMode();                              \
                                                                                \
     if (mode != IndexedDatabaseManager::Logging_Disabled) {                    \
       const char* _fmt;                                                        \
@@ -312,15 +312,89 @@ inline void MOZ_FORMAT_PRINTF(2, 3)
       const bool _useProfiler =                                                \
           mode == IndexedDatabaseManager::Logging_ConciseProfilerMarks ||      \
           mode == IndexedDatabaseManager::Logging_DetailedProfilerMarks;       \
                                                                                \
       LoggingHelper(_useProfiler, _fmt, ##__VA_ARGS__);                        \
     }                                                                          \
   } while (0)
 
+#define IDB_LOG_MARK(_detailedFmt, _conciseFmt, _loggingId, ...)             \
+  IDB_LOG_MARK2("IndexedDB %s: " _detailedFmt, "IndexedDB %s: " _conciseFmt, \
+                _loggingId, ##__VA_ARGS__)
+
 #define IDB_LOG_ID_STRING(...) \
   mozilla::dom::indexedDB::LoggingIdString(__VA_ARGS__).get()
 
 #define IDB_LOG_STRINGIFY(...) \
   mozilla::dom::indexedDB::LoggingString(__VA_ARGS__).get()
 
+// IDB_LOG_MARK_DETAILED_PARENT and IDB_LOG_MARK_DETAILED_CHILD should have the
+// same width.
+#define IDB_LOG_MARK_DETAILED_PARENT "Parent"
+#define IDB_LOG_MARK_DETAILED_CHILD "Child "
+
+#define IDB_LOG_MARK_CONCISE_PARENT "P"
+#define IDB_LOG_MARK_CONCISE_CHILD "C"
+
+#define IDB_LOG_MARK_DETAILED_TRANSACTION "Transaction[%lld]"
+#define IDB_LOG_MARK_DETAILED_REQUEST "Request[%llu]"
+
+#define IDB_LOG_MARK_CONCISE_TRANSACTION "T[%lld]"
+#define IDB_LOG_MARK_CONCISE_REQUEST "R[%llu]"
+
+#define IDB_LOG_MARK_TRANSACTION_REQUEST(                                      \
+    _detailedPeer, _concisePeer, _detailedFmt, _conciseFmt, _loggingId,        \
+    _transactionSerialNumber, _requestSerialNumber, ...)                       \
+  IDB_LOG_MARK(_detailedPeer " " IDB_LOG_MARK_DETAILED_TRANSACTION             \
+                             " " IDB_LOG_MARK_DETAILED_REQUEST                 \
+                             ": " _detailedFmt,                                \
+               _concisePeer " " IDB_LOG_MARK_CONCISE_TRANSACTION               \
+                            " " IDB_LOG_MARK_CONCISE_REQUEST ": " _conciseFmt, \
+               _loggingId, _transactionSerialNumber, _requestSerialNumber,     \
+               ##__VA_ARGS__)
+
+#define IDB_LOG_MARK_PARENT_TRANSACTION_REQUEST(                               \
+    _detailedFmt, _conciseFmt, _loggingId, _transactionSerialNumber,           \
+    _requestSerialNumber, ...)                                                 \
+  IDB_LOG_MARK_TRANSACTION_REQUEST(                                            \
+      IDB_LOG_MARK_DETAILED_PARENT, IDB_LOG_MARK_CONCISE_PARENT, _detailedFmt, \
+      _conciseFmt, _loggingId, _transactionSerialNumber, _requestSerialNumber, \
+      ##__VA_ARGS__)
+
+#define IDB_LOG_MARK_CHILD_TRANSACTION_REQUEST(_detailedFmt, _conciseFmt,    \
+                                               _transactionSerialNumber,     \
+                                               _requestSerialNumber, ...)    \
+  IDB_LOG_MARK_TRANSACTION_REQUEST(                                          \
+      IDB_LOG_MARK_DETAILED_CHILD, IDB_LOG_MARK_CONCISE_CHILD, _detailedFmt, \
+      _conciseFmt, IDB_LOG_ID_STRING(), _transactionSerialNumber,            \
+      _requestSerialNumber, ##__VA_ARGS__)
+
+#define IDB_LOG_MARK_CHILD_REQUEST(_detailedFmt, _conciseFmt,                \
+                                   _requestSerialNumber, ...)                \
+  IDB_LOG_MARK(IDB_LOG_MARK_DETAILED_CHILD " " IDB_LOG_MARK_DETAILED_REQUEST \
+                                           ": " _detailedFmt,                \
+               IDB_LOG_MARK_CONCISE_CHILD " " IDB_LOG_MARK_CONCISE_REQUEST   \
+                                          ": " _conciseFmt,                  \
+               IDB_LOG_ID_STRING(), _requestSerialNumber, ##__VA_ARGS__)
+
+#define IDB_LOG_MARK_TRANSACTION(_detailedPeer, _concisePeer, _detailedFmt,  \
+                                 _conciseFmt, _loggingId,                    \
+                                 _transactionSerialNumber, ...)              \
+  IDB_LOG_MARK(                                                              \
+      _detailedPeer " " IDB_LOG_MARK_DETAILED_TRANSACTION ": " _detailedFmt, \
+      _concisePeer " " IDB_LOG_MARK_CONCISE_TRANSACTION ": " _conciseFmt,    \
+      _loggingId, _transactionSerialNumber, ##__VA_ARGS__)
+
+#define IDB_LOG_MARK_PARENT_TRANSACTION(_detailedFmt, _conciseFmt, _loggingId, \
+                                        _transactionSerialNumber, ...)         \
+  IDB_LOG_MARK_TRANSACTION(                                                    \
+      IDB_LOG_MARK_DETAILED_PARENT, IDB_LOG_MARK_CONCISE_PARENT, _detailedFmt, \
+      _conciseFmt, _loggingId, _transactionSerialNumber, ##__VA_ARGS__)
+
+#define IDB_LOG_MARK_CHILD_TRANSACTION(_detailedFmt, _conciseFmt,     \
+                                       _transactionSerialNumber, ...) \
+  IDB_LOG_MARK_TRANSACTION(IDB_LOG_MARK_DETAILED_CHILD,               \
+                           IDB_LOG_MARK_CONCISE_CHILD, _detailedFmt,  \
+                           _conciseFmt, IDB_LOG_ID_STRING(),          \
+                           _transactionSerialNumber, ##__VA_ARGS__)
+
 #endif  // mozilla_dom_indexeddb_profilerhelpers_h__