Enhance some of the logging statements just added for IndexedDB Operation scheduling.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Dec 2016 23:42:54 +0000 (23:42 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Dec 2016 23:42:54 +0000 (23:42 +0000)
Rubberstamped by Tim Horton.

No new tests (No behavior change).

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::iterateCursor):
(WebCore::IDBTransaction::requestGetRecord):
(WebCore::IDBTransaction::requestIndexRecord):
(WebCore::IDBTransaction::requestPutOrAdd):

* Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::loggingString):

* Modules/indexeddb/shared/IDBIterateCursorData.cpp:
(WebCore::IDBIterateCursorData::loggingString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@209881 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp
Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp

index 6c2249d..a9bc3b3 100644 (file)
@@ -1,3 +1,23 @@
+2016-12-15  Brady Eidson  <beidson@apple.com>
+
+        Enhance some of the logging statements just added for IndexedDB Operation scheduling.
+
+        Rubberstamped by Tim Horton.
+
+        No new tests (No behavior change).
+
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::iterateCursor):
+        (WebCore::IDBTransaction::requestGetRecord):
+        (WebCore::IDBTransaction::requestIndexRecord):
+        (WebCore::IDBTransaction::requestPutOrAdd):
+        
+        * Modules/indexeddb/shared/IDBCursorInfo.cpp:
+        (WebCore::IDBCursorInfo::loggingString):
+        
+        * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
+        (WebCore::IDBIterateCursorData::loggingString):
+
 2016-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
 
         [Cocoa] Implement font-synthesis: small-caps
index f9aa03b..1ee73d2 100644 (file)
@@ -864,7 +864,7 @@ void IDBTransaction::iterateCursor(IDBCursor& cursor, const IDBIterateCursorData
 
     addRequest(*cursor.request());
 
-    LOG(IndexedDBOperations, "IDB iterate cursor operation: %s", data.loggingString().utf8().data());
+    LOG(IndexedDBOperations, "IDB iterate cursor operation: %s %s", cursor.info().loggingString().utf8().data(), data.loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, *cursor.request(), &IDBTransaction::didIterateCursorOnServer, &IDBTransaction::iterateCursorOnServer, data));
 }
 
@@ -970,7 +970,7 @@ Ref<IDBRequest> IDBTransaction::requestGetRecord(ExecState& state, IDBObjectStor
     auto request = IDBRequest::createObjectStoreGet(*scriptExecutionContext(), objectStore, type, *this);
     addRequest(request.get());
 
-    LOG(IndexedDBOperations, "IDB get record operation: %s", getRecordData.loggingString().utf8().data());
+    LOG(IndexedDBOperations, "IDB get record operation: %s %s", objectStore.info().condensedLoggingString().utf8().data(), getRecordData.loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetRecordOnServer, &IDBTransaction::getRecordOnServer, getRecordData));
 
     return request;
@@ -1006,7 +1006,7 @@ Ref<IDBRequest> IDBTransaction::requestIndexRecord(ExecState& state, IDBIndex& i
 
     IDBGetRecordData getRecordData = { range, IDBGetRecordDataType::KeyAndValue };
 
-    LOG(IndexedDBOperations, "IDB get index record operation: %s", getRecordData.loggingString().utf8().data());
+    LOG(IndexedDBOperations, "IDB get index record operation: %s %s", index.info().condensedLoggingString().utf8().data(), getRecordData.loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetRecordOnServer, &IDBTransaction::getRecordOnServer, getRecordData));
 
     return request;
@@ -1189,7 +1189,7 @@ Ref<IDBRequest> IDBTransaction::requestPutOrAdd(ExecState& state, IDBObjectStore
     auto request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
     addRequest(request.get());
 
-    LOG(IndexedDBOperations, "IDB putOrAdd operation: %s", key ? key->loggingString().utf8().data() : "<null key>");
+    LOG(IndexedDBOperations, "IDB putOrAdd operation: %s key: %s", objectStore.info().condensedLoggingString().utf8().data(), key ? key->loggingString().utf8().data() : "<null key>");
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didPutOrAddOnServer, &IDBTransaction::putOrAddOnServer, key, &value, overwriteMode));
 
     return request;
index a2457db..35a1f69 100644 (file)
@@ -103,9 +103,9 @@ IDBCursorInfo IDBCursorInfo::isolatedCopy() const
 String IDBCursorInfo::loggingString() const
 {
     if (m_source == IndexedDB::CursorSource::Index)
-        return String::format("<Crsr: Idx %" PRIu64 ", OS %" PRIu64 ", tx %s>", m_sourceIdentifier, m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data());
+        return String::format("<Crsr: %s Idx %" PRIu64 ", OS %" PRIu64 ", tx %s>", m_cursorIdentifier.loggingString().utf8().data(), m_sourceIdentifier, m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data());
 
-    return String::format("<Crsr: OS %" PRIu64 ", tx %s>", m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data());
+    return String::format("<Crsr: %s OS %" PRIu64 ", tx %s>", m_cursorIdentifier.loggingString().utf8().data(), m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data());
 }
 #endif
 
index 76c4d4d..faaeda9 100644 (file)
@@ -38,7 +38,7 @@ IDBIterateCursorData IDBIterateCursorData::isolatedCopy() const
 #if !LOG_DISABLED
 String IDBIterateCursorData::loggingString() const
 {
-    return String::format("<Itr8Crsr: key %s, primaryKey %s, count %u", keyData.loggingString().utf8().data(), primaryKeyData.loggingString().utf8().data(), count);
+    return String::format("<Itr8Crsr: key %s, primaryKey %s, count %u>", keyData.loggingString().utf8().data(), primaryKeyData.loggingString().utf8().data(), count);
 }
 #endif