当前位置: 首页>>代码示例>>Java>>正文


Java SpeculationLog类代码示例

本文整理汇总了Java中jdk.vm.ci.meta.SpeculationLog的典型用法代码示例。如果您正苦于以下问题:Java SpeculationLog类的具体用法?Java SpeculationLog怎么用?Java SpeculationLog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SpeculationLog类属于jdk.vm.ci.meta包,在下文中一共展示了SpeculationLog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: StructuredGraph

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
private StructuredGraph(String name,
                ResolvedJavaMethod method,
                int entryBCI,
                Assumptions assumptions,
                SpeculationLog speculationLog,
                boolean useProfilingInfo,
                CompilationIdentifier compilationId,
                OptionValues options,
                DebugContext debug,
                Cancellable cancellable) {
    super(name, options, debug);
    this.setStart(add(new StartNode()));
    this.rootMethod = method;
    this.graphId = uniqueGraphIds.incrementAndGet();
    this.compilationId = compilationId;
    this.entryBCI = entryBCI;
    this.assumptions = assumptions;
    this.speculationLog = speculationLog;
    this.useProfilingInfo = useProfilingInfo;
    this.cancellable = cancellable;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:StructuredGraph.java

示例2: createGraph

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
public StructuredGraph createGraph(ResolvedJavaMethod method, int entryBCI, boolean useProfilingInfo, CompilationIdentifier compilationId, OptionValues options, DebugContext debug) {
    HotSpotBackend backend = graalRuntime.getHostBackend();
    HotSpotProviders providers = backend.getProviders();
    final boolean isOSR = entryBCI != JVMCICompiler.INVOCATION_ENTRY_BCI;
    StructuredGraph graph = method.isNative() || isOSR ? null : getIntrinsicGraph(method, providers, compilationId, options, debug);

    if (graph == null) {
        SpeculationLog speculationLog = method.getSpeculationLog();
        if (speculationLog != null) {
            speculationLog.collectFailedSpeculations();
        }
        graph = new StructuredGraph.Builder(options, debug, AllowAssumptions.ifTrue(OptAssumptions.getValue(options))).method(method).entryBCI(entryBCI).speculationLog(
                        speculationLog).useProfilingInfo(useProfilingInfo).compilationId(compilationId).build();
    }
    return graph;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:HotSpotGraalCompiler.java

示例3: StructuredGraph

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
private StructuredGraph(String name,
                ResolvedJavaMethod method,
                int entryBCI,
                Assumptions assumptions,
                SpeculationLog speculationLog,
                boolean useProfilingInfo,
                CompilationIdentifier compilationId,
                OptionValues options,
                Cancellable cancellable) {
    super(name, options);
    this.setStart(add(new StartNode()));
    this.rootMethod = method;
    this.graphId = uniqueGraphIds.incrementAndGet();
    this.compilationId = compilationId;
    this.entryBCI = entryBCI;
    this.assumptions = assumptions;
    this.speculationLog = speculationLog;
    this.useProfilingInfo = useProfilingInfo;
    this.cancellable = cancellable;
}
 
开发者ID:graalvm,项目名称:graal-core,代码行数:21,代码来源:StructuredGraph.java

示例4: getSpeculationLog

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
public SpeculationLog getSpeculationLog() {
    Map<Long, SpeculationLog> map = SpeculationLogs.get(holder.mirror());
    synchronized (map) {
        SpeculationLog log = map.get(this.metaspaceMethod);
        if (log == null) {
            log = new HotSpotSpeculationLog();
            map.put(metaspaceMethod, log);
        }
        return log;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:HotSpotResolvedJavaMethodImpl.java

示例5: installCode

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
public InstalledCode installCode(ResolvedJavaMethod method, CompiledCode compiledCode, InstalledCode installedCode, SpeculationLog log, boolean isDefault) {
    InstalledCode resultInstalledCode;
    if (installedCode == null) {
        if (method == null) {
            // Must be a stub
            resultInstalledCode = new HotSpotRuntimeStub(((HotSpotCompiledCode) compiledCode).getName());
        } else {
            resultInstalledCode = new HotSpotNmethod((HotSpotResolvedJavaMethod) method, ((HotSpotCompiledCode) compiledCode).getName(), isDefault);
        }
    } else {
        resultInstalledCode = installedCode;
    }

    HotSpotSpeculationLog speculationLog = (log != null && log.hasSpeculations()) ? (HotSpotSpeculationLog) log : null;

    int result = runtime.getCompilerToVM().installCode(target, (HotSpotCompiledCode) compiledCode, resultInstalledCode, speculationLog);
    if (result != config.codeInstallResultOk) {
        String resultDesc = config.getCodeInstallResultDescription(result);
        if (compiledCode instanceof HotSpotCompiledNmethod) {
            HotSpotCompiledNmethod compiledNmethod = (HotSpotCompiledNmethod) compiledCode;
            String msg = compiledNmethod.getInstallationFailureMessage();
            if (msg != null) {
                msg = String.format("Code installation failed: %s%n%s", resultDesc, msg);
            } else {
                msg = String.format("Code installation failed: %s", resultDesc);
            }
            if (result == config.codeInstallResultDependenciesInvalid) {
                throw new AssertionError(resultDesc + " " + msg);
            }
            throw new BailoutException(result != config.codeInstallResultDependenciesFailed, msg);
        } else {
            throw new BailoutException("Error installing %s: %s", ((HotSpotCompiledCode) compiledCode).getName(), resultDesc);
        }
    }
    return logOrDump(resultInstalledCode, compiledCode);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:37,代码来源:HotSpotCodeCacheProvider.java

示例6: compile

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
public CompilationResult compile(ResolvedJavaMethod method, int entryBCI, boolean useProfilingInfo, CompilationIdentifier compilationId, OptionValues options) {
    HotSpotBackend backend = graalRuntime.getHostBackend();
    HotSpotProviders providers = backend.getProviders();
    final boolean isOSR = entryBCI != JVMCICompiler.INVOCATION_ENTRY_BCI;
    StructuredGraph graph = method.isNative() || isOSR ? null : getIntrinsicGraph(method, providers, compilationId, options);

    if (graph == null) {
        SpeculationLog speculationLog = method.getSpeculationLog();
        if (speculationLog != null) {
            speculationLog.collectFailedSpeculations();
        }
        graph = new StructuredGraph.Builder(options, AllowAssumptions.ifTrue(OptAssumptions.getValue(options))).method(method).entryBCI(entryBCI).speculationLog(
                        speculationLog).useProfilingInfo(useProfilingInfo).compilationId(compilationId).build();
    }

    Suites suites = getSuites(providers, options);
    LIRSuites lirSuites = getLIRSuites(providers, options);
    ProfilingInfo profilingInfo = useProfilingInfo ? method.getProfilingInfo(!isOSR, isOSR) : DefaultProfilingInfo.get(TriState.FALSE);
    OptimisticOptimizations optimisticOpts = getOptimisticOpts(profilingInfo, options);

    /*
     * Cut off never executed code profiles if there is code, e.g. after the osr loop, that is
     * never executed.
     */
    if (isOSR && !OnStackReplacementPhase.Options.DeoptAfterOSR.getValue(options)) {
        optimisticOpts.remove(Optimization.RemoveNeverExecutedCode);
    }
    CompilationResult result = new CompilationResult();
    result.setEntryBCI(entryBCI);
    boolean shouldDebugNonSafepoints = providers.getCodeCache().shouldDebugNonSafepoints();
    PhaseSuite<HighTierContext> graphBuilderSuite = configGraphBuilderSuite(providers.getSuites().getDefaultGraphBuilderSuite(), shouldDebugNonSafepoints, isOSR);
    GraalCompiler.compileGraph(graph, method, providers, backend, graphBuilderSuite, optimisticOpts, profilingInfo, suites, lirSuites, result, CompilationResultBuilderFactory.Default);

    if (!isOSR && useProfilingInfo) {
        ProfilingInfo profile = profilingInfo;
        profile.setCompilerIRSize(StructuredGraph.class, graph.getNodeCount());
    }

    return result;
}
 
开发者ID:graalvm,项目名称:graal-core,代码行数:41,代码来源:HotSpotGraalCompiler.java

示例7: createInstalledCode

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
/**
 * @see #createInstalledCode(DebugContext, ResolvedJavaMethod, CompilationRequest,
 *      CompilationResult, SpeculationLog, InstalledCode, boolean, Object[])
 */
public InstalledCode createInstalledCode(DebugContext debug, ResolvedJavaMethod method, CompilationResult compilationResult,
                SpeculationLog speculationLog, InstalledCode predefinedInstalledCode, boolean isDefault) {
    return createInstalledCode(debug, method, null, compilationResult, speculationLog, predefinedInstalledCode, isDefault, null);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:Backend.java

示例8: getSpeculationLog

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
public SpeculationLog getSpeculationLog() {
    return speculationLog;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:StructuredGraph.java

示例9: speculationLog

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
public Builder speculationLog(SpeculationLog log) {
    this.speculationLog = log;
    return this;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:StructuredGraph.java

示例10: getSpeculationLog

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
protected SpeculationLog getSpeculationLog() {
    return null;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:GraalCompilerTest.java

示例11: computeValue

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
@Override
protected Map<Long, SpeculationLog> computeValue(java.lang.Class<?> type) {
    return new HashMap<>(4);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:HotSpotResolvedJavaMethodImpl.java

示例12: createSpeculationLog

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
public SpeculationLog createSpeculationLog() {
    return new HotSpotSpeculationLog();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:HotSpotCodeCacheProvider.java

示例13: createInstalledCode

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
/**
 * @see #createInstalledCode(ResolvedJavaMethod, CompilationRequest, CompilationResult,
 *      SpeculationLog, InstalledCode, boolean)
 */
public InstalledCode createInstalledCode(ResolvedJavaMethod method, CompilationResult compilationResult,
                SpeculationLog speculationLog, InstalledCode predefinedInstalledCode, boolean isDefault) {
    return createInstalledCode(method, null, compilationResult, speculationLog, predefinedInstalledCode, isDefault);
}
 
开发者ID:graalvm,项目名称:graal-core,代码行数:9,代码来源:Backend.java

示例14: createSpeculationLog

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
@Override
public SpeculationLog createSpeculationLog() {
    return new HotSpotSpeculationLog();
}
 
开发者ID:graalvm,项目名称:graal-core,代码行数:5,代码来源:HotSpotTruffleRuntime.java

示例15: getSpeculationLog

import jdk.vm.ci.meta.SpeculationLog; //导入依赖的package包/类
protected synchronized SpeculationLog getSpeculationLog() {
    if (speculationLog == null) {
        speculationLog = ((GraalTruffleRuntime) Truffle.getRuntime()).createSpeculationLog();
    }
    return speculationLog;
}
 
开发者ID:graalvm,项目名称:graal-core,代码行数:7,代码来源:OptimizedCallTarget.java


注:本文中的jdk.vm.ci.meta.SpeculationLog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。