public final class HotSpotJVMCIRuntime extends Object implements HotSpotJVMCIRuntimeProvider, HotSpotProxified
| Modifier and Type | Class and Description |
|---|---|
static class |
HotSpotJVMCIRuntime.Options |
| Modifier and Type | Field and Description |
|---|---|
private Map<Class<? extends Architecture>,JVMCIBackend> |
backends |
protected CompilerToVM |
compilerToVm |
protected HotSpotVMConfig |
config |
private JVMCIBackend |
hostBackend |
private static HotSpotJVMCIRuntime |
instance |
private ClassValue<ResolvedJavaType> |
jvmciMirrors
JVMCI mirrors are stored as a
ClassValue associated with the Class of the
type. |
private Iterable<HotSpotVMEventListener> |
vmEventListeners |
| Modifier | Constructor and Description |
|---|---|
private |
HotSpotJVMCIRuntime() |
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
checkFactoryOverriding(HotSpotJVMCIBackendFactory baseFactory,
HotSpotJVMCIBackendFactory overridingFactory)
Checks that a factory overriding is valid.
|
private void |
compileMetaspaceMethod(long metaspaceMethod,
int entryBCI,
long jvmciEnv,
int id)
Called from the VM.
|
private void |
compileTheWorld()
Called from the VM.
|
void |
completeInitialization()
Do deferred initialization.
|
static HotSpotJVMCIBackendFactory |
findFactory(String architecture) |
ResolvedJavaType |
fromClass(Class<?> javaClass)
Gets the JVMCI mirror for a
Class object. |
Map<Class<? extends Architecture>,JVMCIBackend> |
getBackends() |
CompilerToVM |
getCompilerToVM() |
HotSpotVMConfig |
getConfig() |
JVMCIBackend |
getHostJVMCIBackend()
Gets the host JVMCI backend.
|
static Kind |
getHostWordKind()
Gets the kind of a word value on the host backend.
|
<T extends Architecture> |
getJVMCIBackend(Class<T> arch)
Gets the backend for a given architecture.
|
JavaType |
lookupType(String name,
HotSpotResolvedObjectType accessingType,
boolean resolve)
Converts a name to a Java type.
|
(package private) void |
notifyInstall(HotSpotCodeCacheProvider hotSpotCodeCacheProvider,
InstalledCode installedCode,
CompilationResult compResult)
Shuts down the runtime.
|
private JVMCIBackend |
registerBackend(JVMCIBackend backend) |
static HotSpotJVMCIRuntime |
runtime()
Gets the singleton
HotSpotJVMCIRuntime object. |
private void |
shutdown()
Shuts down the runtime.
|
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, waitgetArrayBaseOffset, getArrayIndexScaleprivate static final HotSpotJVMCIRuntime instance
protected CompilerToVM compilerToVm
protected final HotSpotVMConfig config
private final JVMCIBackend hostBackend
private final ClassValue<ResolvedJavaType> jvmciMirrors
ClassValue associated with the Class of the
type. This data structure stores both HotSpotResolvedObjectType and
HotSpotResolvedPrimitiveType types.private final Map<Class<? extends Architecture>,JVMCIBackend> backends
private final Iterable<HotSpotVMEventListener> vmEventListeners
private HotSpotJVMCIRuntime()
public static HotSpotJVMCIRuntime runtime()
HotSpotJVMCIRuntime object.public void completeInitialization()
public static HotSpotJVMCIBackendFactory findFactory(String architecture)
private static boolean checkFactoryOverriding(HotSpotJVMCIBackendFactory baseFactory, HotSpotJVMCIBackendFactory overridingFactory)
baseFactory - overridingFactory - public static Kind getHostWordKind()
public static long unsafeReadKlassPointer(Object object)
public static long unsafeReadWord(Object object, long offset)
private JVMCIBackend registerBackend(JVMCIBackend backend)
public ResolvedJavaType fromClass(Class<?> javaClass)
HotSpotJVMCIRuntimeProviderClass object.fromClass in interface HotSpotJVMCIRuntimeProviderResolvedJavaType corresponding to javaClasspublic HotSpotVMConfig getConfig()
getConfig in interface HotSpotJVMCIRuntimeProviderpublic CompilerToVM getCompilerToVM()
getCompilerToVM in interface HotSpotJVMCIRuntimeProviderpublic JavaType lookupType(String name, HotSpotResolvedObjectType accessingType, boolean resolve)
HotSpotJVMCIRuntimeProvidername to a
ResolvedJavaType.lookupType in interface HotSpotJVMCIRuntimeProvidername - a well formed Java type in internal formataccessingType - the context of resolution which must be non-nullresolve - specifies whether resolution failure results in an unresolved type being
return or a LinkageError being thrownname which is guaranteed to be of type
ResolvedJavaType if resolve == truepublic JVMCIBackend getHostJVMCIBackend()
JVMCIRuntimegetHostJVMCIBackend in interface JVMCIRuntimepublic <T extends Architecture> JVMCIBackend getJVMCIBackend(Class<T> arch)
JVMCIRuntimegetJVMCIBackend in interface JVMCIRuntimearch - a specific architecture classpublic Map<Class<? extends Architecture>,JVMCIBackend> getBackends()
private void compileMetaspaceMethod(long metaspaceMethod, int entryBCI, long jvmciEnv, int id)
private void compileTheWorld() throws Throwable
Throwableprivate void shutdown() throws Exception
Exceptionvoid notifyInstall(HotSpotCodeCacheProvider hotSpotCodeCacheProvider, InstalledCode installedCode, CompilationResult compResult)
hotSpotCodeCacheProvider -