39
39
* IDs depend on the JDK version (see metadata.xml file) and are computed at image build time.
40
40
*/
41
41
public 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" );
45
43
public static final JfrEvent ThreadEnd = create ("jdk.ThreadEnd" );
46
44
public static final JfrEvent ThreadCPULoad = create ("jdk.ThreadCPULoad" );
47
45
public static final JfrEvent DataLoss = create ("jdk.DataLoss" );
@@ -63,41 +61,34 @@ public final class JfrEvent {
63
61
public static final JfrEvent SafepointBegin = create ("jdk.SafepointBegin" , JfrEventFlags .HasDuration );
64
62
public static final JfrEvent SafepointEnd = create ("jdk.SafepointEnd" , JfrEventFlags .HasDuration );
65
63
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" );
71
69
public static final JfrEvent GCHeapSummary = create ("jdk.GCHeapSummary" );
72
70
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 );
77
75
public static final JfrEvent NativeMemoryUsage = create ("jdk.NativeMemoryUsage" );
78
76
public static final JfrEvent NativeMemoryUsageTotal = create ("jdk.NativeMemoryUsageTotal" );
79
77
80
78
private final long id ;
81
79
private final String name ;
82
80
private final int flags ;
83
- private final int skipCount ;
84
81
85
82
@ Platforms (Platform .HOSTED_ONLY .class )
86
83
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 );
93
85
}
94
86
95
87
@ Platforms (Platform .HOSTED_ONLY .class )
96
- private JfrEvent (String name , int skipCount , JfrEventFlags ... flags ) {
88
+ private JfrEvent (String name , JfrEventFlags ... flags ) {
97
89
this .id = JfrMetadataTypeLibrary .lookupPlatformEvent (name );
98
90
this .name = name ;
99
91
this .flags = EnumBitmask .computeBitmask (flags );
100
- this .skipCount = skipCount ;
101
92
}
102
93
103
94
@ Uninterruptible (reason = CALLED_FROM_UNINTERRUPTIBLE_CODE , mayBeInlined = true )
@@ -107,7 +98,7 @@ public long getId() {
107
98
108
99
@ Uninterruptible (reason = CALLED_FROM_UNINTERRUPTIBLE_CODE , mayBeInlined = true )
109
100
public int getSkipCount () {
110
- return skipCount ;
101
+ return VMInspectionOptions . JfrTrimInternalStackTraces . getValue () ? 3 : 0 ;
111
102
}
112
103
113
104
@ Uninterruptible (reason = CALLED_FROM_UNINTERRUPTIBLE_CODE , mayBeInlined = true )
0 commit comments