Title: [144170] trunk/Source/WTF
Revision
144170
Author
[email protected]
Date
2013-02-27 04:09:18 -0800 (Wed, 27 Feb 2013)

Log Message

REGRESSION(r137994): It made JSC tests hang and layout tests fail on ARM Thumb2 / Linux
https://bugs.webkit.org/show_bug.cgi?id=108632

Patch by Simon Hausmann <[email protected]> on 2013-02-27
Reviewed by Csaba Osztrogonác.

It appears that mprotect() is very slow on ARM/Linux, so disable the
approach of unreserved mappings there and fall back to overcomitting
memory, based on Uli Schlachter's recommendation.

* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::decommit):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (144169 => 144170)


--- trunk/Source/WTF/ChangeLog	2013-02-27 12:05:58 UTC (rev 144169)
+++ trunk/Source/WTF/ChangeLog	2013-02-27 12:09:18 UTC (rev 144170)
@@ -1,3 +1,18 @@
+2013-02-27  Simon Hausmann  <[email protected]>
+
+        REGRESSION(r137994): It made JSC tests hang and layout tests fail on ARM Thumb2 / Linux
+        https://bugs.webkit.org/show_bug.cgi?id=108632
+
+        Reviewed by Csaba Osztrogonác.
+
+        It appears that mprotect() is very slow on ARM/Linux, so disable the
+        approach of unreserved mappings there and fall back to overcomitting
+        memory, based on Uli Schlachter's recommendation.
+
+        * wtf/OSAllocatorPosix.cpp:
+        (WTF::OSAllocator::reserveUncommitted):
+        (WTF::OSAllocator::decommit):
+
 2013-02-26  Roger Fong  <[email protected]>
 
         Unreviewed. Build fix for VS2010 solution, take 2.

Modified: trunk/Source/WTF/wtf/OSAllocatorPosix.cpp (144169 => 144170)


--- trunk/Source/WTF/wtf/OSAllocatorPosix.cpp	2013-02-27 12:05:58 UTC (rev 144169)
+++ trunk/Source/WTF/wtf/OSAllocatorPosix.cpp	2013-02-27 12:09:18 UTC (rev 144170)
@@ -43,7 +43,7 @@
     void* result = mmap(0, bytes, PROT_NONE, MAP_LAZY | MAP_PRIVATE | MAP_ANON, -1, 0);
     if (result == MAP_FAILED)
         CRASH();
-#elif OS(LINUX)
+#elif OS(LINUX) && !CPU(ARM)
     UNUSED_PARAM(usage);
     UNUSED_PARAM(writable);
     UNUSED_PARAM(executable);
@@ -165,7 +165,7 @@
 #if OS(QNX)
     // Use PROT_NONE and MAP_LAZY to decommit the pages.
     mmap(address, bytes, PROT_NONE, MAP_FIXED | MAP_LAZY | MAP_PRIVATE | MAP_ANON, -1, 0);
-#elif OS(LINUX)
+#elif OS(LINUX) && !CPU(ARM)
     madvise(address, bytes, MADV_DONTNEED);
     if (mprotect(address, bytes, PROT_NONE))
         CRASH();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to