⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 277388 in webkit


Ignore:
Timestamp:
May 12, 2021, 2:06:35 PM (5 years ago)
Author:
ggaren@apple.com
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:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r277383 r277388  
     12021-05-12  Geoffrey Garen  <ggaren@apple.com>
     2
     3        ConservativeRoots triggers page demand on Speedometer
     4        https://bugs.webkit.org/show_bug.cgi?id=225676
     5
     6        Reviewed by Filip Pizlo.
     7
     8        Use a 2048 item / 16kB inline buffer. That's about 10% bigger than the
     9        max capacity observed on Speedometer, and small enough to reasonably fit
     10        on the stack.
     11
     12        Removed the separate out of line capacity because it was smaller than
     13        the new inline capacity.
     14
     15        * heap/ConservativeRoots.cpp:
     16        (JSC::ConservativeRoots::grow):
     17        * heap/ConservativeRoots.h:
     18
    1192021-05-12  Mark Lam  <mark.lam@apple.com>
    220
  • trunk/Source/JavaScriptCore/heap/ConservativeRoots.cpp

    r277381 r277388  
    5454void ConservativeRoots::grow()
    5555{
    56     size_t newCapacity = m_capacity == inlineCapacity ? nonInlineCapacity : m_capacity * 2;
     56    size_t newCapacity = m_capacity * 2;
    5757    HeapCell** newRoots = static_cast<HeapCell**>(OSAllocator::reserveAndCommit(newCapacity * sizeof(HeapCell*)));
    5858    memcpy(newRoots, m_roots, m_size * sizeof(HeapCell*));
  • trunk/Source/JavaScriptCore/heap/ConservativeRoots.h

    r277381 r277388  
    4646
    4747private:
    48     static constexpr size_t inlineCapacity = 128;
    49     static constexpr size_t nonInlineCapacity = 8192 / sizeof(HeapCell*);
     48    static constexpr size_t inlineCapacity = 2048;
    5049   
    5150    template<typename MarkHook>
Note: See TracChangeset for help on using the changeset viewer.