jdk.jfr.internal.settings.StackTraceSetting Java Examples

The following examples show how to use jdk.jfr.internal.settings.StackTraceSetting. 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 defineStackTrace(PlatformEventType type) {
    StackTrace stackTrace = type.getAnnotation(StackTrace.class);
    String def = "true";
    if (stackTrace != null) {
        def = Boolean.toString(stackTrace.value());
    }
    type.add(PrivateAccess.getInstance().newSettingDescriptor(TYPE_STACK_TRACE, StackTrace.NAME, def, Collections.emptyList()));
    return new StackTraceSetting(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 defineStackTrace(PlatformEventType type) {
    StackTrace stackTrace = type.getAnnotation(StackTrace.class);
    String def = "true";
    if (stackTrace != null) {
        def = Boolean.toString(stackTrace.value());
    }
    type.add(PrivateAccess.getInstance().newSettingDescriptor(TYPE_STACK_TRACE, StackTrace.NAME, def, Collections.emptyList()));
    return new StackTraceSetting(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 defineStackTrace(PlatformEventType type) {
    StackTrace stackTrace = type.getAnnotation(StackTrace.class);
    String def = "true";
    if (stackTrace != null) {
        def = Boolean.toString(stackTrace.value());
    }
    type.add(PrivateAccess.getInstance().newSettingDescriptor(TYPE_STACK_TRACE, StackTrace.NAME, def, Collections.emptyList()));
    return new StackTraceSetting(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;
}