1 /* 2 * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 package jdk.test.lib.jfr; 26 27 import jdk.jfr.EventType; 28 29 /** 30 * Contains id for events that are shipped with the JDK. 31 * 32 */ 33 public class EventNames { 34 35 public static final String PREFIX = "jdk."; 36 private static final String GC_CATEGORY = "GC"; 37 38 // JVM Configuration 39 public static final String JVMInformation = PREFIX + "JVMInformation"; 40 public static final String InitialSystemProperty = PREFIX + "InitialSystemProperty"; 41 public static final String IntFlag = PREFIX + "IntFlag"; 42 public static final String UnsignedIntFlag = PREFIX + "UnsignedIntFlag"; 43 public static final String LongFlag = PREFIX + "LongFlag"; 44 public static final String UnsignedLongFlag = PREFIX + "UnsignedLongFlag"; 45 public static final String DoubleFlag = PREFIX + "DoubleFlag"; 46 public static final String BooleanFlag = PREFIX + "BooleanFlag"; 47 public static final String StringFlag = PREFIX + "StringFlag"; 48 public static final String IntFlagChanged = PREFIX + "IntFlagChanged"; 49 public static final String UnsignedIntFlagChanged = PREFIX + "UnsignedIntFlagChanged"; 50 public static final String LongFlagChanged = PREFIX + "LongFlagChanged"; 51 public static final String UnsignedLongFlagChanged = PREFIX + "UnsignedLongFlagChanged"; 52 public static final String DoubleFlagChanged = PREFIX + "DoubleFlagChanged"; 53 public static final String BooleanFlagChanged = PREFIX + "BooleanFlagChanged"; 54 public static final String StringFlagChanged = PREFIX + "StringFlagChanged"; 55 56 // Runtime 57 public static final String ThreadStart = PREFIX + "ThreadStart"; 58 public static final String ThreadEnd = PREFIX + "ThreadEnd"; 59 public static final String ThreadSleep = PREFIX + "ThreadSleep"; 60 public static final String ThreadPark = PREFIX + "ThreadPark"; 61 public static final String JavaMonitorEnter = PREFIX + "JavaMonitorEnter"; 62 public static final String JavaMonitorWait = PREFIX + "JavaMonitorWait"; 63 public static final String JavaMonitorInflate = PREFIX + "JavaMonitorInflate"; 64 public static final String SyncOnValueBasedClass = PREFIX + "SyncOnValueBasedClass"; 65 public static final String ClassLoad = PREFIX + "ClassLoad"; 66 public static final String ClassDefine = PREFIX + "ClassDefine"; 67 public static final String ClassUnload = PREFIX + "ClassUnload"; 68 public static final String SafepointBegin = PREFIX + "SafepointBegin"; 69 public static final String SafepointStateSynchronization = PREFIX + "SafepointStateSynchronization"; 70 public static final String SafepointCleanup = PREFIX + "SafepointCleanup"; 71 public static final String SafepointCleanupTask = PREFIX + "SafepointCleanupTask"; 72 public static final String SafepointEnd = PREFIX + "SafepointEnd"; 73 public static final String ExecuteVMOperation = PREFIX + "ExecuteVMOperation"; 74 public static final String Shutdown = PREFIX + "Shutdown"; 75 public static final String JavaThreadStatistics = PREFIX + "JavaThreadStatistics"; 76 public static final String ClassLoadingStatistics = PREFIX + "ClassLoadingStatistics"; 77 public static final String ClassLoaderStatistics = PREFIX + "ClassLoaderStatistics"; 78 public static final String ThreadAllocationStatistics = PREFIX + "ThreadAllocationStatistics"; 79 public static final String ExecutionSample = PREFIX + "ExecutionSample"; 80 public static final String NativeMethodSample = PREFIX + "NativeMethodSample"; 81 public static final String ThreadDump = PREFIX + "ThreadDump"; 82 public static final String OldObjectSample = PREFIX + "OldObjectSample"; 83 public static final String SymbolTableStatistics = PREFIX + "SymbolTableStatistics"; 84 public static final String StringTableStatistics = PREFIX + "StringTableStatistics"; 85 public static final String RedefineClasses = PREFIX + "RedefineClasses"; 86 public static final String RetransformClasses = PREFIX + "RetransformClasses"; 87 public static final String ClassRedefinition = PREFIX + "ClassRedefinition"; 88 public static final String FinalizerStatistics = PREFIX + "FinalizerStatistics"; 89 public static final String NativeMemoryUsage = PREFIX + "NativeMemoryUsage"; 90 public static final String NativeMemoryUsageTotal = PREFIX + "NativeMemoryUsageTotal"; 91 public static final String JavaAgent = PREFIX + "JavaAgent"; 92 public static final String NativeAgent = PREFIX + "NativeAgent"; 93 94 // This event is hard to test 95 public static final String ReservedStackActivation = PREFIX + "ReservedStackActivation"; 96 97 // GC 98 public static final String GCHeapMemoryUsage = PREFIX + "GCHeapMemoryUsage"; 99 public static final String GCHeapMemoryPoolUsage = PREFIX + "GCHeapMemoryPoolUsage"; 100 public static final String GCHeapSummary = PREFIX + "GCHeapSummary"; 101 public static final String MetaspaceSummary = PREFIX + "MetaspaceSummary"; 102 public static final String MetaspaceGCThreshold = PREFIX + "MetaspaceGCThreshold"; 103 public static final String MetaspaceAllocationFailure = PREFIX + "MetaspaceAllocationFailure"; 104 public static final String MetaspaceOOM = PREFIX + "MetaspaceOOM"; 105 public static final String MetaspaceChunkFreeListSummary = PREFIX + "MetaspaceChunkFreeListSummary"; 106 public static final String PSHeapSummary = PREFIX + "PSHeapSummary"; 107 public static final String G1HeapSummary = PREFIX + "G1HeapSummary"; 108 public static final String G1HeapRegionInformation = PREFIX + "G1HeapRegionInformation"; 109 public static final String G1HeapRegionTypeChange = PREFIX + "G1HeapRegionTypeChange"; 110 public static final String ShenandoahHeapRegionInformation = PREFIX + "ShenandoahHeapRegionInformation"; 111 public static final String ShenandoahHeapRegionStateChange = PREFIX + "ShenandoahHeapRegionStateChange"; 112 public static final String ShenandoahEvacuationInformation = PREFIX + "ShenandoahEvacuationInformation"; 113 public static final String TenuringDistribution = PREFIX + "TenuringDistribution"; 114 public static final String GarbageCollection = PREFIX + "GarbageCollection"; 115 public static final String ParallelOldGarbageCollection = PREFIX + "ParallelOldGarbageCollection"; 116 public static final String ParallelOldCollection = ParallelOldGarbageCollection; 117 public static final String YoungGarbageCollection = PREFIX + "YoungGarbageCollection"; 118 public static final String OldGarbageCollection = PREFIX + "OldGarbageCollection"; 119 public static final String G1GarbageCollection = PREFIX + "G1GarbageCollection"; 120 public static final String G1MMU = PREFIX + "G1MMU"; 121 public static final String EvacuationInformation = PREFIX + "EvacuationInformation"; 122 public static final String GCReferenceStatistics = PREFIX + "GCReferenceStatistics"; 123 public static final String ObjectCountAfterGC = PREFIX + "ObjectCountAfterGC"; 124 public static final String PromoteObjectInNewPLAB = PREFIX + "PromoteObjectInNewPLAB"; 125 public static final String PromoteObjectOutsidePLAB = PREFIX + "PromoteObjectOutsidePLAB"; 126 public static final String PromotionFailed = PREFIX + "PromotionFailed"; 127 public static final String EvacuationFailed = PREFIX + "EvacuationFailed"; 128 public static final String ConcurrentModeFailure = PREFIX + "ConcurrentModeFailure"; 129 public static final String GCPhasePause = PREFIX + "GCPhasePause"; 130 public static final String GCPhasePauseLevel1 = PREFIX + "GCPhasePauseLevel1"; 131 public static final String GCPhasePauseLevel2 = PREFIX + "GCPhasePauseLevel2"; 132 public static final String GCPhasePauseLevel3 = PREFIX + "GCPhasePauseLevel3"; 133 public static final String GCPhasePauseLevel4 = PREFIX + "GCPhasePauseLevel4"; 134 public static final String ObjectCount = PREFIX + "ObjectCount"; 135 public static final String GCConfiguration = PREFIX + "GCConfiguration"; 136 public static final String GCSurvivorConfiguration = PREFIX + "GCSurvivorConfiguration"; 137 public static final String GCTLABConfiguration = PREFIX + "GCTLABConfiguration"; 138 public static final String GCHeapConfiguration = PREFIX + "GCHeapConfiguration"; 139 public static final String YoungGenerationConfiguration = PREFIX + "YoungGenerationConfiguration"; 140 public static final String G1AdaptiveIHOP = PREFIX + "G1AdaptiveIHOP"; 141 public static final String G1EvacuationYoungStatistics = PREFIX + "G1EvacuationYoungStatistics"; 142 public static final String G1EvacuationOldStatistics = PREFIX + "G1EvacuationOldStatistics"; 143 public static final String G1BasicIHOP = PREFIX + "G1BasicIHOP"; 144 public static final String AllocationRequiringGC = PREFIX + "AllocationRequiringGC"; 145 public static final String GCPhaseParallel = PREFIX + "GCPhaseParallel"; 146 public static final String GCPhaseConcurrent = PREFIX + "GCPhaseConcurrent"; 147 public static final String GCPhaseConcurrentLevel1 = PREFIX + "GCPhaseConcurrentLevel1"; 148 public static final String GCPhaseConcurrentLevel2 = PREFIX + "GCPhaseConcurrentLevel2"; 149 public static final String ZYoungGarbageCollection = PREFIX + "ZYoungGarbageCollection"; 150 public static final String ZOldGarbageCollection = PREFIX + "ZOldGarbageCollection"; 151 public static final String ZAllocationStall = PREFIX + "ZAllocationStall"; 152 public static final String ZPageAllocation = PREFIX + "ZPageAllocation"; 153 public static final String ZRelocationSet = PREFIX + "ZRelocationSet"; 154 public static final String ZRelocationSetGroup = PREFIX + "ZRelocationSetGroup"; 155 public static final String ZUncommit = PREFIX + "ZUncommit"; 156 public static final String ZUnmap = PREFIX + "ZUnmap"; 157 public static final String GCLocker = PREFIX + "GCLocker"; 158 public static final String SystemGC = PREFIX + "SystemGC"; 159 public static final String GCCPUTime = PREFIX + "GCCPUTime"; 160 161 // Compiler 162 public static final String Compilation = PREFIX + "Compilation"; 163 public static final String CompilerPhase = PREFIX + "CompilerPhase"; 164 public static final String CompilationFailure = PREFIX + "CompilationFailure"; 165 public static final String CompilerInlining = PREFIX + "CompilerInlining"; 166 public static final String CompilerStatistics = PREFIX + "CompilerStatistics"; 167 public static final String CompilerConfiguration = PREFIX + "CompilerConfiguration"; 168 public static final String CodeCacheStatistics = PREFIX + "CodeCacheStatistics"; 169 public static final String CodeCacheConfiguration = PREFIX + "CodeCacheConfiguration"; 170 public static final String CodeCacheFull = PREFIX + "CodeCacheFull"; 171 public static final String ObjectAllocationInNewTLAB = PREFIX + "ObjectAllocationInNewTLAB"; 172 public static final String ObjectAllocationOutsideTLAB = PREFIX + "ObjectAllocationOutsideTLAB"; 173 public static final String ObjectAllocationSample = PREFIX + "ObjectAllocationSample"; 174 public static final String Deoptimization = PREFIX + "Deoptimization"; 175 public static final String JITRestart = PREFIX + "JITRestart"; 176 177 // OS 178 public static final String OSInformation = PREFIX + "OSInformation"; 179 public static final String VirtualizationInformation = PREFIX + "VirtualizationInformation"; 180 public static final String CPUInformation = PREFIX + "CPUInformation"; 181 public static final String CPULoad = PREFIX + "CPULoad"; 182 public static final String ThreadCPULoad = PREFIX + "ThreadCPULoad"; 183 public static final String SystemProcess = PREFIX + "SystemProcess"; 184 public static final String ThreadContextSwitchRate = PREFIX + "ThreadContextSwitchRate"; 185 public static final String InitialEnvironmentVariable = PREFIX + "InitialEnvironmentVariable"; 186 public static final String NativeLibrary = PREFIX + "NativeLibrary"; 187 public static final String PhysicalMemory = PREFIX + "PhysicalMemory"; 188 public static final String NetworkUtilization = PREFIX + "NetworkUtilization"; 189 public static final String ProcessStart = PREFIX + "ProcessStart"; 190 public static final String ResidentSetSize = PREFIX + "ResidentSetSize"; 191 192 // JDK 193 public static final String FileForce = PREFIX + "FileForce"; 194 public static final String FileRead = PREFIX + "FileRead"; 195 public static final String FileWrite = PREFIX + "FileWrite"; 196 public static final String SocketRead = PREFIX + "SocketRead"; 197 public static final String SocketWrite = PREFIX + "SocketWrite"; 198 public static final String ExceptionStatistics = PREFIX + "ExceptionStatistics"; 199 public static final String JavaExceptionThrow = PREFIX + "JavaExceptionThrow"; 200 public static final String JavaErrorThrow = PREFIX + "JavaErrorThrow"; 201 public static final String ModuleRequire = PREFIX + "ModuleRequire"; 202 public static final String ModuleExport = PREFIX + "ModuleExport"; 203 public static final String TLSHandshake = PREFIX + "TLSHandshake"; 204 public static final String X509Certificate = PREFIX + "X509Certificate"; 205 public static final String X509Validation = PREFIX + "X509Validation"; 206 public static final String InitialSecurityProperty = PREFIX + "InitialSecurityProperty"; 207 public static final String SecurityProperty = PREFIX + "SecurityPropertyModification"; 208 public static final String SecurityProviderService = PREFIX + "SecurityProviderService"; 209 public static final String DirectBufferStatistics = PREFIX + "DirectBufferStatistics"; 210 public static final String Deserialization = PREFIX + "Deserialization"; 211 public static final String VirtualThreadStart = PREFIX + "VirtualThreadStart"; 212 public static final String VirtualThreadEnd = PREFIX + "VirtualThreadEnd"; 213 public static final String VirtualThreadPinned = PREFIX + "VirtualThreadPinned"; 214 public static final String VirtualThreadSubmitFailed = PREFIX + "VirtualThreadSubmitFailed"; 215 216 // Containers 217 public static final String ContainerConfiguration = PREFIX + "ContainerConfiguration"; 218 public static final String ContainerCPUUsage = PREFIX + "ContainerCPUUsage"; 219 public static final String ContainerCPUThrottling = PREFIX + "ContainerCPUThrottling"; 220 public static final String ContainerMemoryUsage = PREFIX + "ContainerMemoryUsage"; 221 public static final String ContainerIOUsage = PREFIX + "ContainerIOUsage"; 222 223 // Flight Recorder 224 public static final String DumpReason = PREFIX + "DumpReason"; 225 public static final String DataLoss = PREFIX + "DataLoss"; 226 public static final String CPUTimeStampCounter = PREFIX + "CPUTimeStampCounter"; 227 public static final String ActiveRecording = PREFIX + "ActiveRecording"; 228 public static final String ActiveSetting = PREFIX + "ActiveSetting"; 229 public static final String Flush = PREFIX + "Flush"; 230 231 // Diagnostics 232 public static final String HeapDump = PREFIX + "HeapDump"; 233 234 public static boolean isGcEvent(EventType et) { 235 return et.getCategoryNames().contains(GC_CATEGORY); 236 } 237 238 }