public class BenchmarkCounters extends Object
DynamicCounterNodes. The
infrastructure is enabled by specifying either the GenericDynamicCounters or
BenchmarkDynamicCounters option.
The counters are kept in a special area allocated for each native JavaThread object, and the
number of counters is configured using -XX:JVMCICounterSize=value.
-XX:+/-JVMCICountersExcludeCompiler configures whether to exclude compiler threads
(defaults to true).
The subsystems that use the logging need to have their own options to turn on the counters, and
insert DynamicCounterNodes when they're enabled.
Counters will be displayed as a rate (per second) if their group name starts with "~", otherwise
they will be displayed as a total number.
See here for a detailed example of how to use
benchmark counters.
| Modifier and Type | Class and Description |
|---|---|
static class |
BenchmarkCounters.Options |
| Modifier and Type | Field and Description |
|---|---|
static ConcurrentHashMap<String,org.graalvm.compiler.hotspot.debug.BenchmarkCounters.Counter> |
counterMap |
static long[] |
delta |
static boolean |
enabled |
| Constructor and Description |
|---|
BenchmarkCounters() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getIndex(String name,
String group,
GraalHotSpotVMConfig config) |
static int |
getIndexConstantIncrement(String name,
String group,
GraalHotSpotVMConfig config,
long increment) |
static void |
initialize(HotSpotJVMCIRuntime jvmciRuntime,
OptionValues options) |
static void |
shutdown(HotSpotJVMCIRuntime jvmciRuntime,
OptionValues options,
long compilerStartTime) |
public static boolean enabled
public static final ConcurrentHashMap<String,org.graalvm.compiler.hotspot.debug.BenchmarkCounters.Counter> counterMap
public static long[] delta
public static int getIndexConstantIncrement(String name, String group, GraalHotSpotVMConfig config, long increment)
public static int getIndex(String name, String group, GraalHotSpotVMConfig config)
public static void initialize(HotSpotJVMCIRuntime jvmciRuntime,
OptionValues options)
public static void shutdown(HotSpotJVMCIRuntime jvmciRuntime,
OptionValues options,
long compilerStartTime)