Changeset 210498 in webkit


Ignore:
Timestamp:
Jan 8, 2017 9:35:14 PM (7 years ago)
Author:
akling@apple.com
Message:

Inject MarkedSpace size classes for a few more high-volume objects.
<https://webkit.org/b/166815>

Reviewed by Darin Adler.

Add the following classes to the list of manually injected size classes:

  • JSString
  • JSFunction
  • PropertyTable
  • Structure

Only Structure actually ends up with a new size class, the others already
can't get any tighter due to the current MarkedBlock::atomSize being 16.
I've put them in anyway to ensure that we have optimally carved-out cells
for them in the future, should they grow.

With this change, Structures get allocated in 128-byte cells instead of
160-byte cells, giving us 25% more Structures per MarkedBlock.

  • heap/MarkedSpace.cpp:
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r210476 r210498  
     12017-01-08  Andreas Kling  <akling@apple.com>
     2
     3        Inject MarkedSpace size classes for a few more high-volume objects.
     4        <https://webkit.org/b/166815>
     5
     6        Reviewed by Darin Adler.
     7
     8        Add the following classes to the list of manually injected size classes:
     9
     10            - JSString
     11            - JSFunction
     12            - PropertyTable
     13            - Structure
     14
     15        Only Structure actually ends up with a new size class, the others already
     16        can't get any tighter due to the current MarkedBlock::atomSize being 16.
     17        I've put them in anyway to ensure that we have optimally carved-out cells
     18        for them in the future, should they grow.
     19
     20        With this change, Structures get allocated in 128-byte cells instead of
     21        160-byte cells, giving us 25% more Structures per MarkedBlock.
     22
     23        * heap/MarkedSpace.cpp:
     24
    1252017-01-06  Saam Barati  <sbarati@apple.com>
    226
  • trunk/Source/JavaScriptCore/heap/MarkedSpace.cpp

    r209897 r210498  
    131131            }
    132132
     133            // Manually inject size classes for objects we know will be allocated in high volume.
    133134            add(sizeof(UnlinkedFunctionExecutable));
    134135            add(sizeof(UnlinkedFunctionCodeBlock));
    135136            add(sizeof(FunctionExecutable));
    136137            add(sizeof(FunctionCodeBlock));
     138            add(sizeof(JSString));
     139            add(sizeof(JSFunction));
     140            add(sizeof(PropertyTable));
     141            add(sizeof(Structure));
    137142
    138143            {
Note: See TracChangeset for help on using the changeset viewer.