1 /*
   2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
   3  *
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * The contents of this file are subject to the terms of either the Universal Permissive License
   7  * v 1.0 as shown at http://oss.oracle.com/licenses/upl
   8  *
   9  * or the following license:
  10  *
  11  * Redistribution and use in source and binary forms, with or without modification, are permitted
  12  * provided that the following conditions are met:
  13  *
  14  * 1. Redistributions of source code must retain the above copyright notice, this list of conditions
  15  * and the following disclaimer.
  16  *
  17  * 2. Redistributions in binary form must reproduce the above copyright notice, this list of
  18  * conditions and the following disclaimer in the documentation and/or other materials provided with
  19  * the distribution.
  20  *
  21  * 3. Neither the name of the copyright holder nor the names of its contributors may be used to
  22  * endorse or promote products derived from this software without specific prior written permission.
  23  *
  24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
  25  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  26  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  27  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  30  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
  31  * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32  */
  33 package org.openjdk.jmc.flightrecorder.jdk;
  34 
  35 import org.openjdk.jmc.common.item.IType;
  36 import org.openjdk.jmc.common.item.ItemFilters;
  37 
  38 /**
  39  * Contains type IDs for events that are produced by JDK 11+. These strings can be compared to the
  40  * result of {@link IType#getIdentifier()} and for creating filters with
  41  * {@link ItemFilters#type(String)}.
  42  */
  43 @SuppressWarnings("nls")
  44 public final class JdkTypeIDs {
  45 
  46         private final static String PREFIX = "jdk.";
  47 
  48         public static final String CPU_LOAD = PREFIX + "CPULoad";
  49         public static final String EXECUTION_SAMPLE = PREFIX + "ExecutionSample";
  50         public static final String EXECUTION_SAMPLING_INFO_EVENT_ID = PREFIX + "ExecutionSampling";
  51         public static final String PROCESSES = PREFIX + "SystemProcess";
  52         public static final String OS_MEMORY_SUMMARY = PREFIX + "PhysicalMemory";
  53         public static final String OS_INFORMATION = PREFIX + "OSInformation";
  54         public static final String CPU_INFORMATION = PREFIX + "CPUInformation";
  55         public static final String THREAD_ALLOCATION_STATISTICS = PREFIX + "ThreadAllocationStatistics";
  56         public static final String HEAP_CONF = PREFIX + "GCHeapConfiguration";
  57         public static final String GC_CONF = PREFIX + "GCConfiguration";
  58         public static final String HEAP_SUMMARY = PREFIX + "GCHeapSummary";
  59         public static final String ALLOC_INSIDE_TLAB = PREFIX + "ObjectAllocationInNewTLAB";
  60         public static final String ALLOC_OUTSIDE_TLAB = PREFIX + "ObjectAllocationOutsideTLAB";
  61         public static final String VM_INFO = PREFIX + "JVMInformation";
  62         public static final String CLASS_LOAD = PREFIX + "ClassLoad";
  63         public static final String CLASS_UNLOAD = PREFIX + "ClassUnload";
  64         public static final String CLASS_LOAD_STATISTICS = PREFIX + "ClassLoadingStatistics";
  65         public static final String CLASS_LOADER_STATISTICS = PREFIX + "ClassLoaderStatistics";
  66         public static final String COMPILATION = PREFIX + "Compilation";
  67 
  68         public static final String FILE_WRITE = PREFIX + "FileWrite";
  69         public static final String FILE_READ = PREFIX + "FileRead";
  70         public static final String SOCKET_WRITE = PREFIX + "SocketWrite";
  71         public static final String SOCKET_READ = PREFIX + "SocketRead";
  72 
  73         public static final String THREAD_PARK = PREFIX + "ThreadPark";
  74         public static final String THREAD_SLEEP = PREFIX + "ThreadSleep";
  75         public static final String MONITOR_ENTER = PREFIX + "JavaMonitorEnter";
  76         public static final String MONITOR_WAIT = PREFIX + "JavaMonitorWait";
  77 
  78         public static final String METASPACE_OOM = PREFIX + "MetaspaceOOM";
  79 
  80         public static final String CODE_CACHE_FULL = PREFIX + "CodeCacheFull";
  81         public static final String CODE_CACHE_STATISTICS = PREFIX + "CodeCacheStatistics";
  82         public static final String CODE_SWEEPER_STATISTICS = PREFIX + "CodeSweeperStatistics";
  83         public static final String SWEEP_CODE_CACHE = PREFIX + "SweepCodeCache";
  84         public static final String ENVIRONMENT_VARIABLE = PREFIX + "InitialEnvironmentVariable";
  85         public static final String SYSTEM_PROPERTIES = PREFIX + "InitialSystemProperty";
  86         public static final String OBJECT_COUNT = PREFIX + "ObjectCount";
  87         public static final String GC_REFERENCE_STATISTICS = PREFIX + "GCReferenceStatistics";
  88 
  89         public static final String OLD_OBJECT_SAMPLE = PREFIX + "OldObjectSample";
  90 
  91         public static final String GC_PAUSE_L4 = PREFIX + "GCPhasePauseLevel4";
  92         public static final String GC_PAUSE_L3 = PREFIX + "GCPhasePauseLevel3";
  93         public static final String GC_PAUSE_L2 = PREFIX + "GCPhasePauseLevel2";
  94         public static final String GC_PAUSE_L1 = PREFIX + "GCPhasePauseLevel1";
  95         public static final String GC_PAUSE = PREFIX + "GCPhasePause";
  96 
  97         public static final String METASPACE_SUMMARY = PREFIX + "MetaspaceSummary";
  98         public static final String GARBAGE_COLLECTION = PREFIX + "GarbageCollection";
  99         public static final String CONCURRENT_MODE_FAILURE = PREFIX + "ConcurrentModeFailure";
 100 
 101         public static final String THROWABLES_STATISTICS = PREFIX + "ExceptionStatistics";
 102         public static final String ERRORS_THROWN = PREFIX + "JavaErrorThrow";
 103         /*
 104          * NOTE: The parser filters all JavaExceptionThrow events created from the Error constructor to
 105          * avoid duplicates, so this event type represents 'non error throwables' rather than
 106          * exceptions. See note in SyntheticAttributeExtension which does the duplicate filtering.
 107          */
 108         public static final String EXCEPTIONS_THROWN = PREFIX + "JavaExceptionThrow";
 109 
 110         public static final String COMPILER_STATS = PREFIX + "CompilerStatistics";
 111         public static final String COMPILER_FAILURE = PREFIX + "CompilationFailure";
 112 
 113         public static final String ULONG_FLAG = PREFIX + "UnsignedLongFlag";
 114         public static final String BOOLEAN_FLAG = PREFIX + "BooleanFlag";
 115         public static final String STRING_FLAG = PREFIX + "StringFlag";
 116         public static final String DOUBLE_FLAG = PREFIX + "DoubleFlag";
 117         public static final String LONG_FLAG = PREFIX + "LongFlag";
 118         public static final String INT_FLAG = PREFIX + "IntFlag";
 119         public static final String UINT_FLAG = PREFIX + "UnsignedIntFlag";
 120 
 121         public static final String ULONG_FLAG_CHANGED = PREFIX + "UnsignedLongFlagChanged";
 122         public static final String BOOLEAN_FLAG_CHANGED = PREFIX + "BooleanFlagChanged";
 123         public static final String STRING_FLAG_CHANGED = PREFIX + "StringFlagChanged";
 124         public static final String DOUBLE_FLAG_CHANGED = PREFIX + "DoubleFlagChanged";
 125         public static final String LONG_FLAG_CHANGED = PREFIX + "LongFlagChanged";
 126         public static final String INT_FLAG_CHANGED = PREFIX + "IntFlagChanged";
 127         public static final String UINT_FLAG_CHANGED = PREFIX + "UnsignedIntFlagChanged";
 128 
 129         public static final String TIME_CONVERSION = PREFIX + "CPUTimeStampCounter";
 130         public static final String THREAD_DUMP = PREFIX + "ThreadDump";
 131         public static final String JFR_DATA_LOST = PREFIX + "DataLoss";
 132         public static final String DUMP_REASON = PREFIX + "DumpReason";
 133 
 134         public static final String GC_CONF_YOUNG_GENERATION = PREFIX + "YoungGenerationConfiguration";
 135         public static final String GC_CONF_SURVIVOR = PREFIX + "GCSurvivorConfiguration";
 136         public static final String GC_CONF_TLAB = PREFIX + "GCTLABConfiguration";
 137 
 138         public static final String JAVA_THREAD_START = PREFIX + "ThreadStart";
 139         public static final String JAVA_THREAD_END = PREFIX + "ThreadEnd";
 140 
 141         public static final String VM_OPERATIONS = PREFIX + "ExecuteVMOperation";
 142 
 143         public static final String THREAD_STATISTICS = PREFIX + "JavaThreadStatistics";
 144         public static final String CONTEXT_SWITCH_RATE = PREFIX + "ThreadContextSwitchRate";
 145 
 146         public static final String COMPILER_CONFIG = PREFIX + "CompilerConfiguration";
 147         public static final String CODE_CACHE_CONFIG = PREFIX + "CodeCacheConfiguration";
 148         public static final String CODE_SWEEPER_CONFIG = PREFIX + "CodeSweeperConfiguration";
 149         public static final String COMPILER_PHASE = PREFIX + "CompilerPhase";
 150         public static final String GC_COLLECTOR_G1_GARBAGE_COLLECTION = PREFIX + "G1GarbageCollection";
 151         public static final String GC_COLLECTOR_OLD_GARBAGE_COLLECTION = PREFIX + "OldGarbageCollection";
 152         public static final String GC_COLLECTOR_PAROLD_GARBAGE_COLLECTION = PREFIX + "ParallelOldGarbageCollection";
 153         public static final String GC_COLLECTOR_YOUNG_GARBAGE_COLLECTION = PREFIX + "YoungGarbageCollection";
 154         public static final String GC_DETAILED_ALLOCATION_REQUIRING_GC = PREFIX + "AllocationRequiringGC";
 155         public static final String GC_DETAILED_EVACUATION_FAILED = PREFIX + "EvacuationFailed";
 156         public static final String GC_DETAILED_EVACUATION_INFO = PREFIX + "EvacuationInformation";
 157         public static final String GC_DETAILED_OBJECT_COUNT_AFTER_GC = PREFIX + "ObjectCountAfterGC";
 158         public static final String GC_DETAILED_PROMOTION_FAILED = PREFIX + "PromotionFailed";
 159         public static final String GC_HEAP_PS_SUMMARY = PREFIX + "PSHeapSummary";
 160         public static final String GC_METASPACE_ALLOCATION_FAILURE = PREFIX + "MetaspaceAllocationFailure";
 161         public static final String GC_METASPACE_CHUNK_FREE_LIST_SUMMARY = PREFIX + "MetaspaceChunkFreeListSummary";
 162         public static final String GC_METASPACE_GC_THRESHOLD = PREFIX + "MetaspaceGCThreshold";
 163         public static final String GC_G1MMU = PREFIX + "G1MMU";
 164         public static final String GC_G1_EVACUATION_YOUNG_STATS = PREFIX + "G1EvacuationYoungStatistics";
 165         public static final String GC_G1_EVACUATION_OLD_STATS = PREFIX + "G1EvacuationOldStatistics";
 166         public static final String GC_G1_BASIC_IHOP = PREFIX + "G1BasicIHOP";
 167         public static final String BIASED_LOCK_SELF_REVOCATION = PREFIX + "BiasedLockSelfRevocation";
 168         public static final String BIASED_LOCK_REVOCATION = PREFIX + "BiasedLockRevocation";
 169         public static final String BIASED_LOCK_CLASS_REVOCATION = PREFIX + "BiasedLockClassRevocation";
 170         public static final String GC_G1_ADAPTIVE_IHOP = PREFIX + "G1AdaptiveIHOP";
 171 
 172         public static final String RECORDINGS = PREFIX + "ActiveRecording";
 173         public static final String RECORDING_SETTING = PREFIX + "ActiveSetting";
 174 
 175         // Safepointing begin
 176         public static final String SAFEPOINT_BEGIN = PREFIX + "SafepointBegin";
 177         // Synchronize run state of threads
 178         public static final String SAFEPOINT_STATE_SYNC = PREFIX + "SafepointStateSynchronization";
 179         // Safepointing begin waiting on running threads to block
 180         public static final String SAFEPOINT_WAIT_BLOCKED = PREFIX + "SafepointWaitBlocked";
 181         // Safepointing begin running cleanup (parent)
 182         public static final String SAFEPOINT_CLEANUP = PREFIX + "SafepointCleanup";
 183         // Safepointing begin running cleanup task, individual subtasks
 184         public static final String SAFEPOINT_CLEANUP_TASK = PREFIX + "SafepointCleanupTask";
 185         // Safepointing end
 186         public static final String SAFEPOINT_END = PREFIX + "SafepointEnd";
 187 
 188         public static final String MODULE_EXPORT = PREFIX + "ModuleExport";
 189         public static final String MODULE_REQUIRE = PREFIX + "ModuleRequire";
 190 }