diff options
author | 2023-08-29 19:30:40 +0100 | |
---|---|---|
committer | 2023-11-21 00:22:38 +0000 | |
commit | 7b974d78440f179c91f8ad97ca66da464908bc78 (patch) | |
tree | a7de567f01e02f4d69ce8e34281ab1149166862b /compiler/optimizing/intrinsic_objects.h | |
parent | 9b0038be3332ca4229ec1822d515d1dc41bcf050 (diff) |
Pin large object alignment and size threshold
This patch is part of the chain preparing for making kPageSize
non-constexpr in a future patch.
- Pin kLargeObjectAlignment
The value used to be initialized with page size value.
Now, as the page size becomes variable, this should be changed, as
kLargeObjectAlignment is a template parameter. Change it to fixed
value of maximum page size which should work for all page sizes.
With page size agnosticism mode switched off the maximum supported
page size would be 4K, so in that mode kLargeObjectAlignment would
have same value as without this change.
Update the GC implementation to use kLargeObjectAlignment instead of
kPageSize for the large object alignment checks.
- Make kMinLargeObjectThreshold a fixed constant
Before, kMinLargeObjectThreshold was defined as 3 page sizes. Make it
independent of page size - for now choosing the value that would have
been used in 4K configuration.
Choosing the value needs further investigation as it might not be
optimal.
This is required because the constant is inlined in an assembly
instruction.
- Use kLargeObjectAlignment for FreeListSpace
Replace FreeListSpace::kAlignment with kLargeObjectAlignment.
The replacement is not required and is accomplished to make it
more obvious which value is used for alignment in the space.
Without this change, both kLargeObjectAlignment and
FreeListSpace::kAlignment (always equal to kLargeObjectAlignment)
are used in large_object_space.cc, causing unnecessary duplication
in ways to refer to the same value:
- direct reference to kLargeObjectAlignment
- indirect reference via kAlignment defined as kLargeObjectAlignment
Test: Same as for I5430741a8494b340ed7fd2d8692c41a59ad9c530.
The whole patches chain was tested as a whole.
Change-Id: I8eb8d6de0ab59e63308e8ec8c3a88573c236e5f6
Diffstat (limited to 'compiler/optimizing/intrinsic_objects.h')
0 files changed, 0 insertions, 0 deletions