Ignore:
Timestamp:
Aug 24, 2017, 11:00:09 AM (8 years ago)
Author:
[email protected]
Message:

Reduce Gigacage sizes
https://bugs.webkit.org/show_bug.cgi?id=175920

Reviewed by Mark Lam.

Source/bmalloc:

This introduces the ability to have different gigacage sizes for different gigacages, and uses it to reduce the size of both
gigacages, but to different extents: Primitive gets 32GB with a 16GB runway and JSValue gets 16GB.

This is a ~10% membuster progression on my Mac Pro.

  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):

  • bmalloc/Gigacage.h:

(Gigacage::size):
(Gigacage::alignment):
(Gigacage::mask):
(Gigacage::runway):
(Gigacage::totalSize):
(Gigacage::caged):

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):
(bmalloc::Heap::gigacageSize):

  • bmalloc/Heap.h:

Source/JavaScriptCore:

Teach all of the code generators to use the right gigacage masks.

Also teach Wasm that it has much less memory for signaling memories. With 32GB, we have room for 7 signaling memories. But if
we actually did that, then we'd have no memory left for anything else. So, this caps us at 4 signaling memories.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::caged):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::cage):
(JSC::AssemblyHelpers::cageConditionally):

  • llint/LowLevelInterpreter64.asm:
  • runtime/Options.h:

Source/WTF:

Provide filler API for the no-bmalloc/no-Gigacage case.

  • wtf/Gigacage.h:

(Gigacage::mask):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h

    r220416 r221148  
    13181318            return;
    13191319       
    1320         andPtr(TrustedImmPtr(static_cast<size_t>(GIGACAGE_MASK)), storage);
     1320        andPtr(TrustedImmPtr(Gigacage::mask(kind)), storage);
    13211321        addPtr(TrustedImmPtr(Gigacage::basePtr(kind)), storage);
    13221322#else
     
    13371337        loadPtr(&Gigacage::basePtr(kind), scratch);
    13381338        Jump done = branchTestPtr(Zero, scratch);
    1339         andPtr(TrustedImmPtr(static_cast<size_t>(GIGACAGE_MASK)), storage);
     1339        andPtr(TrustedImmPtr(Gigacage::mask(kind)), storage);
    13401340        addPtr(scratch, storage);
    13411341        done.link(this);
Note: See TracChangeset for help on using the changeset viewer.