Title: [277388] trunk/Source/_javascript_Core
Revision
277388
Author
gga...@apple.com
Date
2021-05-12 14:06:35 -0700 (Wed, 12 May 2021)

Log Message

ConservativeRoots triggers page demand on Speedometer
https://bugs.webkit.org/show_bug.cgi?id=225676

Reviewed by Filip Pizlo.

Use a 2048 item / 16kB inline buffer. That's about 10% bigger than the
max capacity observed on Speedometer, and small enough to reasonably fit
on the stack.

Removed the separate out of line capacity because it was smaller than
the new inline capacity.

* heap/ConservativeRoots.cpp:
(JSC::ConservativeRoots::grow):
* heap/ConservativeRoots.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (277387 => 277388)


--- trunk/Source/_javascript_Core/ChangeLog	2021-05-12 20:40:51 UTC (rev 277387)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-05-12 21:06:35 UTC (rev 277388)
@@ -1,3 +1,21 @@
+2021-05-12  Geoffrey Garen  <gga...@apple.com>
+
+        ConservativeRoots triggers page demand on Speedometer
+        https://bugs.webkit.org/show_bug.cgi?id=225676
+
+        Reviewed by Filip Pizlo.
+
+        Use a 2048 item / 16kB inline buffer. That's about 10% bigger than the
+        max capacity observed on Speedometer, and small enough to reasonably fit
+        on the stack.
+
+        Removed the separate out of line capacity because it was smaller than
+        the new inline capacity.
+
+        * heap/ConservativeRoots.cpp:
+        (JSC::ConservativeRoots::grow):
+        * heap/ConservativeRoots.h:
+
 2021-05-12  Mark Lam  <mark....@apple.com>
 
         Implement some common Baseline JIT slow paths using JIT thunks.

Modified: trunk/Source/_javascript_Core/heap/ConservativeRoots.cpp (277387 => 277388)


--- trunk/Source/_javascript_Core/heap/ConservativeRoots.cpp	2021-05-12 20:40:51 UTC (rev 277387)
+++ trunk/Source/_javascript_Core/heap/ConservativeRoots.cpp	2021-05-12 21:06:35 UTC (rev 277388)
@@ -53,7 +53,7 @@
 
 void ConservativeRoots::grow()
 {
-    size_t newCapacity = m_capacity == inlineCapacity ? nonInlineCapacity : m_capacity * 2;
+    size_t newCapacity = m_capacity * 2;
     HeapCell** newRoots = static_cast<HeapCell**>(OSAllocator::reserveAndCommit(newCapacity * sizeof(HeapCell*)));
     memcpy(newRoots, m_roots, m_size * sizeof(HeapCell*));
     if (m_roots != m_inlineRoots)

Modified: trunk/Source/_javascript_Core/heap/ConservativeRoots.h (277387 => 277388)


--- trunk/Source/_javascript_Core/heap/ConservativeRoots.h	2021-05-12 20:40:51 UTC (rev 277387)
+++ trunk/Source/_javascript_Core/heap/ConservativeRoots.h	2021-05-12 21:06:35 UTC (rev 277388)
@@ -45,8 +45,7 @@
     HeapCell** roots() const;
 
 private:
-    static constexpr size_t inlineCapacity = 128;
-    static constexpr size_t nonInlineCapacity = 8192 / sizeof(HeapCell*);
+    static constexpr size_t inlineCapacity = 2048;
     
     template<typename MarkHook>
     void genericAddPointer(void*, HeapVersion markingVersion, HeapVersion newlyAllocatedVersion, TinyBloomFilter, MarkHook&);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to