Skip to content

Commit

Permalink
7242: Adding new JDK Events to core API
Browse files Browse the repository at this point in the history
Reviewed-by: hirt
  • Loading branch information
Suchita Chaturvedi committed Jun 2, 2021
1 parent fbf2d9b commit e3e26ef
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,14 @@ public String getMember(U i) {
Messages.getString(Messages.ATTR_DUMP_REASON_RECORDING_ID),
Messages.getString(Messages.ATTR_DUMP_REASON_RECORDING_ID_DESC), PLAIN_TEXT);

public static final IAttribute<IQuantity> THREAD_SYSTEM_CPU_LOAD = Attribute.attr("system", //$NON-NLS-1$
Messages.getString(Messages.ATTR_SYSTEM_LOAD), Messages.getString(Messages.ATTR_SYSTEM_LOAD_DESC),
PERCENTAGE);
public static final IAttribute<IQuantity> THREAD_USER_CPU_LOAD = Attribute.attr("user", //$NON-NLS-1$
Messages.getString(Messages.ATTR_USER_LOAD), Messages.getString(Messages.ATTR_USER_LOAD_DESC), PERCENTAGE);
public static final IAttribute<IMCThread> JAVA_THREAD = Attribute.attr("thread", //$NON-NLS-1$
Messages.getString(Messages.ATTR_JAVA_THREAD), Messages.getString(Messages.ATTR_JAVA_THREAD_DESC), THREAD);

public static final IAttribute<String> SHUTDOWN_REASON = attr("reason", //$NON-NLS-1$
Messages.getString(Messages.ATTR_SHUTDOWN_REASON), Messages.getString(Messages.ATTR_SHUTDOWN_REASON_DESC),
PLAIN_TEXT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ public final class JdkFilters {
public static final IItemFilter BIASED_LOCKING_REVOCATIONS = ItemFilters.type(
JdkTypeIDs.BIASED_LOCK_CLASS_REVOCATION, JdkTypeIDs.BIASED_LOCK_REVOCATION,
JdkTypeIDs.BIASED_LOCK_SELF_REVOCATION);
public static final IItemFilter THREAD_CPU_LOAD = ItemFilters.type(JdkTypeIDs.THREAD_CPU_LOAD);
public static final IItemFilter NATIVE_METHOD_SAMPLE = ItemFilters.type(JdkTypeIDs.NATIVE_METHOD_SAMPLE);
public static final IItemFilter THREAD_START = ItemFilters.type(JdkTypeIDs.JAVA_THREAD_START);
public static final IItemFilter THREAD_END = ItemFilters.type(JdkTypeIDs.JAVA_THREAD_END);

public static class MethodFilter implements IItemFilter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public final class JdkTypeIDs {
private final static String PREFIX = "jdk.";

public static final String CPU_LOAD = PREFIX + "CPULoad";
public static final String THREAD_CPU_LOAD = PREFIX + "ThreadCPULoad";
public static final String EXECUTION_SAMPLE = PREFIX + "ExecutionSample";
public static final String EXECUTION_SAMPLING_INFO_EVENT_ID = PREFIX + "ExecutionSampling";
public static final String NATIVE_METHOD_SAMPLE = PREFIX + "NativeMethodSample";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,13 @@ public class Messages {
public static final String ATTR_YOUNG_GENERATION_MIN_SIZE = "ATTR_YOUNG_GENERATION_MIN_SIZE"; //$NON-NLS-1$
public static final String ATTR_SHUTDOWN_REASON = "ATTR_SHUTDOWN_REASON"; //$NON-NLS-1$
public static final String ATTR_SHUTDOWN_REASON_DESC = "ATTR_SHUTDOWN_REASON_DESC"; //$NON-NLS-1$
public static final String ATTR_SHUTDOWN_TIME = "ATTR_SHUTDOWN_TIME"; //$NON-NLS-1$
public static final String ATTR_SHUTDOWN_TIME = "ATTR_SHUTDOWN_TIME"; //$NON-NLS-1$
public static final String ATTR_SYSTEM_LOAD = "ATTR_SYSTEM_LOAD"; //$NON-NLS-1$
public static final String ATTR_SYSTEM_LOAD_DESC = "ATTR_SYSTEM_LOAD_DESC"; //$NON-NLS-1$
public static final String ATTR_USER_LOAD = "ATTR_USER_LOAD"; //$NON-NLS-1$
public static final String ATTR_USER_LOAD_DESC = "ATTR_USER_LOAD_DESC"; //$NON-NLS-1$
public static final String ATTR_JAVA_THREAD = "ATTR_JAVA_THREAD"; //$NON-NLS-1$
public static final String ATTR_JAVA_THREAD_DESC = "ATTR_JAVA_THREAD_DESC"; //$NON-NLS-1$

private Messages() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,12 @@ ATTR_SHUTDOWN_REASON_DESC=Reason for JVM Shutdown
ATTR_SHUTDOWN_TIME=Shutdown Time
ATTR_TOP_ADDRESS=Top Address
ATTR_BASE_ADDRESS=Base Address
ATTR_SYSTEM_LOAD=System Mode CPU Load
ATTR_SYSTEM_LOAD_DESC=CPU used by Thread in System mode
ATTR_USER_LOAD=User Mode CPU Load
ATTR_USER_LOAD_DESC=CPU used by Thread in User mode
ATTR_JAVA_THREAD=Java Thread
ATTR_JAVA_THREAD_DESC=Java Thread
ATTR_SAMPLE_WEIGHT=Sample Weight
AGGR_MAX_USED_MEMORY=Maximum used memory
AGGR_MIN_TOTAL_MEMORY=Available physical memory
Expand Down Expand Up @@ -449,4 +455,3 @@ AGGR_VM_OPERATION_DURATION=VM Operation Duration
AGGR_VM_OPERATION_DURATION_DESC=The sum of the durations for the selected VM operation events.
AGGR_COMPILATIONS_COUNT=Compilations
AGGR_COMPILATIONS_COUNT_DESC=The number of compilations

0 comments on commit e3e26ef

Please sign in to comment.