Search in sources :

Example 1 with Kind

use of com.oracle.svm.core.annotate.RecomputeFieldValue.Kind in project graal by oracle.

the class UnsafeAutomaticSubstitutionProcessor method reportUnnecessarySubstitution.

private static void reportUnnecessarySubstitution(ResolvedJavaField offsetField, ComputedValueField computedSubstitutionField) {
    if (Options.UnsafeAutomaticSubstitutionsLogLevel.getValue() >= BASIC_LEVEL) {
        Kind kind = computedSubstitutionField.getRecomputeValueKind();
        String kindStr = RecomputeFieldValue.class.getSimpleName() + "." + kind;
        String annotatedFieldStr = computedSubstitutionField.getAnnotated().format("%H.%n");
        String offsetFieldStr = offsetField.format("%H.%n");
        String msg = "Detected unnecessary " + kindStr + " " + annotatedFieldStr + " substitution field for " + offsetFieldStr + ". ";
        msg += "The annotated field can be removed. This " + kind + " computation can be detected automatically. ";
        msg += "Use option -H:+" + Options.UnsafeAutomaticSubstitutionsLogLevel.getName() + "=" + INFO_LEVEL + " to print all automatically detected substitutions. ";
        System.out.println(msg);
    }
}
Also used : JavaKind(jdk.vm.ci.meta.JavaKind) Kind(com.oracle.svm.core.annotate.RecomputeFieldValue.Kind)

Aggregations

Kind (com.oracle.svm.core.annotate.RecomputeFieldValue.Kind)1 JavaKind (jdk.vm.ci.meta.JavaKind)1