Title: [211241] trunk/Source/WebCore
- Revision
- 211241
- Author
- commit-qu...@webkit.org
- Date
- 2017-01-26 16:56:44 -0800 (Thu, 26 Jan 2017)
Log Message
Web Inspector: iOS: Memory timeline shows impossible values for Page size (underflowed)
https://bugs.webkit.org/show_bug.cgi?id=167468
<rdar://problem/30099051>
Patch by Joseph Pecoraro <pecor...@apple.com> on 2017-01-26
Reviewed by Andreas Kling.
* page/cocoa/ResourceUsageThreadCocoa.mm:
(WebCore::vmPageSize):
This value matches the sysctl value we were attempting to access, and is
the most appropriate when dealing with mach APIs, as we are using here.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (211240 => 211241)
--- trunk/Source/WebCore/ChangeLog 2017-01-27 00:38:22 UTC (rev 211240)
+++ trunk/Source/WebCore/ChangeLog 2017-01-27 00:56:44 UTC (rev 211241)
@@ -1,3 +1,16 @@
+2017-01-26 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: iOS: Memory timeline shows impossible values for Page size (underflowed)
+ https://bugs.webkit.org/show_bug.cgi?id=167468
+ <rdar://problem/30099051>
+
+ Reviewed by Andreas Kling.
+
+ * page/cocoa/ResourceUsageThreadCocoa.mm:
+ (WebCore::vmPageSize):
+ This value matches the sysctl value we were attempting to access, and is
+ the most appropriate when dealing with mach APIs, as we are using here.
+
2017-01-26 Jer Noble <jer.no...@apple.com>
Autoplay muted videos stop playback of any streaming app in the background
Modified: trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm (211240 => 211241)
--- trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm 2017-01-27 00:38:22 UTC (rev 211240)
+++ trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm 2017-01-27 00:56:44 UTC (rev 211241)
@@ -34,21 +34,17 @@
#include <mach/mach.h>
#include <mach/vm_statistics.h>
#include <runtime/VM.h>
-#include <sys/sysctl.h>
namespace WebCore {
static size_t vmPageSize()
{
- static size_t pageSize;
- static std::once_flag onceFlag;
- std::call_once(onceFlag, [&] {
- size_t outputSize = sizeof(pageSize);
- int status = sysctlbyname("vm.pagesize", &pageSize, &outputSize, nullptr, 0);
- ASSERT_UNUSED(status, status != -1);
- ASSERT(pageSize);
- });
- return pageSize;
+#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000
+ return vm_kernel_page_size;
+#else
+ static size_t cached = sysconf(_SC_PAGESIZE);
+ return cached;
+#endif
}
void logFootprintComparison(const std::array<TagInfo, 256>& before, const std::array<TagInfo, 256>& after)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes