WebKit Bugzilla
Attachment 361562 Details for
Bug 194464
: GCHeapInspector: Show the retained sizes in more places
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Proposed Fix
retained-size-1.patch (text/plain), 4.05 KB, created by
Joseph Pecoraro
on 2019-02-08 16:37:28 PST
(
hide
)
Description:
[PATCH] Proposed Fix
Filename:
MIME Type:
Creator:
Joseph Pecoraro
Created:
2019-02-08 16:37:28 PST
Size:
4.05 KB
patch
obsolete
>diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 274d3391091..e068f6b5545 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,18 @@ >+2019-02-08 Joseph Pecoraro <pecoraro@apple.com> >+ >+ GCHeapInspector: Show the retained sizes in more places >+ https://bugs.webkit.org/show_bug.cgi?id=194464 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * GCHeapInspector/gc-heap-inspector.html: >+ * GCHeapInspector/script/interface.js: >+ (HeapInspectorUtils.humanReadableSize): >+ (HeapInspectorUtils.spanForNode.let.nodeHTML.node.className.span): >+ (HeapInspectorUtils.spanForNode.span.span): >+ (HeapSnapshotInspector.prototype.buildAllObjectsByType): >+ (HeapSnapshotInspector.prototype.buildRoots): >+ > 2019-02-06 Keith Rollin <krollin@apple.com> > > Really enable the automatic checking and regenerations of .xcfilelists during builds >diff --git a/Tools/GCHeapInspector/gc-heap-inspector.html b/Tools/GCHeapInspector/gc-heap-inspector.html >index f1dbda9126e..6f5bcb3c238 100644 >--- a/Tools/GCHeapInspector/gc-heap-inspector.html >+++ b/Tools/GCHeapInspector/gc-heap-inspector.html >@@ -66,8 +66,9 @@ > color: gray; > } > >- .node-size { >- display: none; >+ .retained-size { >+ font-family: monospace; >+ color: rgb(25, 88, 180); > } > > .node-gc-root { >diff --git a/Tools/GCHeapInspector/script/interface.js b/Tools/GCHeapInspector/script/interface.js >index ae3ad5b00b2..8ab0fff8d49 100644 >--- a/Tools/GCHeapInspector/script/interface.js >+++ b/Tools/GCHeapInspector/script/interface.js >@@ -37,8 +37,8 @@ class HeapInspectorUtils > { > var i = -1; > if (sizeInBytes < 512) >- return sizeInBytes + ' B'; >- var byteUnits = [' KB', ' MB', ' GB']; >+ return sizeInBytes + 'B'; >+ var byteUnits = ['KB', 'MB', 'GB']; > do { > sizeInBytes = sizeInBytes / 1024; > i++; >@@ -75,7 +75,7 @@ class HeapInspectorUtils > > let wrappedAddressString = node.wrappedAddress ? `wrapped ${node.wrappedAddress}` : ''; > >- let nodeHTML = node.className + ` <span class="node-id">${node.id}</span> <span class="node-address">cell ${node.address} ${wrappedAddressString}</span> <span class="node-size">(retains ${HeapInspectorUtils.humanReadableSize(node.retainedSize)})</span>`; >+ let nodeHTML = node.className + ` <span class="node-id">${node.id}</span> <span class="node-address">cell ${node.address} ${wrappedAddressString}</span> <span class="node-size retained-size">(retains ${HeapInspectorUtils.humanReadableSize(node.retainedSize)})</span>`; > > if (node.label.length) > nodeHTML += ` <span class="node-label">â${node.label}â</span>`; >@@ -273,6 +273,11 @@ class HeapSnapshotInspector > > let details = DOMUtils.createDetails(`${category.className} (${category.count})`); > >+ let summaryElement = details.firstChild; >+ let sizeElement = summaryElement.appendChild(document.createElement('span')); >+ sizeElement.className = 'retained-size'; >+ sizeElement.textContent = ' ' + HeapInspectorUtils.humanReadableSize(category.retainedSize); >+ > let instanceListElement = document.createElement('ul'); > instanceListElement.className = 'instance-list'; > >@@ -314,6 +319,13 @@ class HeapSnapshotInspector > }) > > let details = DOMUtils.createDetails(`${rootClassName} (${rootsOfType.length})`); >+ >+ let summaryElement = details.firstChild; >+ let retainedSize = rootsOfType.reduce((accumulator, node) => accumulator + node.retainedSize, 0); >+ let sizeElement = summaryElement.appendChild(document.createElement('span')); >+ sizeElement.className = 'retained-size'; >+ sizeElement.textContent = ' ' + HeapInspectorUtils.humanReadableSize(retainedSize); >+ > let rootsTypeList = document.createElement('ul') > rootsTypeList.className = 'instance-list'; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194464
:
361560
| 361562