Bug 151920

Summary: [Cocoa] ResourceUsageOverlay should query kernel for VM page size.
Product: WebKit Reporter: Andreas Kling <kling>
Component: WebCore Misc.Assignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
aestes: review+
Patch for landing none

Description Andreas Kling 2015-12-05 22:10:31 PST
On systems where hw.pagesize != vm.pagesize, we get goofy looking memory numbers.
Comment 1 Andreas Kling 2015-12-05 22:11:01 PST
Created attachment 266726 [details]
Patch
Comment 2 Andy Estes 2015-12-07 21:11:04 PST
Comment on attachment 266726 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=266726&action=review

> Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm:79
> +        sysctlbyname("vm.pagesize", &pageSize, &outputSize, nullptr, 0);

Could you ASSERT that outputSize still equals sizeof(pageSize) after this call? You might also want to either handle an error or ASSERT that none occurred. I'm imagining a case where we could end up diving by zero later on.
Comment 3 Andreas Kling 2015-12-08 08:56:54 PST
Created attachment 266892 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2015-12-08 09:51:07 PST
Comment on attachment 266892 [details]
Patch for landing

Clearing flags on attachment: 266892

Committed r193757: <http://trac.webkit.org/changeset/193757>
Comment 5 WebKit Commit Bot 2015-12-08 09:51:10 PST
All reviewed patches have been landed.  Closing bug.