Search in sources :

Example 1 with ProfiledMethod

use of jdk.vm.ci.meta.JavaMethodProfile.ProfiledMethod in project graal by oracle.

the class StaticAnalysisResultsBuilder method createMethodProfile.

private JavaMethodProfile createMethodProfile(Collection<AnalysisMethod> callees) {
    ProfiledMethod[] pitems = new ProfiledMethod[callees.size()];
    double probability = 1d / pitems.length;
    int idx = 0;
    for (AnalysisMethod aMethod : callees) {
        ResolvedJavaMethod convertedMethod = converter == null ? aMethod : converter.lookup(aMethod);
        pitems[idx++] = new ProfiledMethod(convertedMethod, probability);
    }
    return new JavaMethodProfile(0, pitems);
}
Also used : ProfiledMethod(jdk.vm.ci.meta.JavaMethodProfile.ProfiledMethod) AnalysisMethod(com.oracle.graal.pointsto.meta.AnalysisMethod) JavaMethodProfile(jdk.vm.ci.meta.JavaMethodProfile) ResolvedJavaMethod(jdk.vm.ci.meta.ResolvedJavaMethod)

Aggregations

AnalysisMethod (com.oracle.graal.pointsto.meta.AnalysisMethod)1 JavaMethodProfile (jdk.vm.ci.meta.JavaMethodProfile)1 ProfiledMethod (jdk.vm.ci.meta.JavaMethodProfile.ProfiledMethod)1 ResolvedJavaMethod (jdk.vm.ci.meta.ResolvedJavaMethod)1