public class HotSpotAllocationSnippets extends AllocationSnippets
| Modifier and Type | Class and Description |
|---|---|
static class |
HotSpotAllocationSnippets.Templates |
AllocationSnippets.AllocationProfilingData, AllocationSnippets.AllocationSnippetCounters, AllocationSnippets.FillContent| Modifier and Type | Field and Description |
|---|---|
static HotSpotForeignCallDescriptor |
DYNAMIC_NEW_INSTANCE
New dynamic array stub that throws an
OutOfMemoryError on allocation failure. |
static HotSpotForeignCallDescriptor |
DYNAMIC_NEW_INSTANCE_OR_NULL
New dynamic array stub that returns null on allocation failure.
|
| Constructor and Description |
|---|
HotSpotAllocationSnippets(GraalHotSpotVMConfig config,
HotSpotRegistersProvider registers) |
| Modifier and Type | Method and Description |
|---|---|
Object |
allocateArray(KlassPointer hub,
int length,
int arrayBaseOffset,
int log2ElementSize,
AllocationSnippets.FillContent fillContents,
int fillStartOffset,
boolean emitMemoryBarrier,
boolean maybeUnroll,
boolean supportsBulkZeroing,
boolean supportsOptimizedFilling,
org.graalvm.compiler.hotspot.replacements.HotSpotAllocationSnippets.HotSpotAllocationProfilingData profilingData) |
Object |
allocateArrayDynamic(Class<?> elementType,
Class<?> voidClass,
int length,
AllocationSnippets.FillContent fillContents,
boolean emitMemoryBarrier,
JavaKind knownElementKind,
int knownLayoutHelper,
boolean supportsBulkZeroing,
boolean supportsOptimizedFilling,
org.graalvm.compiler.hotspot.replacements.HotSpotAllocationSnippets.HotSpotAllocationProfilingData profilingData) |
protected Object |
allocateInstance(KlassPointer hub,
long size,
AllocationSnippets.FillContent fillContents,
boolean emitMemoryBarrier,
org.graalvm.compiler.hotspot.replacements.HotSpotAllocationSnippets.HotSpotAllocationProfilingData profilingData) |
Object |
allocateInstanceDynamic(Class<?> type,
AllocationSnippets.FillContent fillContents,
boolean emitMemoryBarrier,
org.graalvm.compiler.hotspot.replacements.HotSpotAllocationSnippets.HotSpotAllocationProfilingData profilingData) |
int |
arrayLengthOffset() |
protected Object |
callNewArrayStub(Word hub,
int length,
int fillStartOffset) |
protected Object |
callNewInstanceStub(Word hub) |
protected Object |
callNewMultiArrayStub(Word hub,
int rank,
Word dims) |
static Object |
dynamicNewInstance(ForeignCallDescriptor descriptor,
Class<?> elementType) |
static Object |
dynamicNewInstanceOrNull(ForeignCallDescriptor descriptor,
Class<?> elementType) |
static Object |
dynamicNewInstanceStub(Class<?> elementType) |
protected int |
getMinimalBulkZeroingSize() |
protected int |
getPrefetchDistance() |
protected int |
getPrefetchLines(boolean isArray) |
protected int |
getPrefetchStepSize() |
protected int |
getPrefetchStyle() |
Word |
getTLABInfo() |
void |
initializeObjectHeader(Word memory,
Word hub,
boolean isArray) |
protected int |
instanceHeaderSize() |
protected Object |
newmultiarray(KlassPointer hub,
int rank,
int[] dimensions) |
protected int |
objectAlignment() |
protected void |
profileAllocation(AllocationSnippets.AllocationProfilingData profilingData,
org.graalvm.word.UnsignedWord size) |
Word |
readTlabEnd(Word thread) |
Word |
readTlabTop(Word thread) |
protected boolean |
shouldAllocateInTLAB(org.graalvm.word.UnsignedWord allocationSize,
boolean isArray) |
boolean |
useTLAB() |
protected Object |
verifyOop(Object obj) |
void |
writeTlabTop(Word thread,
Word newTop) |
allocateArrayImpl, allocateInstanceImpl, arrayAllocationSize, arrayAllocationSize, emitMemoryBarrierIf, emitPrefetchAllocate, fillMemoryAligned, fillMemoryAlignedUnrollable, formatArray, formatObject, newMultiArrayImplpublic static final HotSpotForeignCallDescriptor DYNAMIC_NEW_INSTANCE
OutOfMemoryError on allocation failure.public static final HotSpotForeignCallDescriptor DYNAMIC_NEW_INSTANCE_OR_NULL
public HotSpotAllocationSnippets(GraalHotSpotVMConfig config, HotSpotRegistersProvider registers)
protected Object allocateInstance(KlassPointer hub, long size, AllocationSnippets.FillContent fillContents, boolean emitMemoryBarrier, org.graalvm.compiler.hotspot.replacements.HotSpotAllocationSnippets.HotSpotAllocationProfilingData profilingData)
public Object allocateArray(KlassPointer hub, int length, int arrayBaseOffset, int log2ElementSize, AllocationSnippets.FillContent fillContents, int fillStartOffset, boolean emitMemoryBarrier, boolean maybeUnroll, boolean supportsBulkZeroing, boolean supportsOptimizedFilling, org.graalvm.compiler.hotspot.replacements.HotSpotAllocationSnippets.HotSpotAllocationProfilingData profilingData)
public Object allocateInstanceDynamic(Class<?> type, AllocationSnippets.FillContent fillContents, boolean emitMemoryBarrier, org.graalvm.compiler.hotspot.replacements.HotSpotAllocationSnippets.HotSpotAllocationProfilingData profilingData)
public Object allocateArrayDynamic(Class<?> elementType, Class<?> voidClass, int length, AllocationSnippets.FillContent fillContents, boolean emitMemoryBarrier, JavaKind knownElementKind, int knownLayoutHelper, boolean supportsBulkZeroing, boolean supportsOptimizedFilling, org.graalvm.compiler.hotspot.replacements.HotSpotAllocationSnippets.HotSpotAllocationProfilingData profilingData)
protected Object newmultiarray(KlassPointer hub, int rank, int[] dimensions)
protected final int getPrefetchStyle()
getPrefetchStyle in class AllocationSnippetsprotected final int getPrefetchLines(boolean isArray)
getPrefetchLines in class AllocationSnippetsprotected final int getPrefetchStepSize()
getPrefetchStepSize in class AllocationSnippetsprotected final int getPrefetchDistance()
getPrefetchDistance in class AllocationSnippetsprotected final Object callNewInstanceStub(Word hub)
callNewInstanceStub in class AllocationSnippetsprotected final Object callNewArrayStub(Word hub, int length, int fillStartOffset)
callNewArrayStub in class AllocationSnippetspublic static Object dynamicNewInstance(ForeignCallDescriptor descriptor, Class<?> elementType)
public static Object dynamicNewInstanceOrNull(ForeignCallDescriptor descriptor, Class<?> elementType)
protected final Object callNewMultiArrayStub(Word hub, int rank, Word dims)
callNewMultiArrayStub in class AllocationSnippetsprotected final int getMinimalBulkZeroingSize()
getMinimalBulkZeroingSize in class AllocationSnippetspublic final void initializeObjectHeader(Word memory, Word hub, boolean isArray)
initializeObjectHeader in class AllocationSnippetsprotected final int instanceHeaderSize()
instanceHeaderSize in class AllocationSnippetspublic final int arrayLengthOffset()
arrayLengthOffset in class AllocationSnippetsprotected final int objectAlignment()
objectAlignment in class AllocationSnippetspublic final boolean useTLAB()
useTLAB in class AllocationSnippetsprotected final boolean shouldAllocateInTLAB(org.graalvm.word.UnsignedWord allocationSize,
boolean isArray)
shouldAllocateInTLAB in class AllocationSnippetspublic final Word getTLABInfo()
getTLABInfo in class AllocationSnippetspublic final Word readTlabEnd(Word thread)
readTlabEnd in class AllocationSnippetspublic final Word readTlabTop(Word thread)
readTlabTop in class AllocationSnippetspublic final void writeTlabTop(Word thread, Word newTop)
writeTlabTop in class AllocationSnippetsprotected final Object verifyOop(Object obj)
verifyOop in class AllocationSnippetsprotected final void profileAllocation(AllocationSnippets.AllocationProfilingData profilingData, org.graalvm.word.UnsignedWord size)
profileAllocation in class AllocationSnippets