public final class HotSpotGraalRuntime extends Object implements HotSpotGraalRuntimeProvider, HotSpotProxified
GraalRuntime.| Modifier and Type | Class and Description |
|---|---|
static class |
HotSpotGraalRuntime.Options |
| Modifier and Type | Field and Description |
|---|---|
private Map<Class<? extends Architecture>,HotSpotBackend> |
backends |
private DebugValuesPrinter |
debugValuesPrinter |
private ClassValue<ResolvedJavaType> |
graalMirrors
Graal mirrors are stored as a
ClassValue associated with the Class of the
type. |
private HotSpotBackend |
hostBackend |
private static HotSpotGraalRuntime |
instance |
private HotSpotJVMCIRuntime |
jvmciRuntime |
private NodeCollectionsProvider |
nodeCollectionsProvider |
private long |
runtimeStartTime |
| Modifier | Constructor and Description |
|---|---|
private |
HotSpotGraalRuntime() |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
checkArrayIndexScaleInvariants() |
private static boolean |
checkFactoryOverriding(HotSpotBackendFactory baseFactory,
HotSpotBackendFactory overridingFactory)
Checks that a factory overriding is valid.
|
private void |
completeInitialization()
Do deferred initialization.
|
private static HotSpotBackendFactory |
findFactory(String architecture) |
ResolvedJavaType |
fromClass(Class<?> javaClass)
Gets the Graal mirror for a
Class object. |
<T extends Architecture> |
getBackend(Class<T> arch)
Gets the backend for a given architecture.
|
Map<Class<? extends Architecture>,HotSpotBackend> |
getBackends() |
<T> T |
getCapability(Class<T> clazz) |
private static String[] |
getGPUArchitectureNames(CompilerToVM c2vm)
Gets the names of the supported GPU architectures for the purpose of finding the
corresponding backend objects.
|
HotSpotBackend |
getHostBackend()
Gets the host backend.
|
HotSpotProviders |
getHostProviders() |
static Kind |
getHostWordKind()
Gets the kind of a word value on the host backend.
|
HotSpotJVMCIRuntimeProvider |
getJVMCIRuntime() |
String |
getName() |
<T> T |
iterateFrames(ResolvedJavaMethod[] initialMethods,
ResolvedJavaMethod[] matchingMethods,
int initialSkip,
InspectedFrameVisitor<T> visitor)
Accesses the current stack, providing
InspectedFrames to the visitor that can be used
to inspect the stack frames' contents. |
(package private) static void |
phaseTransition(String phase)
Take action related to entering a new execution phase.
|
private static void |
printConfig(HotSpotVMConfig config) |
private HotSpotBackend |
registerBackend(HotSpotBackend backend) |
static HotSpotGraalRuntime |
runtime()
Gets the singleton
HotSpotGraalRuntime object. |
(package private) void |
shutdown() |
private static long[] |
toMeta(ResolvedJavaMethod[] methods) |
static long |
unsafeReadKlassPointer(Object object)
Reads a klass pointer from a constant object.
|
static long |
unsafeReadWord(Object object,
long offset)
Reads a word value from a given object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCompilerToVM, getConfig, getTarget, lookupTypeprivate static final HotSpotGraalRuntime instance
private final HotSpotBackend hostBackend
private DebugValuesPrinter debugValuesPrinter
private final ClassValue<ResolvedJavaType> graalMirrors
ClassValue associated with the Class of the
type. This data structure stores both HotSpotResolvedObjectType and
HotSpotResolvedPrimitiveType types.private final Map<Class<? extends Architecture>,HotSpotBackend> backends
private final HotSpotJVMCIRuntime jvmciRuntime
private final NodeCollectionsProvider nodeCollectionsProvider
private long runtimeStartTime
private HotSpotGraalRuntime()
public static HotSpotGraalRuntime runtime()
HotSpotGraalRuntime object.public HotSpotJVMCIRuntimeProvider getJVMCIRuntime()
getJVMCIRuntime in interface HotSpotGraalRuntimeProviderprivate boolean checkArrayIndexScaleInvariants()
private static HotSpotBackendFactory findFactory(String architecture)
private static boolean checkFactoryOverriding(HotSpotBackendFactory baseFactory, HotSpotBackendFactory overridingFactory)
baseFactory - overridingFactory - public static Kind getHostWordKind()
public static long unsafeReadKlassPointer(Object object)
public static long unsafeReadWord(Object object, long offset)
private void completeInitialization()
private HotSpotBackend registerBackend(HotSpotBackend backend)
public ResolvedJavaType fromClass(Class<?> javaClass)
HotSpotGraalRuntimeProviderClass object.fromClass in interface HotSpotGraalRuntimeProviderResolvedJavaType corresponding to javaClassprivate static String[] getGPUArchitectureNames(CompilerToVM c2vm)
private static void printConfig(HotSpotVMConfig config)
public HotSpotProviders getHostProviders()
getHostProviders in interface HotSpotGraalRuntimeProviderpublic String getName()
getName in interface GraalRuntimegetName in interface HotSpotGraalRuntimeProviderpublic <T> T getCapability(Class<T> clazz)
getCapability in interface GraalRuntimepublic HotSpotBackend getHostBackend()
RuntimeProvidergetHostBackend in interface HotSpotGraalRuntimeProvidergetHostBackend in interface RuntimeProviderpublic <T extends Architecture> Backend getBackend(Class<T> arch)
RuntimeProvidergetBackend in interface RuntimeProviderarch - a specific architecture classpublic Map<Class<? extends Architecture>,HotSpotBackend> getBackends()
public <T> T iterateFrames(ResolvedJavaMethod[] initialMethods, ResolvedJavaMethod[] matchingMethods, int initialSkip, InspectedFrameVisitor<T> visitor)
StackIntrospectionInspectedFrames to the visitor that can be used
to inspect the stack frames' contents. Iteration continues as long as
InspectedFrameVisitor.visitFrame(jdk.internal.jvmci.code.stack.InspectedFrame), which is invoked for every InspectedFrame,
returns null. Any non-null result of the visitor indicates that frame iteration should stop.iterateFrames in interface StackIntrospectioninitialMethods - if this is non-null, then the stack trace will start at these
methodsmatchingMethods - if this is non-null, then only matching stack frames are
returnedinitialSkip - the number of matching methods to skip (including the initial method)visitor - the visitor that is called for every matching methodprivate static long[] toMeta(ResolvedJavaMethod[] methods)
static void phaseTransition(String phase)
phase - the execution phase being enteredvoid shutdown()