Title: [235393] trunk/Source/WebCore
Revision
235393
Author
[email protected]
Date
2018-08-27 13:31:58 -0700 (Mon, 27 Aug 2018)

Log Message

Improve the showAllDocuments logging
https://bugs.webkit.org/show_bug.cgi?id=188990

Reviewed by Tim Horton.

Improve the output triggered by "notifyutil -p com.apple.WebKit.showAllDocuments" to denote
SVG documents (which often have no URL), and to show the refCount and referencingNodeCount,
which helps with leak debugging.

Sample output:

2 live documents:
Document 0x1236f1200 3 (refCount 6, referencingNodeCount 580) https://webkit.org/
SVGDocument 0x134b60000 13 (refCount 1, referencingNodeCount 197)

* page/mac/PageMac.mm:
(WebCore::Page::platformInitialize):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (235392 => 235393)


--- trunk/Source/WebCore/ChangeLog	2018-08-27 20:14:21 UTC (rev 235392)
+++ trunk/Source/WebCore/ChangeLog	2018-08-27 20:31:58 UTC (rev 235393)
@@ -1,3 +1,23 @@
+2018-08-27  Simon Fraser  <[email protected]>
+
+        Improve the showAllDocuments logging
+        https://bugs.webkit.org/show_bug.cgi?id=188990
+
+        Reviewed by Tim Horton.
+        
+        Improve the output triggered by "notifyutil -p com.apple.WebKit.showAllDocuments" to denote
+        SVG documents (which often have no URL), and to show the refCount and referencingNodeCount,
+        which helps with leak debugging.
+        
+        Sample output:
+
+        2 live documents:
+        Document 0x1236f1200 3 (refCount 6, referencingNodeCount 580) https://webkit.org/
+        SVGDocument 0x134b60000 13 (refCount 1, referencingNodeCount 197) 
+
+        * page/mac/PageMac.mm:
+        (WebCore::Page::platformInitialize):
+
 2018-08-27  Wenson Hsieh  <[email protected]>
 
         [Cocoa] Exception (fileType 'dyn.agq8u' is not a valid UTI) raised when dragging an attachment whose file wrapper is a directory

Modified: trunk/Source/WebCore/page/mac/PageMac.mm (235392 => 235393)


--- trunk/Source/WebCore/page/mac/PageMac.mm	2018-08-27 20:14:21 UTC (rev 235392)
+++ trunk/Source/WebCore/page/mac/PageMac.mm	2018-08-27 20:31:58 UTC (rev 235393)
@@ -36,6 +36,7 @@
 #import "LayoutTreeBuilder.h"
 #import "Logging.h"
 #import "RenderObject.h"
+#import "SVGDocument.h"
 #import <pal/Logging.h>
 
 #if PLATFORM(IOS)
@@ -77,7 +78,8 @@
 
             WTFLogAlways("%u live documents:", Document::allDocuments().size());
             for (const auto* document : Document::allDocuments()) {
-                WTFLogAlways("Document %p %s", document, document->url().string().utf8().data());
+                const char* documentType = is<SVGDocument>(document) ? "SVGDocument" : "Document";
+                WTFLogAlways("%s %p %llu (refCount %d, referencingNodeCount %d) %s", documentType, document, document->identifier().toUInt64(), document->refCount(), document->referencingNodeCount(), document->url().string().utf8().data());
             }
         });
     });
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to