WebKit Bugzilla
Attachment 346748 Details for
Bug 188395
: ResourceUsageOverlay should use physical footprint for its "Footprint" label
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
c-backup.diff (text/plain), 2.21 KB, created by
Saam Barati
on 2018-08-07 18:10:31 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Saam Barati
Created:
2018-08-07 18:10:31 PDT
Size:
2.21 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 234680) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2018-08-07 Saam Barati <sbarati@apple.com> >+ >+ ResourceUsageOverlay should use physical footprint for its "Footprint" label >+ https://bugs.webkit.org/show_bug.cgi?id=188395 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Let's use physical footprint on Cocoa for the number we say is "footprint". >+ Before, we were just using the number of dirty pages multiplies by >+ page size. This number was an upper bound on footprint since it >+ doesn't take into account compressed memory. >+ >+ * page/cocoa/ResourceUsageOverlayCocoa.mm: >+ (WebCore::ResourceUsageOverlay::platformDraw): >+ > 2018-08-07 Ryosuke Niwa <rniwa@webkit.org> > > document.open and document.write must throw while the HTML parser is synchronously constructing a custom element >Index: Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm >=================================================================== >--- Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm (revision 234680) >+++ Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm (working copy) >@@ -39,6 +39,7 @@ > #include <QuartzCore/CATransaction.h> > #include <wtf/MainThread.h> > #include <wtf/MathExtras.h> >+#include <wtf/MemoryFootprint.h> > #include <wtf/NeverDestroyed.h> > > using WebCore::ResourceUsageOverlay; >@@ -457,7 +458,10 @@ void ResourceUsageOverlay::platformDraw( > > static CGColorRef colorForLabels = createColor(0.9, 0.9, 0.9, 1); > showText(context, 10, 20, colorForLabels, String::format(" CPU: %g", data.cpu.last())); >- showText(context, 10, 30, colorForLabels, " Footprint: " + formatByteNumber(data.totalDirtySize.last())); >+ if (auto footprint = memoryFootprint()) >+ showText(context, 10, 30, colorForLabels, " Footprint: " + formatByteNumber(*footprint)); >+ else >+ showText(context, 10, 30, colorForLabels, " Footprint: " + formatByteNumber(data.totalDirtySize.last())); > showText(context, 10, 40, colorForLabels, " External: " + formatByteNumber(data.totalExternalSize.last())); > > float y = 55;
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 188395
: 346748