From eac33e1ba539aafd938be72fecefe924c522eacf Mon Sep 17 00:00:00 2001 From: Jason Feng Date: Mon, 7 Oct 2024 22:45:15 -0400 Subject: [PATCH] JFR jcmd commands: JFR.start, JFR.dump, JFR.stop Added jcmd commands: JFR.start, JFR.dump, JFR.stop; Added VM internal functions: jfrDump(), initializeJFR(), isJFRRecordingStarted(), setJFRRecordingFileName(), and tearDownJFR(); Added com.ibm.oti.vm.VM methods: isJFRRecordingStarted(), startJFR(), setJFRRecordingFileName(), and stopJFR(); Added a binary file $java.home/lib/metadata.blob; Removed the env var OPENJ9_METADATA_BLOB_FILE_PATH, search $java.home/lib/metadata.blob instead. Signed-off-by: Jason Feng --- .../share/classes/com/ibm/oti/vm/VM.java | 35 + .../tools/attach/target/DiagnosticUtils.java | 336 ++- runtime/jcl/common/com_ibm_oti_vm_VM.cpp | 79 +- runtime/jcl/exports.cmake | 5 + runtime/jcl/uma/jfr_exports.xml | 5 + runtime/metadata.blob | 2180 +++++++++++++++++ runtime/nls/j9vm/j9vm.nls | 7 + runtime/oti/j9.h | 8 + runtime/oti/j9nonbuilder.h | 6 + runtime/oti/jclprots.h | 10 + runtime/oti/vm_api.h | 63 + runtime/vm/JFRConstantPoolTypes.hpp | 21 +- runtime/vm/JFRWriter.hpp | 69 +- runtime/vm/intfunc.c | 5 + runtime/vm/j9vm.tdf | 9 + runtime/vm/jfr.cpp | 122 +- runtime/vm/jvminit.c | 2 +- runtime/vm/vm_internal.h | 19 - 18 files changed, 2823 insertions(+), 158 deletions(-) create mode 100644 runtime/metadata.blob diff --git a/jcl/src/java.base/share/classes/com/ibm/oti/vm/VM.java b/jcl/src/java.base/share/classes/com/ibm/oti/vm/VM.java index 1f085409083..58e7c7150f0 100644 --- a/jcl/src/java.base/share/classes/com/ibm/oti/vm/VM.java +++ b/jcl/src/java.base/share/classes/com/ibm/oti/vm/VM.java @@ -639,6 +639,41 @@ public static Properties internalGetProperties() { } /*[IF JFR_SUPPORT]*/ +/** + * Check if a JFR recording has been started. + * + * @return true if a JFR recording is in progress, false otherwise + */ +public static native boolean isJFRRecordingStarted(); + +/** + * JFR.dump - Flush all the thread buffers and write out the global buffer. + * + */ +public static native void jfrDump(); + +/** + * Set JFR recording file name. + * + * @param fileName the file name for new JFR recording + * + * @return true on success, false on failure + */ +public static native boolean setJFRRecordingFileName(String fileName); + +/** + * Start JFR assuming this is after VM startup. + * + * @return 0 on success, -1 on failure + */ +public static native int startJFR(); + +/** + * Shut down JFR. + * + */ +public static native void stopJFR(); + /** * Trigger ExecutionSample JFR event on all Java threads. */ diff --git a/jcl/src/java.base/share/classes/openj9/internal/tools/attach/target/DiagnosticUtils.java b/jcl/src/java.base/share/classes/openj9/internal/tools/attach/target/DiagnosticUtils.java index e29957f39f3..045b6bf20ad 100644 --- a/jcl/src/java.base/share/classes/openj9/internal/tools/attach/target/DiagnosticUtils.java +++ b/jcl/src/java.base/share/classes/openj9/internal/tools/attach/target/DiagnosticUtils.java @@ -1,4 +1,4 @@ -/*[INCLUDE-IF Sidecar18-SE]*/ +/*[INCLUDE-IF JAVA_SPEC_VERSION >= 8]*/ /* * Copyright IBM Corp. and others 2019 * @@ -28,6 +28,9 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import java.util.Timer; +import java.util.TimerTask; +import java.util.concurrent.TimeUnit; import java.util.function.Function; import com.ibm.oti.vm.VM; @@ -45,28 +48,55 @@ * Common methods for the diagnostics tools * */ +@SuppressWarnings("nls") public class DiagnosticUtils { - private static final String FORMAT_PREFIX = " Format: "; //$NON-NLS-1$ + private static final String FORMAT_PREFIX = " Format: "; + private static final String SYNTAX_PREFIX = "Syntax : "; - @SuppressWarnings("nls") private static final String HEAP_DUMP_OPTION_HELP = " [request=] [opts=] []%n" + " Set optional request= and opts= -Xdump options. The order of the parameters does not matter.%n"; - @SuppressWarnings("nls") private static final String OTHER_DUMP_OPTION_HELP = " [request=] []%n" + " Set optional request= -Xdump options. The order of the parameters does not matter.%n"; - @SuppressWarnings("nls") private static final String HEAPSYSTEM_DUMP_OPTION_HELP = " system and heap dumps default to request=exclusive+prepwalk rather than the -Xdump::defaults setting.%n"; - @SuppressWarnings("nls") private static final String GENERIC_DUMP_OPTION_HELP = " is optional, otherwise a default path/name is used.%n" + " Relative paths are resolved to the target's working directory.%n" + " The dump agent may choose a different file path if the requested file exists.%n"; +/*[IF JFR_SUPPORT]*/ + private static String jfrRecordingFileName = "defaultJ9recording.jfr"; + private static final String JFR_START_OPTION_HELP = + " [options]%n" + + "%n" + + "Options:%n" + + "%n" + + "duration (Optional) Length of time to record. Note that 0s means forever.%n" + + " (INTEGER followed by 's' for seconds 'm' for minutes or 'h' for hours)%n" + + "%n" + + "filename (Optional) Name of the file to which the flight recording data is%n" + + " written when the recording is stopped.%n"; + + private static final String JFR_STOP_OPTION_HELP = + " [options]%n" + + "%n" + + "Options:%n" + + "%n" + + "filename (Optional) Name of the file to which the recording is written%n" + + " when the recording is stopped.%n"; + + private static final String JFR_DUMP_OPTION_HELP = + " [options]%n" + + "%n" + + "Options:%n" + + "%n" + + "filename (Optional) Name of the file to which the flight recording data is written.%n"; +/*[ENDIF] JFR_SUPPORT */ + /** * Command strings for executeDiagnosticCommand() */ @@ -74,63 +104,72 @@ public class DiagnosticUtils { /** * Print help text */ - private static final String DIAGNOSTICS_HELP = "help"; //$NON-NLS-1$ + private static final String DIAGNOSTICS_HELP = "help"; /** * Run Get the stack traces and other thread information. */ - private static final String DIAGNOSTICS_THREAD_PRINT = "Thread.print"; //$NON-NLS-1$ + private static final String DIAGNOSTICS_THREAD_PRINT = "Thread.print"; /*[IF CRAC_SUPPORT]*/ /** * Generate a checkpoint via CRIUSupport using a compatability name. */ - private static final String DIAGNOSTICS_JDK_CHECKPOINT = "JDK.checkpoint"; //$NON-NLS-1$ + private static final String DIAGNOSTICS_JDK_CHECKPOINT = "JDK.checkpoint"; /*[ENDIF] CRAC_SUPPORT */ /** * Run System.gc(); */ - private static final String DIAGNOSTICS_GC_RUN = "GC.run"; //$NON-NLS-1$ + private static final String DIAGNOSTICS_GC_RUN = "GC.run"; /** * Get the heap object statistics. */ - private static final String DIAGNOSTICS_GC_CLASS_HISTOGRAM = "GC.class_histogram"; //$NON-NLS-1$ + private static final String DIAGNOSTICS_GC_CLASS_HISTOGRAM = "GC.class_histogram"; /** * Commands to generate dumps of various types */ - private static final String DIAGNOSTICS_DUMP_HEAP = "Dump.heap"; //$NON-NLS-1$ - private static final String DIAGNOSTICS_GC_HEAP_DUMP = "GC.heap_dump"; //$NON-NLS-1$ - private static final String DIAGNOSTICS_DUMP_JAVA = "Dump.java"; //$NON-NLS-1$ - private static final String DIAGNOSTICS_DUMP_SNAP = "Dump.snap"; //$NON-NLS-1$ - private static final String DIAGNOSTICS_DUMP_SYSTEM = "Dump.system"; //$NON-NLS-1$ + private static final String DIAGNOSTICS_DUMP_HEAP = "Dump.heap"; + private static final String DIAGNOSTICS_GC_HEAP_DUMP = "GC.heap_dump"; + private static final String DIAGNOSTICS_DUMP_JAVA = "Dump.java"; + private static final String DIAGNOSTICS_DUMP_SNAP = "Dump.snap"; + private static final String DIAGNOSTICS_DUMP_SYSTEM = "Dump.system"; + +/*[IF JFR_SUPPORT]*/ + /** + * Commands for JFR start, stop and dump + */ + private static final String DIAGNOSTICS_JFR_START = "JFR.start"; + private static final String DIAGNOSTICS_JFR_DUMP = "JFR.dump"; + private static final String DIAGNOSTICS_JFR_STOP = "JFR.stop"; +/*[ENDIF] JFR_SUPPORT */ /** * Get JVM statistics */ - private static final String DIAGNOSTICS_STAT_CLASS = "jstat.class"; //$NON-NLS-1$ + private static final String DIAGNOSTICS_STAT_CLASS = "jstat.class"; // load JVMTI agent - private static final String DIAGNOSTICS_LOAD_JVMTI_AGENT = "JVMTI.agent_load"; //$NON-NLS-1$ + private static final String DIAGNOSTICS_LOAD_JVMTI_AGENT = "JVMTI.agent_load"; /** * Key for the command sent to executeDiagnosticCommand() */ - public static final String COMMAND_STRING = "command_string"; //$NON-NLS-1$ + public static final String COMMAND_STRING = "command_string"; /** * Use this to separate arguments in a diagnostic command string. */ - public static final String DIAGNOSTICS_OPTION_SEPARATOR = ","; //$NON-NLS-1$ + public static final String DIAGNOSTICS_OPTION_SEPARATOR = ","; /** * Report live or all heap objects. */ - private static final String ALL_OPTION = "all"; //$NON-NLS-1$ - private static final String LIVE_OPTION = "live"; //$NON-NLS-1$ - private static final String THREAD_LOCKED_SYNCHRONIZERS_OPTION = "-l"; //$NON-NLS-1$ + private static final String ALL_OPTION = "all"; + private static final String LIVE_OPTION = "live"; + private static final String THREAD_LOCKED_SYNCHRONIZERS_OPTION = "-l"; private static final Map> commandTable; private static final Map helpTable; @@ -184,14 +223,14 @@ public static String makeJcmdCommand(String[] options, int skip) { * @return command result or diagnostic information in case of error */ static DiagnosticProperties executeDiagnosticCommand(String diagnosticCommand) { - IPC.logMessage("executeDiagnosticCommand: ", diagnosticCommand); //$NON-NLS-1$ + IPC.logMessage("executeDiagnosticCommand: ", diagnosticCommand); DiagnosticProperties result; String[] commandRoot = diagnosticCommand.split(DiagnosticUtils.DIAGNOSTICS_OPTION_SEPARATOR); Function cmd = commandTable.get(commandRoot[0]); if (null == cmd) { result = DiagnosticProperties.makeStatusProperties(true, - "Command " + diagnosticCommand + " not recognized"); //$NON-NLS-1$ //$NON-NLS-2$ + "Command " + diagnosticCommand + " not recognized"); } else { result = cmd.apply(diagnosticCommand); result.put(DiagnosticUtils.COMMAND_STRING, diagnosticCommand); @@ -214,14 +253,14 @@ private static DiagnosticProperties getHeapStatistics(String diagnosticCommand) } } if (invalidArg) { - result = DiagnosticProperties.makeErrorProperties("Command not recognized: " + diagnosticCommand); //$NON-NLS-1$ + result = DiagnosticProperties.makeErrorProperties("Command not recognized: " + diagnosticCommand); } else { if (doLive) { runGC(); } String hcsi = getHeapClassStatisticsImpl(); String lineSeparator = System.lineSeparator(); - final String unixLineSeparator = "\n"; //$NON-NLS-1$ + final String unixLineSeparator = "\n"; if (!unixLineSeparator.equals(lineSeparator)) { hcsi = hcsi.replace(unixLineSeparator, lineSeparator); } @@ -243,7 +282,7 @@ private static DiagnosticProperties getThreadInfo(String diagnosticCommand) { String option = parts[1]; if (option.startsWith(THREAD_LOCKED_SYNCHRONIZERS_OPTION)) { if ((THREAD_LOCKED_SYNCHRONIZERS_OPTION.length() == option.length()) /* exact match */ - || option.toLowerCase().equals(THREAD_LOCKED_SYNCHRONIZERS_OPTION + "=true")) { //$NON-NLS-1$ + || option.toLowerCase().equals(THREAD_LOCKED_SYNCHRONIZERS_OPTION + "=true")) { addSynchronizers = true; } } else { @@ -251,21 +290,21 @@ private static DiagnosticProperties getThreadInfo(String diagnosticCommand) { } } if (!okay) { - result = DiagnosticProperties.makeErrorProperties("Command not recognized: " + diagnosticCommand); //$NON-NLS-1$ + result = DiagnosticProperties.makeErrorProperties("Command not recognized: " + diagnosticCommand); } else { StringWriter buffer = new StringWriter(2000); PrintWriter bufferPrinter = new PrintWriter(buffer); - bufferPrinter.println(System.getProperty("java.vm.info")); //$NON-NLS-1$ + bufferPrinter.println(System.getProperty("java.vm.info")); bufferPrinter.println(); ThreadInfoBase[] threadInfoBases = dumpAllThreadsImpl(true, addSynchronizers, Integer.MAX_VALUE); for (ThreadInfoBase currentThreadInfoBase : threadInfoBases) { bufferPrinter.print(currentThreadInfoBase.toString()); if (addSynchronizers) { LockInfoBase[] lockedSynchronizers = currentThreadInfoBase.getLockedSynchronizers(); - bufferPrinter.printf("%n\tLocked ownable synchronizers: %d%n", //$NON-NLS-1$ + bufferPrinter.printf("%n\tLocked ownable synchronizers: %d%n", Integer.valueOf(lockedSynchronizers.length)); for (LockInfoBase currentLockedSynchronizer : lockedSynchronizers) { - bufferPrinter.printf("\t- %s%n", currentLockedSynchronizer.toString()); //$NON-NLS-1$ + bufferPrinter.printf("\t- %s%n", currentLockedSynchronizer.toString()); } } bufferPrinter.println(); @@ -279,20 +318,20 @@ private static DiagnosticProperties getThreadInfo(String diagnosticCommand) { private static DiagnosticProperties doDump(String diagnosticCommand) { DiagnosticProperties result = null; String[] parts = diagnosticCommand.split(DIAGNOSTICS_OPTION_SEPARATOR); - IPC.logMessage("doDump: ", diagnosticCommand); //$NON-NLS-1$ + IPC.logMessage("doDump: ", diagnosticCommand); if (parts.length == 0 || parts.length > 4) { // The argument could be just Dump command which is going to use default configurations like -Xdump, // or there is an optional path/name argument for the dump file generated, plus `request=` and `opts=` options. - result = DiagnosticProperties.makeErrorProperties("Error: wrong number of arguments"); //$NON-NLS-1$ + result = DiagnosticProperties.makeErrorProperties("Error: wrong number of arguments"); } else { - String dumpType = ""; //$NON-NLS-1$ + String dumpType = ""; /* handle legacy form of Dump.heap for compatibility with reference implementation */ if (DIAGNOSTICS_GC_HEAP_DUMP.equals(parts[0])) { - dumpType = "heap"; //$NON-NLS-1$ + dumpType = "heap"; } else { - String[] dumpCommandAndType = parts[0].split("\\."); //$NON-NLS-1$ + String[] dumpCommandAndType = parts[0].split("\\."); if (dumpCommandAndType.length != 2) { - result = DiagnosticProperties.makeErrorProperties(String.format("Error: invalid command %s", parts[0])); //$NON-NLS-1$ + result = DiagnosticProperties.makeErrorProperties(String.format("Error: invalid command %s", parts[0])); } else { dumpType = dumpCommandAndType[1]; } @@ -302,13 +341,13 @@ private static DiagnosticProperties doDump(String diagnosticCommand) { request.append(dumpType); String filePath = null; boolean foundRequest = false; - boolean heapDump = "heap".equals(dumpType); //$NON-NLS-1$ - boolean systemDump = "system".equals(dumpType); //$NON-NLS-1$ - String separator = ":"; //$NON-NLS-1$ + boolean heapDump = "heap".equals(dumpType); + boolean systemDump = "system".equals(dumpType); + String separator = ":"; for (int i = 1; i < parts.length; i++) { String option = parts[i]; - boolean isRequest = option.startsWith("request="); //$NON-NLS-1$ - boolean isOpts = option.startsWith("opts="); //$NON-NLS-1$ + boolean isRequest = option.startsWith("request="); + boolean isOpts = option.startsWith("opts="); if (isRequest || isOpts) { if (!heapDump && isOpts) { // opts= are only valid for heap dumps @@ -320,26 +359,26 @@ private static DiagnosticProperties doDump(String diagnosticCommand) { } } else { if (filePath != null) { - result = DiagnosticProperties.makeErrorProperties("Error: second found, \"" //$NON-NLS-1$ - + option + "\" after \"" + filePath + "\""); //$NON-NLS-1$ //$NON-NLS-2$ + result = DiagnosticProperties.makeErrorProperties("Error: second found, \"" + + option + "\" after \"" + filePath + "\""); break; } - String fileDirective = (systemDump && IPC.isZOS) ? "dsn=" : "file="; //$NON-NLS-1$ //$NON-NLS-2$ + String fileDirective = (systemDump && IPC.isZOS) ? "dsn=" : "file="; request.append(separator).append(fileDirective).append(option); filePath = option; } - separator = ","; //$NON-NLS-1$ + separator = ","; } if (result == null) { if (!foundRequest && (systemDump || heapDump)) { // set default options if the user didn't specify - request.append(separator).append("request=exclusive+prepwalk"); //$NON-NLS-1$ + request.append(separator).append("request=exclusive+prepwalk"); } try { - String actualDumpFile = triggerDumpsImpl(request.toString(), dumpType + "DumpToFile"); //$NON-NLS-1$ - result = DiagnosticProperties.makeStringResult("Dump written to " + actualDumpFile); //$NON-NLS-1$ + String actualDumpFile = triggerDumpsImpl(request.toString(), dumpType + "DumpToFile"); + result = DiagnosticProperties.makeStringResult("Dump written to " + actualDumpFile); } catch (InvalidDumpOptionExceptionBase e) { - IPC.logMessage("doDump exception: ", e.getMessage()); //$NON-NLS-1$ + IPC.logMessage("doDump exception: ", e.getMessage()); result = DiagnosticProperties.makeExceptionProperties(e); } } @@ -348,6 +387,137 @@ private static DiagnosticProperties doDump(String diagnosticCommand) { return result; } +/*[IF JFR_SUPPORT]*/ + private static long convertToMilliseconds(String timeValue) { + long timeInMilli = 0L; + + // extract the numeric part and the time unit + String numericPart = timeValue.replaceAll("[^0-9]", ""); + + // convert the unit to lowercase for consistency + String timeUnit = timeValue.replaceAll("[0-9]", "").toLowerCase(); + + // parse the numeric part + long time = Long.parseLong(numericPart); + + // convert to milliseconds based on the unit + switch (timeUnit) { + case "s": + timeInMilli = TimeUnit.SECONDS.toMillis(time); + break; + case "m": + timeInMilli = TimeUnit.MINUTES.toMillis(time); + break; + case "h": + timeInMilli = TimeUnit.HOURS.toMillis(time); + break; + case "d": + timeInMilli = TimeUnit.DAYS.toMillis(time); + break; + default: + // no unit or unrecognized unit, assume milliseconds + timeInMilli = time; + break; + } + return timeInMilli; + } + + private static long parseTimeParameter(String paramName, String[] parameters) { + for (String param : parameters) { + if (param.startsWith(paramName + "=")) { + int valueStart = param.indexOf("="); + if (valueStart != -1) { + return convertToMilliseconds(param.substring(valueStart + 1)); + } + } + } + return -1; + } + + private static String parseStringParameter(String paramName, String[] parameters, String defaultValue) { + for (String param : parameters) { + if (param.startsWith(paramName + "=")) { + int valueStart = param.indexOf("="); + if (valueStart != -1) { + return param.substring(valueStart + 1); + } + } + } + return defaultValue; + } + + private static DiagnosticProperties doJFR(String diagnosticCommand) { + DiagnosticProperties result = null; + + // split the command and arguments + String[] parts = diagnosticCommand.split(DIAGNOSTICS_OPTION_SEPARATOR); + IPC.logMessage("doJFR: ", diagnosticCommand); + + // ensure there's at least one part for the command + if (parts.length == 0) { + return DiagnosticProperties.makeErrorProperties("Error: No JFR command specified"); + } + + String command = parts[0].trim(); + String[] parameters = Arrays.copyOfRange(parts, 1, parts.length); + + String fileName = parseStringParameter("filename", parameters, null); + IPC.logMessage("doJFR: filename = ", fileName); + boolean setFileName = (fileName != null) && !fileName.isEmpty(); + if (setFileName) { + if (!VM.setJFRRecordingFileName(fileName)) { + return DiagnosticProperties.makeErrorProperties("setJFRRecordingFileName failed"); + } else { + jfrRecordingFileName = fileName; + } + } + + try { + if (command.equalsIgnoreCase(DIAGNOSTICS_JFR_START)) { + if (VM.isJFRRecordingStarted()) { + result = DiagnosticProperties.makeErrorProperties("One JFR recording is in progress [" + jfrRecordingFileName + "], only one recording is allowed at a time."); + } else { + VM.startJFR(); + long duration = parseTimeParameter("duration", parameters); + IPC.logMessage("doJFR: duration = " + duration); + if (duration > 0) { + Timer timer = new Timer(); + TimerTask jfrDumpTask = new TimerTask() { + public void run() { + VM.stopJFR(); + } + }; + timer.schedule(jfrDumpTask, duration); + } else { + // the recording is on until JFR.stop + } + result = DiagnosticProperties.makeStringResult("Start JFR recording to " + jfrRecordingFileName); + } + } else if (command.equalsIgnoreCase(DIAGNOSTICS_JFR_STOP)) { + if (VM.isJFRRecordingStarted()) { + VM.stopJFR(); + result = DiagnosticProperties.makeStringResult("Stop JFR recording, and dump all Java threads to " + jfrRecordingFileName); + } else { + result = DiagnosticProperties.makeErrorProperties("Could not stop recording [" + jfrRecordingFileName + "], run JFR.start first."); + } + } else if (command.equalsIgnoreCase(DIAGNOSTICS_JFR_DUMP)) { + if (VM.isJFRRecordingStarted()) { + VM.jfrDump(); + result = DiagnosticProperties.makeStringResult("Dump all Java threads to " + jfrRecordingFileName); + } else { + result = DiagnosticProperties.makeErrorProperties("Could not create a JFR recording [" + jfrRecordingFileName + "], run JFR.start first."); + } + } else { + result = DiagnosticProperties.makeErrorProperties("Command not recognized: " + command); + } + } catch (Exception e) { + result = DiagnosticProperties.makeErrorProperties("Error in JFR: " + e.getMessage()); + } + + return result; + } +/*[ENDIF] JFR_SUPPORT */ + private static native ThreadInfoBase[] dumpAllThreadsImpl(boolean lockedMonitors, boolean lockedSynchronizers, int maxDepth); @@ -357,19 +527,18 @@ private static DiagnosticProperties runGC() { } private static DiagnosticProperties getJstatClass(String diagnosticCommand) { - IPC.logMessage("jstat command : ", diagnosticCommand); //$NON-NLS-1$ + IPC.logMessage("jstat command : ", diagnosticCommand); StringWriter buffer = new StringWriter(100); PrintWriter bufferPrinter = new PrintWriter(buffer); - bufferPrinter.println("Class Loaded Class Unloaded"); //$NON-NLS-1$ + bufferPrinter.println("Class Loaded Class Unloaded"); // "Class Loaded".length = 12, "Class Unloaded".length = 14 - bufferPrinter.printf("%12d %14d%n", //$NON-NLS-1$ + bufferPrinter.printf("%12d %14d%n", Long.valueOf(ClassLoaderInfoBaseImpl.getLoadedClassCountImpl()), Long.valueOf(ClassLoaderInfoBaseImpl.getUnloadedClassCountImpl())); bufferPrinter.flush(); return DiagnosticProperties.makeStringResult(buffer.toString()); } - @SuppressWarnings("nls") private static DiagnosticProperties loadJVMTIAgent(String diagnosticCommand) { DiagnosticProperties result; String[] parts = diagnosticCommand.split(DIAGNOSTICS_OPTION_SEPARATOR); @@ -399,12 +568,12 @@ private static DiagnosticProperties doHelp(String diagnosticCommand) { /* print a list of commands */ commandTable.keySet().stream().sorted().forEach(s -> bufferPrinter.println(s)); } else if (parts.length == 2) { - String helpText = helpTable.getOrDefault(parts[1], "No help available"); //$NON-NLS-1$ - bufferPrinter.printf("%s: ", parts[1]); //$NON-NLS-1$ + String helpText = helpTable.getOrDefault(parts[1], "No help available"); + bufferPrinter.printf("%s: ", parts[1]); bufferPrinter.printf(helpText); } } else { - bufferPrinter.print("Invalid command: " + diagnosticCommand); //$NON-NLS-1$ + bufferPrinter.print("Invalid command: " + diagnosticCommand); } return DiagnosticProperties.makeStringResult(buffer.toString()); @@ -421,17 +590,15 @@ private static DiagnosticProperties doCheckpointJVM(String diagnosticCommand) { }); checkpointThread.start(); - return DiagnosticProperties.makeStringResult("JVM checkpoint requested"); //$NON-NLS-1$ + return DiagnosticProperties.makeStringResult("JVM checkpoint requested"); } /*[ENDIF] CRAC_SUPPORT */ /* Help strings for the jcmd utilities */ - @SuppressWarnings("nls") private static final String DIAGNOSTICS_HELP_HELP = "Show help for a command%n" + FORMAT_PREFIX + " help %n" + " If no command is supplied, print the list of available commands on the target JVM.%n"; - @SuppressWarnings("nls") private static final String DIAGNOSTICS_GC_CLASS_HISTOGRAM_HELP = "Obtain heap information about a Java process%n" + FORMAT_PREFIX + DIAGNOSTICS_GC_CLASS_HISTOGRAM + " [options]%n" + " Options:%n" @@ -439,45 +606,53 @@ private static DiagnosticProperties doCheckpointJVM(String diagnosticCommand) { + " live : include all objects after a global GC collection%n" + "NOTE: this utility might significantly affect the performance of the target VM.%n"; - @SuppressWarnings("nls") private static final String DIAGNOSTICS_GC_RUN_HELP = "Run the garbage collector.%n" + FORMAT_PREFIX + DIAGNOSTICS_GC_RUN + "%n" + "NOTE: this utility might significantly affect the performance of the target VM.%n"; - @SuppressWarnings("nls") private static final String DIAGNOSTICS_THREAD_PRINT_HELP = "List thread information.%n" + FORMAT_PREFIX + DIAGNOSTICS_THREAD_PRINT + " [options]%n" + " Options: -l : print information about ownable synchronizers%n"; - private static final String DIAGNOSTICS_DUMP_HEAP_HELP = "Create a heap dump.%n" //$NON-NLS-1$ + private static final String DIAGNOSTICS_DUMP_HEAP_HELP = "Create a heap dump.%n" + FORMAT_PREFIX + DIAGNOSTICS_DUMP_HEAP + HEAP_DUMP_OPTION_HELP + HEAPSYSTEM_DUMP_OPTION_HELP + GENERIC_DUMP_OPTION_HELP - + DIAGNOSTICS_GC_HEAP_DUMP + " is an alias for " + DIAGNOSTICS_DUMP_HEAP + "%n"; //$NON-NLS-1$ //$NON-NLS-2$ + + DIAGNOSTICS_GC_HEAP_DUMP + " is an alias for " + DIAGNOSTICS_DUMP_HEAP + "%n"; - private static final String DIAGNOSTICS_DUMP_JAVA_HELP = "Create a javacore file.%n" //$NON-NLS-1$ + private static final String DIAGNOSTICS_DUMP_JAVA_HELP = "Create a javacore file.%n" + FORMAT_PREFIX + DIAGNOSTICS_DUMP_JAVA + OTHER_DUMP_OPTION_HELP + GENERIC_DUMP_OPTION_HELP; - private static final String DIAGNOSTICS_DUMP_SNAP_HELP = "Dump the snap trace buffer.%n" //$NON-NLS-1$ + private static final String DIAGNOSTICS_DUMP_SNAP_HELP = "Dump the snap trace buffer.%n" + FORMAT_PREFIX + DIAGNOSTICS_DUMP_SNAP + OTHER_DUMP_OPTION_HELP + GENERIC_DUMP_OPTION_HELP; - private static final String DIAGNOSTICS_DUMP_SYSTEM_HELP = "Create a native core file.%n" //$NON-NLS-1$ + private static final String DIAGNOSTICS_DUMP_SYSTEM_HELP = "Create a native core file.%n" + FORMAT_PREFIX + DIAGNOSTICS_DUMP_SYSTEM + OTHER_DUMP_OPTION_HELP + HEAPSYSTEM_DUMP_OPTION_HELP + GENERIC_DUMP_OPTION_HELP; - private static final String DIAGNOSTICS_JSTAT_CLASS_HELP = "Show JVM classloader statistics.%n" //$NON-NLS-1$ - + FORMAT_PREFIX + DIAGNOSTICS_STAT_CLASS + "%n" //$NON-NLS-1$ - + "NOTE: this utility might significantly affect the performance of the target VM.%n"; //$NON-NLS-1$ + private static final String DIAGNOSTICS_JSTAT_CLASS_HELP = "Show JVM classloader statistics.%n" + + FORMAT_PREFIX + DIAGNOSTICS_STAT_CLASS + "%n" + + "NOTE: this utility might significantly affect the performance of the target VM.%n"; - @SuppressWarnings("nls") private static final String DIAGNOSTICS_LOAD_JVMTI_AGENT_HELP = "Load JVMTI agent.%n" + FORMAT_PREFIX + DIAGNOSTICS_LOAD_JVMTI_AGENT + " []%n" + " agentLibrary: the absolute path of the agent%n" + " agent option: (Optional) the agent option string%n"; /*[IF CRAC_SUPPORT]*/ - private static final String DIAGNOSTICS_JDK_CHECKPOINT_HELP = "Produce a JVM checkpoint via CRIUSupport.%n" //$NON-NLS-1$ - + FORMAT_PREFIX + DIAGNOSTICS_JDK_CHECKPOINT + "%n" //$NON-NLS-1$ - + "NOTE: this utility might significantly affect the performance of the target VM.%n"; //$NON-NLS-1$ + private static final String DIAGNOSTICS_JDK_CHECKPOINT_HELP = "Produce a JVM checkpoint via CRIUSupport.%n" + + FORMAT_PREFIX + DIAGNOSTICS_JDK_CHECKPOINT + "%n" + + "NOTE: this utility might significantly affect the performance of the target VM.%n"; /*[ENDIF] CRAC_SUPPORT */ +/*[IF JFR_SUPPORT]*/ + private static final String DIAGNOSTICS_JFR_START_HELP = "Start a new Recording%n%n" + + SYNTAX_PREFIX + DIAGNOSTICS_JFR_START + JFR_START_OPTION_HELP; + + private static final String DIAGNOSTICS_JFR_DUMP_HELP = "Dump a JFR recording to file%n%n" + + SYNTAX_PREFIX + DIAGNOSTICS_JFR_DUMP + JFR_DUMP_OPTION_HELP; + + private static final String DIAGNOSTICS_JFR_STOP_HELP = "Stop a JFR recording%n%n" + + SYNTAX_PREFIX + FORMAT_PREFIX + DIAGNOSTICS_JFR_STOP + JFR_STOP_OPTION_HELP; +/*[ENDIF] JFR_SUPPORT */ + /* Initialize the command and help text tables */ static { IDCacheInitializer.init(); @@ -523,5 +698,16 @@ private static DiagnosticProperties doCheckpointJVM(String diagnosticCommand) { helpTable.put(DIAGNOSTICS_JDK_CHECKPOINT, DIAGNOSTICS_JDK_CHECKPOINT_HELP); } /*[ENDIF] CRAC_SUPPORT */ + +/*[IF JFR_SUPPORT]*/ + commandTable.put(DIAGNOSTICS_JFR_START, DiagnosticUtils::doJFR); + helpTable.put(DIAGNOSTICS_JFR_START, DIAGNOSTICS_JFR_START_HELP); + + commandTable.put(DIAGNOSTICS_JFR_DUMP, DiagnosticUtils::doJFR); + helpTable.put(DIAGNOSTICS_JFR_DUMP, DIAGNOSTICS_JFR_DUMP_HELP); + + commandTable.put(DIAGNOSTICS_JFR_STOP, DiagnosticUtils::doJFR); + helpTable.put(DIAGNOSTICS_JFR_STOP, DIAGNOSTICS_JFR_STOP_HELP); +/*[ENDIF] JFR_SUPPORT */ } } diff --git a/runtime/jcl/common/com_ibm_oti_vm_VM.cpp b/runtime/jcl/common/com_ibm_oti_vm_VM.cpp index cc21f89dd72..f69657f1837 100644 --- a/runtime/jcl/common/com_ibm_oti_vm_VM.cpp +++ b/runtime/jcl/common/com_ibm_oti_vm_VM.cpp @@ -194,8 +194,85 @@ Java_com_ibm_oti_vm_VM_isJVMInSingleThreadedMode(JNIEnv *env, jclass unused) } #if defined(J9VM_OPT_JFR) +jboolean JNICALL +Java_com_ibm_oti_vm_VM_isJFRRecordingStarted(JNIEnv *env, jclass unused) +{ + J9JavaVM *vm = ((J9VMThread *)env)->javaVM; + + return vm->internalVMFunctions->isJFRRecordingStarted(vm) ? JNI_TRUE : JNI_FALSE; +} + +void JNICALL +Java_com_ibm_oti_vm_VM_jfrDump(JNIEnv *env, jclass unused) +{ + J9VMThread *currentThread = (J9VMThread *)env; + J9JavaVM *vm = currentThread->javaVM; + J9InternalVMFunctions *vmFuncs = vm->internalVMFunctions; + + vmFuncs->internalEnterVMFromJNI(currentThread); + vmFuncs->acquireExclusiveVMAccess(currentThread); + + vmFuncs->jfrDump(currentThread, FALSE); + + vmFuncs->releaseExclusiveVMAccess(currentThread); + vmFuncs->internalExitVMToJNI(currentThread); +} + +jboolean JNICALL +Java_com_ibm_oti_vm_VM_setJFRRecordingFileName(JNIEnv *env, jclass unused, jstring fileNameString) +{ + J9VMThread *currentThread = (J9VMThread *)env; + J9JavaVM *vm = currentThread->javaVM; + J9InternalVMFunctions *vmFuncs = vm->internalVMFunctions; + jboolean result = JNI_FALSE; + + vmFuncs->internalEnterVMFromJNI(currentThread); + j9object_t fileNameObject = J9_JNI_UNWRAP_REFERENCE(fileNameString); + char *fileName = vmFuncs->copyStringToUTF8WithMemAlloc(currentThread, fileNameObject, J9_STR_NULL_TERMINATE_RESULT, "", 0, NULL, 0, NULL); + if (NULL == fileName) { + vmFuncs->setNativeOutOfMemoryError(currentThread, 0, 0); + } else { + result = vmFuncs->setJFRRecordingFileName(vm, fileName); + } + vmFuncs->internalExitVMToJNI(currentThread); + + return result; +} + +jint JNICALL +Java_com_ibm_oti_vm_VM_startJFR(JNIEnv *env, jclass unused) +{ + jint rc = JNI_OK; + J9VMThread *currentThread = (J9VMThread *)env; + J9JavaVM *vm = currentThread->javaVM; + J9InternalVMFunctions *vmFuncs = vm->internalVMFunctions; + + vmFuncs->internalEnterVMFromJNI(currentThread); + /* this is to initalize JFR late after VM startup */ + rc = vmFuncs->initializeJFR(vm, TRUE); + vmFuncs->internalExitVMToJNI(currentThread); + + return rc; +} + void JNICALL -Java_com_ibm_oti_vm_VM_triggerExecutionSample(JNIEnv *env, jclass unused) { +Java_com_ibm_oti_vm_VM_stopJFR(JNIEnv *env, jclass unused) +{ + J9VMThread *currentThread = (J9VMThread *)env; + J9JavaVM *vm = currentThread->javaVM; + J9InternalVMFunctions *vmFuncs = vm->internalVMFunctions; + + vmFuncs->internalEnterVMFromJNI(currentThread); + vmFuncs->acquireExclusiveVMAccess(currentThread); + vmFuncs->jfrDump(currentThread, TRUE); + vmFuncs->releaseExclusiveVMAccess(currentThread); + vmFuncs->tearDownJFR(vm); + vmFuncs->internalExitVMToJNI(currentThread); +} + +void JNICALL +Java_com_ibm_oti_vm_VM_triggerExecutionSample(JNIEnv *env, jclass unused) +{ J9VMThread *currentThread = (J9VMThread *)env; J9JavaVM *vm = currentThread->javaVM; J9InternalVMFunctions *vmFuncs = vm->internalVMFunctions; diff --git a/runtime/jcl/exports.cmake b/runtime/jcl/exports.cmake index 15b67b3aba5..c765b9da1a4 100644 --- a/runtime/jcl/exports.cmake +++ b/runtime/jcl/exports.cmake @@ -689,6 +689,11 @@ endif() if(J9VM_OPT_JFR) omr_add_exports(jclse + Java_com_ibm_oti_vm_VM_isJFRRecordingStarted + Java_com_ibm_oti_vm_VM_jfrDump + Java_com_ibm_oti_vm_VM_setJFRRecordingFileName + Java_com_ibm_oti_vm_VM_startJFR + Java_com_ibm_oti_vm_VM_stopJFR Java_com_ibm_oti_vm_VM_triggerExecutionSample Java_jdk_jfr_internal_JVM_registerNatives Java_jdk_jfr_internal_JVM_markChunkFinal diff --git a/runtime/jcl/uma/jfr_exports.xml b/runtime/jcl/uma/jfr_exports.xml index 78b93f86ab3..1e40b476670 100644 --- a/runtime/jcl/uma/jfr_exports.xml +++ b/runtime/jcl/uma/jfr_exports.xml @@ -20,6 +20,11 @@ OpenJDK Assembly Exception [2]. SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0 --> + + + + + diff --git a/runtime/metadata.blob b/runtime/metadata.blob new file mode 100644 index 00000000000..07fdb8ad3d6 --- /dev/null +++ b/runtime/metadata.blob @@ -0,0 +1,2180 @@ +‡ +Lock ClassGC WhenMemoryProtocol Versionjdk.DoubleFlag1461 +descriptor validFrom +youngSpaceMinimum Heap Size lockClass Serial NumberAllocated (direct)1454CPU Time Stamp Counterjdk.types.ReferenceType1453wastedPhysical MemoryframesthresholdPercentagejdk.jfr.DataAmount:Extra information specific to G1 Young Garbage Collections12146831467jdk.types.SweepId4size51465reserved146467146389"G1 Evacuation Statistics for Young peakTimeSpentCWhether further biasing for instances of this class will be allowed Chunk HeaderallocationRegionsobject Data Amount%Class whose biased locks were revokedjdk.ZThreadPhaseTotal CapacityTenuring Threshold14841482smallChunksTotalSizeisExplicitGCConcurrentLimit running time of eventActive ThreadsresultrecordingDurationBCurrent IHOP threshold in percent of the internal target occupancyvalidationCounterYoung Garbage Collection+Revoked biases for all instances of a classjdk.OldGarbageCollection"Number of incoming bits per second DirectoryrecentMutatorDuration committedaddressClass Parked On jdk.ClassLoad Old Value truncatedEnabled1493-Target for runtime vs garbage collection time14921491Network InterfacefastTimeFrequency14881486 +objectSize Stack Trace1Time stopped because of GC during last time sliceunallocatedCapacity +validUntilinfinityLast Known Heap Usagejdk.DumpReasonCommitted End AddressStart Code HeapKData could not be copied out from a buffer, typically because of contentionPrediction Activeempty#Loader Constraints Table StatisticsGC Worker IdentifierUSum of all the times in which Java execution was paused during the garbage collection endOfFilepayloadgcTime3Percentage, represented as a number between 0 and 1EMemory related evacuation statistics during GC for the old generation'Garbage collection performed by the JVMjdk.ObjectAllocationOutsideTLAB%Number of context switches per second +CPU SharesExceptions CreatedrecentMutatorAllocationSizeCompilerconcurrentGCThreads Peak ThreadsrunningThreadCount GC ThresholdJVM shutting down ExperimentaltenuringThresholdGUpper limit for the age of how old objects to keep in the survivor areajdk.types.G1YCTypebucketCountVarianceObject ReferencesClass of object waited onStatejdk.TLSHandshakejdk.GCPhaseParalleljdk.StringFlag heapSpaceminBlockLengthCode Cache StatisticsEvent IdlocaleAllocation Regions oldCollector6Whether a dynamic number of GC threads are used or notDisabled Explicit GC File ReadaccumulatedCountproviderrootcompilerAge CPU Usage Old SpaceMemory Address chunkSize initialSizereservedTopAddressOld Garbage CollectionMethod Profiling Sample Native:Number of concurrent threads to use for garbage collection Class Count +throwables totalSizeTLAB Refill Waste LimitG1 Adaptive IHOP StatisticsCutoffNumber of Regions jdk.ShutdownEnd address of the space +sweptCount(Protection Domain Cache Table StatisticstDescribes the detection of an uncommon situation in a compiled method which may lead to deoptimization of the method Instructioncores Long Flag Content TypeVirtualization InformationusesCompressedOopsperiod GC Time RatioredefinedClassbyteDeserializationCompiler ConfigurationstandardCompileCount/The configuration of the garbage collected heapjdk.types.FrameType codeBlobTypeJNI Critical ThreadsAllocation in new TLAB!jdk.SafepointStateSynchronizationHeap Address Size (in bits)jdk.ContainerMemoryUsageSpecialized Chunks Total SizepredictedAllocationRate ZGC UnmapWasted (failure) minTLABSizejava.lang.StringInitiating Class Loader +Frame TyperecordingStart +PercentageUnloaded Class cpuSystemTimeZGC Statistics CounterEnding address of the moduleNew Java ThreadInvalidated Compilations superTypeSpecialized Chunks5Extra information specific to Old Garbage CollectionsInitial Tenuring ThresholdMaximum Heap Size monitorClasspidjdk.BiasedLockClassRevocation!jdk.MetaspaceChunkFreeListSummary cipherSuite JIT Restartjdk.CPUTimeStampCounterflushIdCounterjdk.SystemProcessCertificate PositionJava Thread Startjdk.types.FlagValueOrigin JVM ShutdownClass Loading StatisticsTimeout +Code CacheAllocation TimebucketCountMaximum Small ChunkscpuÑThe relative weight of the sample. Aggregating the weights for a large number of samples, for a particular class, thread or stack trace, gives a statistically accurate representation of the allocation pressurebucketCountAverage200GC Phase Pause Level 3Non-profiled SizeGC Phase Pause Level 4201GC Phase Pause Level 1202jdk.BiasedLockRevocationGC Phase Pause Level 2203204jdk.types.Module205jdk.GCPhaseConcurrent8Certificate position in chain of trust, 1 = trust anchor206Recent Mutator Allocation Size207208209Inflation Cause metadataTypeReserved CPU Quota#jdk.ShenandoahHeapRegionStateChange +Full Count Profiled SizecauseYNumber of times that user memory requests in the container have exceeded the memory limitCode Blob TypeObject Allocation Sample Remote Host jdk.jfr.Name210211212213Region End WastedtieredCompilation Peer HostMetaspace Object TypeException Statistics Compile Phase-Total count of processed references during GCjdk.NativeMethodSamplejdk.settings.PeriodTotal lost amount for threadhAmount of physical memory and swap space, in bytes, that is currently allocated in the current container +jvmVersionjdk.jfr.TransitionToRevoked bias of object recordingIdtlabSize Compilation*Container memory usage related informationString Flag ChangedAmount lost datarActivation of Reserved Stack Area caused by stack overflow with ReservedStackAccess annotated method in call stack +memoryUsedBlock IO Request CountUnmappedstatejdk.ZAllocationStalljdk.X509Validationjdk.DirectBufferStatistics +Bytes Readjdk.types.JavaMonitorAddress Filter StatusHeapEvacuation InformationJCharacteristics and descriptions of the processor(s) the JVM is running on>Initial age limit for how old objects to keep in survivor areajdk.jfr.TransitionFromjdk.types.CalleeMethodPrevious OwnermaxTenuringThresholdClass Modification CountCPU Loadjdk.jfr.Percentage Timestampjdk.types.OldObjectRootTypeClass Loader StatisticsCPU System Time osVersionObject DescriptionContainer Configuration containerTypeInitial System Property tenuringAge Entry CountunmappedParallel GC Threads Memory LimitJAllocation rate of the mutator in the most recent interval in bytes/second Socket Write6The total number of threads at the start of safe point Operating system process startedJava Class Loader Total Threads Uncommittedjdk.jfr.Frequency!The object is this many hops awaysourceDouble Flag Changed Size of arrayG1 MMU InformationrequiredModuleTenuring DistributionAverage Bucket Count Process Startweight filterStatusKey Type mediumChunksContainer IO Usage]Total available run-time allowed during each scheduling period for all tasks in the containerPredicted Marking DurationRequired Modulejdk.SafepointCleanup UnallocatedPeak Time Fraction Sweepjdk.ExceptionStatisticsJava Development Kitjdk.ObjectAllocationInNewTLABGC Phase Concurrent Level 1cSetUsedBefore Method NameIf end of stream was reached +Object AgeupdaterEden Used Size_Total size of all allocated metaspace blocks for hidden classes (each chunk has several blocks) dataSpace&A set of container specific attributesjvmUser&Container IO usage related informationstartTotal Object Size Safepoint7Information about a Shenandoah heap region state changeshorttime-Total memory occupied by objects within PLABsGC ConfigurationJInternal target old generation occupancy to reach at the start of mixed GC defaultValueMetaspace SummaryModules+Description of JVM and the Java applicationCount jdk.IntFlag'Bytes allocated by objects in the spaceœObject survived scavenge and was copied to a new Promotion Local Allocation Buffer (PLAB). Supported GCs are Parallel Scavange, G1 and CMS with Parallel New. Due to promotion being done in parallel an object might be reported multiple times as the GC threads race to copy all objects. Transition To7How many items were added since last event (per second)Networkvalue-1value-0value-2jdk.ObjectCount.Information about a G1 heap region type changejdk.settings.ThrottleTime Spent Sweepingjdk.ZRelocationSetInt Flag Changed Stack FramessuccededSystem ProcessMetaspace Allocation FailureObject#jdk.types.ShenandoahHeapRegionState Line Number cSetRegionsjdk.jfr.Periodthrottlejdk.types.GCThresholdUpdater Object Count timeSliceProcess Identifier profiledSize +Java ClassHidden Class LoaderSemantic meaning of a valueprotocolVersionPending GC IdentifierException MessageJava Thread Name Current old generation occupancyjdk.X509Certificate$Number of bytes read from the socketG1 Heap Region Informationjdk.ContainerConfiguration7Statistics related to current adaptive IHOP calculationExecution of a VM OperationTypejdk.GCPhasePauseBiased Lock Self Revocationcharjdk.ClassDefineNetwork Utilization jdk.jfr.Eventjdk.types.MetaspaceSizescpuSlicePeriod@The configuration of the Thread Local Allocation Buffers (TLABs)Deoptimization Reason Setting Name +Skip ValueCPU Throttled Timejdk.JavaMonitorInflate methodCount failureWastegroupVM Operation Typejdk.JavaMonitorWaitFlagBucket Count Standard Deviationjdk.types.MethodRecording DurationRedefine Classesjdk.GCReferenceStatisticsContainer Memory Usage#Who requested the recording and whyCompilation LevelValue Based ClassAllocation outside TLABjdk.G1AdaptiveIHOPMemory Fail Countjdk.LongFlagChanged/Measure of how often something occurs, in HertzField ModifiersYoung Generation ConfigurationUnsigned Long Flag jdk.types.ZStatisticsCounterType dimensionreadRateOSR Bytes CompiledGC Phase PausevalueBasedClass jvmArgumentsDatarecentAllocationRate;Total memory wasted within PLABs due to alignment or refill +sweepCountZGC Relocation Setjdk.ObjectCountAfterGCTotal Hidden Classes Block SizePrevious Monitor OwnerSizeCommitted Sizejdk.CodeCacheConfigurationjdk.GarbageCollectionflushedjdk.ZStatisticsCounterpathMemory and Swap Limit Revoked Classjdk.types.ThreadGroupjvmName8Number of parallel threads to use for garbage collection'G1 Evacuation Memory Statistics for OldparallelGCThreadsjdk.BooleanFlagChanged"Shenandoah Heap Region Informationjdk.types.ClassLoaderMethodJava Thread Sleep AllocatedspecializedChunksTotalSizeBytecode InstructioncodeCacheMaxCapacity End of File exceptionTypejdk.CodeCacheStatisticsjdk.G1HeapRegionInformation0Allocation in new Thread Local Allocation Bufferblockingjdk.JITRestartMethods Flushed#Array or null if it is not an array Regions Freed Synchronize run state of threadsjdk.types.Bytecode regionsFreed OS Frequency End of StreamRecording ReasonserviceRequestsCaller insertionRateisOsrIHOP Target Occupancycutoff CPU User Time:Whether System.gc() will cause a garbage collection or notzombifiedCountjdk.SafepointEndSweep Code CacheInitial Security Property2Size of the committed memory for the virtual space +topAddress!The name of the Garbage CollectorExtra information specific to Parallel Old Garbage CollectionsCurrent IHOP Threshold737475jdk.ContainerCPUThrottling76777879jdk.types.OldObjectField(Safepointing begin running cleanup tasks reservedSize System GC +entryCountClass RedefinitiontotalFootprintTotal memory allocated by PLABs80Redefined Class8182838485 Machine Total8687Location8889Evacuation Failedjdk.EvacuationInformation +Total timejdk.types.StackFrame Thread Group Memory UsedSecurity jdk.LongFlag expansionSize90919293allocationTime94 failureUsed9596979899Security Providerjdk.ContainerIOUsagedefiningClassLoaderhiddenClassLoader objectClassBucket Count VarianceObject description Reserved Top +Old ObjectNNumber of block IO requests to the disk that have been issued by the container +Class Load8Indicates whether the adaptive IHOP prediction is activeGDescription of the OS the JVM runs on, for example, a uname-like output +IterationsCommitted memory for this space'If the operation occured at a safepoint Description constantPoolFlush IdentifierInitial Environment VariableTenuredjdk.types.ThreadStateJVM Name fromSpace)Reason for writing recording data to disk Class LoadingVCurrent predicted time from the end of the last concurrent start to the first mixed GCCompiler StatisticsnonProfiledSizeIf end of file was reachedZ Statistics SamplerZ Statistics CounterHeap Address Size hwThreadsCoresjdk.types.VirtualSpacejdk.CompilerStatisticsConcurrent Mode failedEvacuation Failed Data metaspacefastTimeAutoEnabledjdk.types.ObjectSpacePromotion Failed Datajdk.GCPhaseConcurrentLevel1gDescribes various phases of the compilation process like inlining or string optimization related phases jdk.jfr.LabelNon-nmethod Size thresholdjdk.types.InflateCausefloatiHint to the operating system that allows groups to specify the minimum required amount of physical memoryGC Survivor Configuration1656 Reserved Size Medium Chunks reservedEndCauseAdditional buffer sizeNThe number of Java threads in a critical section when the GC locker is startedjdk.NativeLibraryfrommemorySoftLimit'Container CPU usage related informationDeoptimization1659Timespan0 nsPromotion in new PLABAlgorithm Name>How far bucket lengths are spread out from their average valueGC Time JVM Version16681665GThe configuration of the young generation of the garbage collected heapjdk.types.NetworkInterfaceName16624Restart of the JIT compilers after they were stopped machineTotal Z Page Type jdk.SystemGCFilter Configured:Number of threads created and also started since JVM startarrayTotal Block Sizenotifiervaluejdk.GCPhasePauseLevel4jdk.GCPhasePauseLevel1jdk.GCPhasePauseLevel3jdk.GCPhasePauseLevel2 Heap SummaryUnmapping of memory usesTLABsintcommand unloadedClass9A code heap is full, this leads to disabling the compiler Memory UsageAccess Modifiers File SystemRoot information;Total memory left unused in regions where evacuation failedjdk.JavaMonitorEnterMinimum Block Lengthjdk.jfr.internal.Throttlejdk.ZStatisticsSamplerStringsettingRuntimePromotion of an object failedjdk.types.SafepointId#Force updates to be written to file Non-blockingjdk.JavaExceptionThrow jdk.CPULoadjdk.ActiveSettingjdk.G1EvacuationOldStatisticsCollection Set RegionsGC phases for parallel workersCPU Throttled SlicesEntriesversion9Size of the allocated PLAB to which the object was copiedoldSpaceFlag Value OrigindisableBiasing jdk.YoungGenerationConfigurationType of Servicejdk.PromoteObjectInNewPLABCPU Information +Java ErrorField Information_Total size of all allocated metaspace chunks for hidden classes (each chunk has several blocks)allocationRegionsUsedAfterjdk.SecurityProviderService compileCountMILLISECONDS_SINCE_EPOCH"Security Provider Instance Request +annotationNetwork Interface NamePathBiased Lock Revocation TLS Handshakejdk.SymbolTableStatisticsFast Time Frequency/Number of bytes read from the file (possibly 0)GC Reference StatisticsContainer TypeRecord stack tracesjdk.JVMInformationaRegions chosen as allocation regions during evacuation (includes survivors and old space regions) certificateId1263Concurrent Explicit GC +osThreadIdcpuQuota Code Sweeperjdk.ReservedStackActivation=Serial numbers from X.509 Certificates forming chain of trust9Max time allowed to be spent on GC during last time slice jdk.FileWritejdk.UnsignedIntFlagChanged"Start address of the virtual spaceParallel Scavenge Heap Summary1275 threadCount12731271 Name of fieldReference TypeObject Tenuring Age1269 osFrequency1267port1265jdk.ZRelocationSetGroup/Total amount of physical memory available to OSjdk.YoungGarbageCollection ZGC UncommitReserved memory for this space endOfStream12851283jdk.InitialEnvironmentVariable1281 directoryjdk.types.OldObjectRootSystem cpuUserTime12791277 TruncatedendoldValueGCjdk.TenuringDistributionclassLoaderDatajdk.jfr.BooleanFlag Undo WastedRunning thread&The kind of compressed oops being usedAllocation of a ZPageGMemory related evacuation statistics during GC for the young generation1295message1293jdk.BiasedLockSelfRevocation1291referrerUnsigned Int Flagjdk.CompilerConfiguration1289jdk.ModuleExportTransition From1287 edenUsedSizejava.lang.Classjdk.SafepointCleanupTask Heap Dumpage4Basic statistics related to current IHOP calculationjdk.settings.Enabled TLAB SizeStandard Bytes Compiled7Total memory wasted at the end of regions due to refilljdk.AllocationRequiringGCcallee(Throttles the emission rate for an eventSegments*Snapshot of a threads state when in nativeZGC Relocation Set Group Safepoint EndArray ElementsATarget old generation occupancy to reach at the start of mixed GC1298HiddensweepIdsocketspeerPort algorithm jdk.HeapDump Bytes Written Total Count(jdk.ProtectionDomainCacheTableStatisticsStarting address of the module VM OperationParallel Old Garbage Collectionjdk.ThreadCPULoadsystem Recording IdIdRetransform Classes densePrefix firstSizeUnsigned Long Flag ChangedcpuThrottledSlicesBlock IO TransferSecurity Property ModificationWait has been timed outparentClassLoaderhiddenBlockSize Metadata TypeDepthsegmentsobjectReferencesjdk.ThreadParkjdk.SweepCodeCacheAmountosrBytesCompiledosNamejdk.SocketReadjdk.ActiveRecording^Number of time-slice periods that have elapsed if a CPU quota has been setup for the containerCurrent IHOP thresholdEvacuation StatisticsTarget for GC pausesFHow far bucket lengths are spread out from their mean (expected) valuejdk.GCTLABConfiguration&Total amount of physical memory in use#jdk.ShenandoahHeapRegionInformation +Start TimemodeUsed (failure)pagesjdk.PromoteObjectOutsidePLABJVM UserpeakFractionTimejdk.jfr.internal.Cutoff Removal RateRegion RefillsHumongous Chunks Total SizeJVM Information lockCountG1 Heap Region Type Changejdk.ClassUnload +File WriteInitial Threads Parameters used in TLS HandshakejTotal time duration, in nanoseconds, that the CPU has been throttled or limited due to exceeding CPU quotajdk.VirtualizationInformationG1 Young Garbage Collection CommittedJVM Settings File ArgumentsisExplicitGCDisabledjdk.UnsignedLongFlagCode Cache FullReading data from a file gmtOffset Young SpaceMax SizeSafepoint Beginjdk.InitialSecurityPropertyjdk.types.CompileId nonBlocking Record eventheapUsed6The maximum bucket length (entries in a single bucket))A directed edge representing a dependency jdk.ParallelOldGarbageCollectioncpuElapsedSlicescallerPredicted Allocation RateuntilreasonCode Sweeper Enabledjdk.jfr.ContentType +jdk.ZUnmap Java ThreadallocationRegionsUsedBefore Setting ValueloadedClassCountNotifier Thread edenSpaceDefining Class Loader Class UnloadnewValue bytesCopied +Key LengthOS Informationjdk.types.GCWhen sampledThread parkedClassjdk.types.SymbolJava Thread Park succeeded Fast Timebytecodejdk.CodeSweeperStatistics Processorjdk.ClassRedefinition*Number of classes unloaded since JVM startTotal Hidden Classes Chunk Sizejdk.jfr.Unsigned flushedCountGC Phase Concurrent GC IdentifierUNumber of block IO bytes that have been transferred to/from the disk by the containermetaData"Number of outgoing bits per secondA potential memory leakCode Cache Maximum Capacity committedSizeG1 Basic IHOP Statistics activeCountLong Flag ChangedEvent Emission ThrottleCompilation Identifierjdk.MetaspaceOOMGC Heap Configuration3Pointer to the ClassLoaderData structure in the JVMJava Virtual MachineReason for JVM shutdown