8196341: Add JFR events for parallel phases of G1

0 /*
1  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3  *
4  * This code is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 2 only, as
6  * published by the Free Software Foundation.  Oracle designates this
7  * particular file as subject to the "Classpath" exception as provided
8  * by Oracle in the LICENSE file that accompanied this code.
9  *
10  * This code is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13  * version 2 for more details (a copy is included in the LICENSE file that
14  * accompanied this code).
15  *
16  * You should have received a copy of the GNU General Public License version
17  * 2 along with this work; if not, write to the Free Software Foundation,
18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19  *
20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21  * or visit www.oracle.com if you need additional information or have any
22  * questions.
23  */
24 package jdk.test.lib.jfr;
25 
26 import jdk.jfr.EventType;
27 
28 /**
29  * Contains id for events that are shipped with the JDK.
30  *
31  */
32 public class EventNames {
33 
34     public final static String PREFIX = "jdk.";
35     private static final String GC_CATEGORY = "GC";
36 
37     // JVM Configuration
38     public final static String JVMInformation = PREFIX + "JVMInformation";
39     public final static String InitialSystemProperty = PREFIX + "InitialSystemProperty";
40     public final static String IntFlag = PREFIX + "IntFlag";
41     public final static String UnsignedIntFlag = PREFIX + "UnsignedIntFlag";
42     public final static String LongFlag = PREFIX + "LongFlag";
43     public final static String UnsignedLongFlag = PREFIX + "UnsignedLongFlag";
44     public final static String DoubleFlag = PREFIX + "DoubleFlag";
45     public final static String BooleanFlag = PREFIX + "BooleanFlag";
46     public final static String StringFlag = PREFIX + "StringFlag";
47     public final static String IntFlagChanged = PREFIX + "IntFlagChanged";
48     public final static String UnsignedIntFlagChanged = PREFIX + "UnsignedIntFlagChanged";
49     public final static String LongFlagChanged = PREFIX + "LongFlagChanged";
50     public final static String UnsignedLongFlagChanged = PREFIX + "UnsignedLongFlagChanged";
51     public final static String DoubleFlagChanged = PREFIX + "DoubleFlagChanged";
52     public final static String BooleanFlagChanged = PREFIX + "BooleanFlagChanged";
53     public final static String StringFlagChanged = PREFIX + "StringFlagChanged";
54 
55     // Runtime
56     public final static String VMException = PREFIX + "JavaErrorThrow";
57     public final static String ThreadStart = PREFIX + "ThreadStart";
58     public final static String ThreadEnd = PREFIX + "ThreadEnd";
59     public final static String ThreadSleep = PREFIX + "ThreadSleep";
60     public final static String ThreadPark = PREFIX + "ThreadPark";
61     public final static String JavaMonitorEnter = PREFIX + "JavaMonitorEnter";
62     public final static String JavaMonitorWait = PREFIX + "JavaMonitorWait";
63     public final static String JavaMonitorInflate = PREFIX + "JavaMonitorInflate";
64     public final static String ClassLoad = PREFIX + "ClassLoad";
65     public final static String ClassDefine = PREFIX + "ClassDefine";
66     public final static String ClassUnload = PREFIX + "ClassUnload";
67     public final static String SafepointBegin = PREFIX + "SafepointBegin";
68     public final static String SafepointStateSyncronization = PREFIX + "SafepointStateSynchronization";
69     public final static String SafepointWaitBlocked = PREFIX + "SafepointWaitBlocked";
70     public final static String SafepointCleanup = PREFIX + "SafepointCleanup";
71     public final static String SafepointCleanupTask = PREFIX + "SafepointCleanupTask";
72     public final static String SafepointEnd = PREFIX + "SafepointEnd";
73     public final static String ExecuteVMOperation = PREFIX + "ExecuteVMOperation";
74     public final static String Shutdown = PREFIX + "Shutdown";
75     public final static String VMError = PREFIX + "VMError";
76     public final static String JavaThreadStatistics = PREFIX + "JavaThreadStatistics";
77     public final static String ClassLoadingStatistics = PREFIX + "ClassLoadingStatistics";
78     public final static String ClassLoaderStatistics = PREFIX + "ClassLoaderStatistics";
79     public final static String ThreadAllocationStatistics = PREFIX + "ThreadAllocationStatistics";
80     public final static String ExecutionSample = PREFIX + "ExecutionSample";
81     public final static String NativeMethodSample = PREFIX + "NativeMethodSample";
82     public final static String ExecutionSampling = PREFIX + "ExecutionSampling";
83     public final static String ThreadDump = PREFIX + "ThreadDump";
84     public final static String OldObjectSample = PREFIX + "OldObjectSample";
85     public final static String BiasedLockRevocation = PREFIX + "BiasedLockRevocation";
86     public final static String BiasedLockSelfRevocation = PREFIX + "BiasedLockSelfRevocation";
87     public final static String BiasedLockClassRevocation = PREFIX + "BiasedLockClassRevocation";
88 
89     // GC
90     public final static String GCHeapSummary = PREFIX + "GCHeapSummary";
91     public final static String MetaspaceSummary = PREFIX + "MetaspaceSummary";
92     public final static String MetaspaceGCThreshold = PREFIX + "MetaspaceGCThreshold";
93     public final static String MetaspaceAllocationFailure = PREFIX + "MetaspaceAllocationFailure";
94     public final static String MetaspaceOOM = PREFIX + "MetaspaceOOM";
95     public final static String MetaspaceChunkFreeListSummary = PREFIX + "MetaspaceChunkFreeListSummary";
96     public final static String PSHeapSummary = PREFIX + "PSHeapSummary";
97     public final static String G1HeapSummary = PREFIX + "G1HeapSummary";
98     public final static String G1HeapRegionInformation = PREFIX + "G1HeapRegionInformation";
99     public final static String G1HeapRegionTypeChange = PREFIX + "G1HeapRegionTypeChange";
100     public final static String TenuringDistribution = PREFIX + "TenuringDistribution";
101     public final static String GarbageCollection = PREFIX + "GarbageCollection";
102     public final static String ParallelOldCollection = PREFIX + "ParallelOldGarbageCollection";
103     public final static String YoungGarbageCollection = PREFIX + "YoungGarbageCollection";
104     public final static String OldGarbageCollection = PREFIX + "OldGarbageCollection";
105     public final static String G1GarbageCollection = PREFIX + "G1GarbageCollection";
106     public final static String G1MMU = PREFIX + "G1MMU";
107     public final static String EvacuationInfo = PREFIX + "EvacuationInfo";
108     public final static String GCReferenceStatistics = PREFIX + "GCReferenceStatistics";
109     public final static String ObjectCountAfterGC = PREFIX + "ObjectCountAfterGC";
110     public final static String PromoteObjectInNewPLAB = PREFIX + "PromoteObjectInNewPLAB";
111     public final static String PromoteObjectOutsidePLAB = PREFIX + "PromoteObjectOutsidePLAB";
112     public final static String PromotionFailed = PREFIX + "PromotionFailed";
113     public final static String EvacuationFailed = PREFIX + "EvacuationFailed";
114     public final static String ConcurrentModeFailure = PREFIX + "ConcurrentModeFailure";
115     public final static String GCPhasePause = PREFIX + "GCPhasePause";
116     public final static String GCPhasePauseLevel1 = PREFIX + "GCPhasePauseLevel1";
117     public final static String GCPhasePauseLevel2 = PREFIX + "GCPhasePauseLevel2";
118     public final static String GCPhasePauseLevel3 = PREFIX + "GCPhasePauseLevel3";
119     public final static String ObjectCount = PREFIX + "ObjectCount";
120     public final static String GCConfiguration = PREFIX + "GCConfiguration";
121     public final static String GCSurvivorConfiguration = PREFIX + "GCSurvivorConfiguration";
122     public final static String GCTLABConfiguration = PREFIX + "GCTLABConfiguration";
123     public final static String GCHeapConfiguration = PREFIX + "GCHeapConfiguration";
124     public final static String YoungGenerationConfiguration = PREFIX + "YoungGenerationConfiguration";
125     public final static String G1AdaptiveIHOP = PREFIX + "G1AdaptiveIHOP";
126     public final static String G1EvacuationYoungStatistics = PREFIX + "G1EvacuationYoungStatistics";
127     public final static String G1EvacuationOldStatistics = PREFIX + "G1EvacuationOldStatistics";
128     public final static String G1BasicIHOP = PREFIX + "G1BasicIHOP";
129     public final static String AllocationRequiringGC = PREFIX + "AllocationRequiringGC";
130     public final static String GCPhaseParallel = PREFIX + "GCPhaseParallel";
131 
132     // Compiler
133     public final static String Compilation = PREFIX + "Compilation";
134     public final static String CompilerPhase = PREFIX + "CompilerPhase";
135     public final static String CompilationFailure = PREFIX + "CompilationFailure";
136     public final static String CompilerInlining = PREFIX + "CompilerInlining";
137     public final static String CompilerStatistics = PREFIX + "CompilerStatistics";
138     public final static String CompilerConfig = PREFIX + "CompilerConfiguration";
139     public final static String CodeCacheStatistics = PREFIX + "CodeCacheStatistics";
140     public final static String CodeCacheConfiguration = PREFIX + "CodeCacheConfiguration";
141     public final static String CodeSweeperStatistics = PREFIX + "CodeSweeperStatistics";
142     public final static String CodeSweeperConfiguration = PREFIX + "CodeSweeperConfiguration";
143     public final static String SweepCodeCache = PREFIX + "SweepCodeCache";
144     public final static String CodeCacheFull = PREFIX + "CodeCacheFull";
145     public final static String ObjectAllocationInNewTLAB = PREFIX + "ObjectAllocationInNewTLAB";
146     public final static String ObjectAllocationOutsideTLAB = PREFIX + "ObjectAllocationOutsideTLAB";
147 
148     // OS
149     public final static String OSInformation = PREFIX + "OSInformation";
150     public final static String CPUInformation = PREFIX + "CPUInformation";
151     public final static String CPULoad = PREFIX + "CPULoad";
152     public final static String ThreadCPULoad = PREFIX + "ThreadCPULoad";
153     public final static String SystemProcess = PREFIX + "SystemProcess";
154     public final static String ThreadContextSwitchRate = PREFIX + "ThreadContextSwitchRate";
155     public final static String InitialEnvironmentVariable = PREFIX + "InitialEnvironmentVariable";
156     public final static String NativeLibrary = PREFIX + "NativeLibrary";
157     public final static String PhysicalMemory = PREFIX + "PhysicalMemory";
158     public final static String NetworkUtilization = PREFIX + "NetworkUtilization";
159 
160     // JDK
161     public static final String FileForce  = PREFIX + "FileForce";
162     public static final String FileRead = PREFIX + "FileRead";
163     public static final String FileWrite = PREFIX + "FileWrite";
164     public static final String SocketRead = PREFIX + "SocketRead";
165     public static final String SocketWrite = PREFIX + "SocketWrite";
166     public final static String ExceptionStatistics = PREFIX + "ExceptionStatistics";
167     public final static String JavaExceptionThrow = PREFIX + "JavaExceptionThrow";
168     public final static String JavaErrorThrow = PREFIX + "JavaErrorThrow";
169     public final static String ModuleRequire = PREFIX + "ModuleRequire";
170     public final static String ModuleExport = PREFIX + "ModuleExport";
171 
172     // Flight Recorder
173     public final static String DumpReason = PREFIX + "DumpReason";
174     public final static String DataLoss = PREFIX + "DataLoss";
175     public final static String CPUTimeStampCounter = PREFIX + "CPUTimeStampCounter";
176     public final static String ActiveRecording = PREFIX + "ActiveRecording";
177     public final static String ActiveSetting = PREFIX + "ActiveSetting";
178 
179     public static boolean isGcEvent(EventType et) {
180         return et.getCategoryNames().contains(GC_CATEGORY);
181     }
182 
183 }
--- EOF ---