jdk.jfr.internal.settings.ThresholdSetting Java Examples

The following examples show how to use jdk.jfr.internal.settings.ThresholdSetting. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EventControl.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Control defineThreshold(PlatformEventType type) {
    Threshold threshold = type.getAnnotation(Threshold.class);
    String def = "0 ns";
    if (threshold != null) {
        def = threshold.value();
    }
    type.add(PrivateAccess.getInstance().newSettingDescriptor(TYPE_THRESHOLD, Threshold.NAME, def, Collections.emptyList()));
    return new ThresholdSetting(type, def);
}
 
Example #2
Source File: Utils.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isSettingVisible(Control c, boolean hasEventHook) {
    if (c instanceof ThresholdSetting) {
        return !hasEventHook;
    }
    if (c instanceof PeriodSetting) {
        return hasEventHook;
    }
    if (c instanceof StackTraceSetting) {
        return !hasEventHook;
    }
    return true;
}
 
Example #3
Source File: Utils.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isSettingVisible(long typeId, boolean hasEventHook) {
    if (ThresholdSetting.isType(typeId)) {
        return !hasEventHook;
    }
    if (PeriodSetting.isType(typeId)) {
        return hasEventHook;
    }
    if (StackTraceSetting.isType(typeId)) {
        return !hasEventHook;
    }
    return true;
}
 
Example #4
Source File: EventControl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static Control defineThreshold(PlatformEventType type) {
    Threshold threshold = type.getAnnotation(Threshold.class);
    String def = "0 ns";
    if (threshold != null) {
        def = threshold.value();
    }
    type.add(PrivateAccess.getInstance().newSettingDescriptor(TYPE_THRESHOLD, Threshold.NAME, def, Collections.emptyList()));
    return new ThresholdSetting(type, def);
}
 
Example #5
Source File: Utils.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isSettingVisible(Control c, boolean hasEventHook) {
    if (c instanceof ThresholdSetting) {
        return !hasEventHook;
    }
    if (c instanceof PeriodSetting) {
        return hasEventHook;
    }
    if (c instanceof StackTraceSetting) {
        return !hasEventHook;
    }
    return true;
}
 
Example #6
Source File: Utils.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isSettingVisible(long typeId, boolean hasEventHook) {
    if (ThresholdSetting.isType(typeId)) {
        return !hasEventHook;
    }
    if (PeriodSetting.isType(typeId)) {
        return hasEventHook;
    }
    if (StackTraceSetting.isType(typeId)) {
        return !hasEventHook;
    }
    return true;
}
 
Example #7
Source File: EventControl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static Control defineThreshold(PlatformEventType type) {
    Threshold threshold = type.getAnnotation(Threshold.class);
    String def = "0 ns";
    if (threshold != null) {
        def = threshold.value();
    }
    type.add(PrivateAccess.getInstance().newSettingDescriptor(TYPE_THRESHOLD, Threshold.NAME, def, Collections.emptyList()));
    return new ThresholdSetting(type, def);
}
 
Example #8
Source File: Utils.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isSettingVisible(Control c, boolean hasEventHook) {
    if (c instanceof ThresholdSetting) {
        return !hasEventHook;
    }
    if (c instanceof PeriodSetting) {
        return hasEventHook;
    }
    if (c instanceof StackTraceSetting) {
        return !hasEventHook;
    }
    return true;
}
 
Example #9
Source File: Utils.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isSettingVisible(long typeId, boolean hasEventHook) {
    if (ThresholdSetting.isType(typeId)) {
        return !hasEventHook;
    }
    if (PeriodSetting.isType(typeId)) {
        return hasEventHook;
    }
    if (StackTraceSetting.isType(typeId)) {
        return !hasEventHook;
    }
    return true;
}