Title: [241682] releases/WebKitGTK/webkit-2.24/Source/bmalloc
Revision
241682
Author
carlo...@webkit.org
Date
2019-02-18 08:13:43 -0800 (Mon, 18 Feb 2019)

Log Message

Merge r241581 - [bmalloc] NSBundle-based application name check should be executed after debug-heap environment variable check
https://bugs.webkit.org/show_bug.cgi?id=194694

Reviewed by Mark Lam.

Interestingly, NSBundle allocates fair amount of memory and keeps it for a process-long time. For example, it
allocates global NSConcreteHashTable, which takes 2.5KB. This patch changes the order of gigacage-check, we
first check "Malloc=1" status, and then check the process name through NSBundle. This allows us to remove NSBundle
related allocation in JSC initialization in the system malloc mode.

* bmalloc/Gigacage.cpp:
(Gigacage::shouldBeEnabled):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.24/Source/bmalloc/ChangeLog (241681 => 241682)


--- releases/WebKitGTK/webkit-2.24/Source/bmalloc/ChangeLog	2019-02-18 16:13:40 UTC (rev 241681)
+++ releases/WebKitGTK/webkit-2.24/Source/bmalloc/ChangeLog	2019-02-18 16:13:43 UTC (rev 241682)
@@ -1,5 +1,20 @@
 2019-02-15  Yusuke Suzuki  <ysuz...@apple.com>
 
+        [bmalloc] NSBundle-based application name check should be executed after debug-heap environment variable check
+        https://bugs.webkit.org/show_bug.cgi?id=194694
+
+        Reviewed by Mark Lam.
+
+        Interestingly, NSBundle allocates fair amount of memory and keeps it for a process-long time. For example, it
+        allocates global NSConcreteHashTable, which takes 2.5KB. This patch changes the order of gigacage-check, we
+        first check "Malloc=1" status, and then check the process name through NSBundle. This allows us to remove NSBundle
+        related allocation in JSC initialization in the system malloc mode.
+
+        * bmalloc/Gigacage.cpp:
+        (Gigacage::shouldBeEnabled):
+
+2019-02-15  Yusuke Suzuki  <ysuz...@apple.com>
+
         [bmalloc] Do not start scavenger thread if we use system malloc
         https://bugs.webkit.org/show_bug.cgi?id=194674
 

Modified: releases/WebKitGTK/webkit-2.24/Source/bmalloc/bmalloc/Gigacage.cpp (241681 => 241682)


--- releases/WebKitGTK/webkit-2.24/Source/bmalloc/bmalloc/Gigacage.cpp	2019-02-18 16:13:40 UTC (rev 241681)
+++ releases/WebKitGTK/webkit-2.24/Source/bmalloc/bmalloc/Gigacage.cpp	2019-02-18 16:13:43 UTC (rev 241682)
@@ -267,11 +267,11 @@
     std::call_once(
         onceFlag,
         [] {
-            if (!gigacageEnabledForProcess())
+            bool debugHeapEnabled = PerProcess<Environment>::get()->isDebugHeapEnabled();
+            if (debugHeapEnabled)
                 return;
 
-            bool result = !PerProcess<Environment>::get()->isDebugHeapEnabled();
-            if (!result)
+            if (!gigacageEnabledForProcess())
                 return;
             
             if (char* gigacageEnabled = getenv("GIGACAGE_ENABLED")) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to