use of org.graalvm.compiler.api.replacements.Fold in project graal by oracle.
the class UnalignedHeapChunkMemoryWalkerAccessFeature method getCardTableSize.
/**
* How big is the card table?
*/
@Fold
static UnsignedWord getCardTableSize() {
// A "table" of one entry.
final UnsignedWord requiredSize = CardTable.tableSizeForMemorySize(WordFactory.unsigned(1));
final UnsignedWord alignment = WordFactory.unsigned(ConfigurationValues.getObjectLayout().getAlignment());
return UnsignedUtils.roundUp(requiredSize, alignment);
}
use of org.graalvm.compiler.api.replacements.Fold in project graal by oracle.
the class UnalignedHeapChunkMemoryWalkerAccessFeature method getObjectStartOffset.
/**
* Where does the Object start?
*/
@Fold
static UnsignedWord getObjectStartOffset() {
final UnsignedWord cardTableLimitOffset = getCardTableLimitOffset();
final UnsignedWord alignment = WordFactory.unsigned(ConfigurationValues.getObjectLayout().getAlignment());
final UnsignedWord result = UnsignedUtils.roundUp(cardTableLimitOffset, alignment);
return result;
}
use of org.graalvm.compiler.api.replacements.Fold in project graal by oracle.
the class AlignedHeapChunkMemoryWalkerAccessFeature method getFirstObjectTableStartOffset.
/**
* Where does the first object table start?
*/
@Fold
static UnsignedWord getFirstObjectTableStartOffset() {
/* The first object table starts at the end of the card remembered set table. */
final UnsignedWord cardTableLimit = getCardTableLimitOffset();
final UnsignedWord alignment = WordFactory.unsigned(ConfigurationValues.getObjectLayout().getAlignment());
return UnsignedUtils.roundUp(cardTableLimit, alignment);
}
use of org.graalvm.compiler.api.replacements.Fold in project graal by oracle.
the class AlignedHeapChunkMemoryWalkerAccessFeature method getFirstObjectTableSize.
/**
* How big is the first object table?
*/
@Fold
static UnsignedWord getFirstObjectTableSize() {
/* How much space is there in the chunk? */
final UnsignedWord headerSize = getHeaderSize();
final UnsignedWord available = HeapPolicy.getAlignedHeapChunkSize().subtract(headerSize);
/* How big should the table be? */
final UnsignedWord requiredSize = CardTable.tableSizeForMemorySize(available);
final UnsignedWord alignment = WordFactory.unsigned(ConfigurationValues.getObjectLayout().getAlignment());
return UnsignedUtils.roundUp(requiredSize, alignment);
}
use of org.graalvm.compiler.api.replacements.Fold in project graal by oracle.
the class AlignedHeapChunkMemoryWalkerAccessFeature method getCardTableLimitOffset.
/**
* What is the offset of the limit of the card table?
*/
@Fold
static UnsignedWord getCardTableLimitOffset() {
final UnsignedWord tableStart = getCardTableStartOffset();
final UnsignedWord tableSize = getCardTableSize();
final UnsignedWord tableLimit = tableStart.add(tableSize);
final UnsignedWord alignment = WordFactory.unsigned(ConfigurationValues.getObjectLayout().getAlignment());
return UnsignedUtils.roundUp(tableLimit, alignment);
}
Aggregations