public final class HotSpotGraalRuntime extends Object implements HotSpotGraalRuntimeProvider
GraalRuntime.| Modifier and Type | Class and Description |
|---|---|
static class |
HotSpotGraalRuntime.HotSpotGC
Constants denoting the GC algorithms available in HotSpot.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addShutdownHook(Runnable hook)
Adds a
Runnable that will be run when this runtime is HotSpotGraalRuntime.shutdown(). |
SnippetCounter.Group |
createSnippetCounterGroup(String groupName)
If snippet counters are enabled, creates
and registers a
SnippetCounter.Group with the given name. |
<T extends Architecture> |
getBackend(Class<T> arch)
Gets the backend for a given architecture.
|
<T> T |
getCapability(Class<T> clazz) |
Map<CompilationWrapper.ExceptionAction,Integer> |
getCompilationProblemsPerAction()
Gets the map used to count compilation problems at each
CompilationWrapper.ExceptionAction level. |
String |
getCompilerConfigurationName()
Returns the unique compiler configuration name that is in use.
|
HotSpotGraalRuntime.HotSpotGC |
getGarbageCollector() |
HotSpotBackend |
getHostBackend()
Gets the host backend.
|
HotSpotProviders |
getHostProviders() |
Instrumentation |
getInstrumentation()
Returns the instance holding the instrumentation data structures.
|
HotSpotGraalManagementRegistration |
getManagement() |
GlobalMetrics |
getMetricValues() |
String |
getName() |
OptionValues |
getOptions()
Gets the option values associated with this runtime.
|
String[] |
getOptionValues(String... names)
Gets the values for the options corresponding to
names encoded as strings. |
DiagnosticsOutputDirectory |
getOutputDirectory()
Gets a directory into which diagnostics such crash reports and dumps should be written.
|
GraalHotSpotVMConfig |
getVMConfig() |
void |
handleManagementInitializationFailure(Throwable cause) |
Object |
invokeManagementAction(String actionName,
Object[] params) |
boolean |
isBootstrapping()
Determines if the VM is currently bootstrapping the JVMCI compiler.
|
boolean |
isShutdown()
This runtime has been requested to shutdown.
|
void |
notifyBootstrapFinished() |
DebugContext |
openDebugContext(OptionValues compilationOptions,
CompilationIdentifier compilationId,
Object compilable,
Iterable<DebugHandlersFactory> factories,
PrintStream logStream)
Opens a debug context for compiling
compilable. |
String[] |
setOptionValues(String[] names,
String[] values)
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTargetgetRequiredCapabilitypublic GlobalMetrics getMetricValues()
public HotSpotProviders getHostProviders()
getHostProviders in interface HotSpotGraalRuntimeProviderpublic GraalHotSpotVMConfig getVMConfig()
getVMConfig in interface HotSpotGraalRuntimeProviderpublic DebugContext openDebugContext(OptionValues compilationOptions, CompilationIdentifier compilationId, Object compilable, Iterable<DebugHandlersFactory> factories, PrintStream logStream)
HotSpotGraalRuntimeProvidercompilable. The DebugContext.close()
method should be called on the returned object once the compilation is finished.openDebugContext in interface HotSpotGraalRuntimeProvidercompilationOptions - the options used to configure the compilation debug contextcompilationId - a system wide unique compilation idcompilable - the input to the compilationlogStream - the log stream to use in this contextpublic OptionValues getOptions()
HotSpotGraalRuntimeProvidergetOptions in interface HotSpotGraalRuntimeProviderpublic SnippetCounter.Group createSnippetCounterGroup(String groupName)
SnippetCounter.Group.FactorySnippetCounter.Group with the given name. Otherwise, returns null.createSnippetCounterGroup in interface SnippetCounter.Group.FactorygroupName - name of the counter grouppublic String getName()
getName in interface GraalRuntimegetName in interface HotSpotGraalRuntimeProviderpublic <T> T getCapability(Class<T> clazz)
getCapability in interface GraalRuntimepublic HotSpotGraalRuntime.HotSpotGC getGarbageCollector()
getGarbageCollector in interface HotSpotGraalRuntimeProviderpublic 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 String getCompilerConfigurationName()
HotSpotGraalRuntimeProvidergetCompilerConfigurationName in interface HotSpotGraalRuntimeProviderpublic Instrumentation getInstrumentation()
HotSpotGraalRuntimeProvidergetInstrumentation in interface HotSpotGraalRuntimeProviderpublic void addShutdownHook(Runnable hook)
Runnable that will be run when this runtime is HotSpotGraalRuntime.shutdown(). The
runnable will be run on the same thread doing the shutdown. All the advice for regular
shutdown hooks also applies here but even more
so since the hook runs on the shutdown thread.public void notifyBootstrapFinished()
public boolean isBootstrapping()
HotSpotGraalRuntimeProviderisBootstrapping in interface HotSpotGraalRuntimeProviderpublic boolean isShutdown()
HotSpotGraalRuntimeProviderisShutdown in interface HotSpotGraalRuntimeProviderpublic DiagnosticsOutputDirectory getOutputDirectory()
HotSpotGraalRuntimeProvidergetOutputDirectory in interface HotSpotGraalRuntimeProviderpublic Map<CompilationWrapper.ExceptionAction,Integer> getCompilationProblemsPerAction()
HotSpotGraalRuntimeProviderCompilationWrapper.ExceptionAction level. All
updates and queries to the map should be synchronized.getCompilationProblemsPerAction in interface HotSpotGraalRuntimeProviderpublic HotSpotGraalManagementRegistration getManagement()
public void handleManagementInitializationFailure(Throwable cause)
public String[] setOptionValues(String[] names, String[] values)
values - the values to set. The empty string represents null which resets an
option to its default value. For string type options, a non-empty value must be
enclosed in double quotes.names[i] if setting the
denoted option succeeded, null if the option is unknown otherwise an error
message describing the failure to set the optionpublic String[] getOptionValues(String... names)
names encoded as strings. The empty
string represents null. For string type options, non-null values will be
enclosed in double quotes.names - a list of option namesnames does not denote an
existing option, the corresponding element in the returned array will be null