3939 * IDs depend on the JDK version (see metadata.xml file) and are computed at image build time.
4040 */
4141public final class JfrEvent {
42- private static final int defaultInternalSkipCount = VMInspectionOptions .JfrTrimInternalStackTraces .getValue () ? 3 : 0 ;
43-
44- public static final JfrEvent ThreadStart = create ("jdk.ThreadStart" , defaultInternalSkipCount );
42+ public static final JfrEvent ThreadStart = create ("jdk.ThreadStart" );
4543 public static final JfrEvent ThreadEnd = create ("jdk.ThreadEnd" );
4644 public static final JfrEvent ThreadCPULoad = create ("jdk.ThreadCPULoad" );
4745 public static final JfrEvent DataLoss = create ("jdk.DataLoss" );
@@ -63,41 +61,34 @@ public final class JfrEvent {
6361 public static final JfrEvent SafepointBegin = create ("jdk.SafepointBegin" , JfrEventFlags .HasDuration );
6462 public static final JfrEvent SafepointEnd = create ("jdk.SafepointEnd" , JfrEventFlags .HasDuration );
6563 public static final JfrEvent ExecuteVMOperation = create ("jdk.ExecuteVMOperation" , JfrEventFlags .HasDuration );
66- public static final JfrEvent JavaMonitorEnter = create ("jdk.JavaMonitorEnter" , defaultInternalSkipCount , JfrEventFlags .HasDuration );
67- public static final JfrEvent ThreadPark = create ("jdk.ThreadPark" , defaultInternalSkipCount , JfrEventFlags .HasDuration );
68- public static final JfrEvent JavaMonitorWait = create ("jdk.JavaMonitorWait" , defaultInternalSkipCount , JfrEventFlags .HasDuration );
69- public static final JfrEvent JavaMonitorInflate = create ("jdk.JavaMonitorInflate" , defaultInternalSkipCount , JfrEventFlags .HasDuration );
70- public static final JfrEvent ObjectAllocationInNewTLAB = create ("jdk.ObjectAllocationInNewTLAB" , defaultInternalSkipCount );
64+ public static final JfrEvent JavaMonitorEnter = create ("jdk.JavaMonitorEnter" , JfrEventFlags .HasDuration );
65+ public static final JfrEvent ThreadPark = create ("jdk.ThreadPark" , JfrEventFlags .HasDuration );
66+ public static final JfrEvent JavaMonitorWait = create ("jdk.JavaMonitorWait" , JfrEventFlags .HasDuration );
67+ public static final JfrEvent JavaMonitorInflate = create ("jdk.JavaMonitorInflate" , JfrEventFlags .HasDuration );
68+ public static final JfrEvent ObjectAllocationInNewTLAB = create ("jdk.ObjectAllocationInNewTLAB" );
7169 public static final JfrEvent GCHeapSummary = create ("jdk.GCHeapSummary" );
7270 public static final JfrEvent ThreadAllocationStatistics = create ("jdk.ThreadAllocationStatistics" );
73- public static final JfrEvent SystemGC = create ("jdk.SystemGC" , defaultInternalSkipCount , JfrEventFlags .HasDuration );
74- public static final JfrEvent AllocationRequiringGC = create ("jdk.AllocationRequiringGC" , defaultInternalSkipCount );
75- public static final JfrEvent OldObjectSample = create ("jdk.OldObjectSample" , defaultInternalSkipCount );
76- public static final JfrEvent ObjectAllocationSample = create ("jdk.ObjectAllocationSample" , defaultInternalSkipCount , JfrEventFlags .SupportsThrottling );
71+ public static final JfrEvent SystemGC = create ("jdk.SystemGC" , JfrEventFlags .HasDuration );
72+ public static final JfrEvent AllocationRequiringGC = create ("jdk.AllocationRequiringGC" );
73+ public static final JfrEvent OldObjectSample = create ("jdk.OldObjectSample" );
74+ public static final JfrEvent ObjectAllocationSample = create ("jdk.ObjectAllocationSample" , JfrEventFlags .SupportsThrottling );
7775 public static final JfrEvent NativeMemoryUsage = create ("jdk.NativeMemoryUsage" );
7876 public static final JfrEvent NativeMemoryUsageTotal = create ("jdk.NativeMemoryUsageTotal" );
7977
8078 private final long id ;
8179 private final String name ;
8280 private final int flags ;
83- private final int skipCount ;
8481
8582 @ Platforms (Platform .HOSTED_ONLY .class )
8683 public static JfrEvent create (String name , JfrEventFlags ... flags ) {
87- return new JfrEvent (name , 0 , flags );
88- }
89-
90- @ Platforms (Platform .HOSTED_ONLY .class )
91- public static JfrEvent create (String name , int skipCount , JfrEventFlags ... flags ) {
92- return new JfrEvent (name , skipCount , flags );
84+ return new JfrEvent (name , flags );
9385 }
9486
9587 @ Platforms (Platform .HOSTED_ONLY .class )
96- private JfrEvent (String name , int skipCount , JfrEventFlags ... flags ) {
88+ private JfrEvent (String name , JfrEventFlags ... flags ) {
9789 this .id = JfrMetadataTypeLibrary .lookupPlatformEvent (name );
9890 this .name = name ;
9991 this .flags = EnumBitmask .computeBitmask (flags );
100- this .skipCount = skipCount ;
10192 }
10293
10394 @ Uninterruptible (reason = CALLED_FROM_UNINTERRUPTIBLE_CODE , mayBeInlined = true )
@@ -107,7 +98,7 @@ public long getId() {
10798
10899 @ Uninterruptible (reason = CALLED_FROM_UNINTERRUPTIBLE_CODE , mayBeInlined = true )
109100 public int getSkipCount () {
110- return skipCount ;
101+ return VMInspectionOptions . JfrTrimInternalStackTraces . getValue () ? 3 : 0 ;
111102 }
112103
113104 @ Uninterruptible (reason = CALLED_FROM_UNINTERRUPTIBLE_CODE , mayBeInlined = true )
0 commit comments