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


Java InfopointReason类代码示例

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


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

示例1: emitCode

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
public static void emitCode(CompilationResultBuilder crb, AArch64MacroAssembler masm, GraalHotSpotVMConfig config, boolean onReturn, Register scratch, LIRFrameState state) {
    if (isPollingPageFar(config)) {
        crb.recordMark(onReturn ? config.MARKID_POLL_RETURN_FAR : config.MARKID_POLL_FAR);
        masm.movNativeAddress(scratch, config.safepointPollingAddress);
        crb.recordMark(onReturn ? config.MARKID_POLL_RETURN_FAR : config.MARKID_POLL_FAR);
        if (state != null) {
            crb.recordInfopoint(masm.position(), state, InfopointReason.SAFEPOINT);
        }
        masm.ldr(32, zr, AArch64Address.createBaseRegisterOnlyAddress(scratch));
    } else {
        crb.recordMark(onReturn ? config.MARKID_POLL_RETURN_NEAR : config.MARKID_POLL_NEAR);
        if (state != null) {
            crb.recordInfopoint(masm.position(), state, InfopointReason.SAFEPOINT);
        }
        masm.ldr(32, zr, AArch64Address.createPcLiteralAddress(0));
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:AArch64HotSpotSafepointOp.java

示例2: lineInfopoints

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
@Test
public void lineInfopoints() {
    final ResolvedJavaMethod method = getResolvedJavaMethod("testMethod");
    final StructuredGraph graph = parse(builder(method, AllowAssumptions.ifTrue(OptAssumptions.getValue(getInitialOptions()))), getDebugGraphBuilderSuite());
    int graphLineSPs = 0;
    for (FullInfopointNode ipn : graph.getNodes().filter(FullInfopointNode.class)) {
        if (ipn.getReason() == InfopointReason.BYTECODE_POSITION) {
            ++graphLineSPs;
        }
    }
    assertTrue(graphLineSPs > 0);
    PhaseSuite<HighTierContext> graphBuilderSuite = getCustomGraphBuilderSuite(GraphBuilderConfiguration.getDefault(getDefaultGraphBuilderPlugins()).withFullInfopoints(true));
    final CompilationResult cr = compileGraph(graph, graph.method(), getProviders(), getBackend(), graphBuilderSuite, OptimisticOptimizations.ALL, graph.getProfilingInfo(),
                    createSuites(graph.getOptions()), createLIRSuites(graph.getOptions()), new CompilationResult(graph.compilationId()), CompilationResultBuilderFactory.Default);
    int lineSPs = 0;
    for (Infopoint sp : cr.getInfopoints()) {
        assertNotNull(sp.reason);
        if (sp.reason == InfopointReason.BYTECODE_POSITION) {
            ++lineSPs;
        }
    }
    assertTrue(lineSPs > 0);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:24,代码来源:InfopointReasonTest.java

示例3: lineInfopoints

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
@Test
public void lineInfopoints() {
    final ResolvedJavaMethod method = getResolvedJavaMethod("testMethod");
    final StructuredGraph graph = parseDebug(method, AllowAssumptions.ifTrue(OptAssumptions.getValue(getInitialOptions())));
    int graphLineSPs = 0;
    for (FullInfopointNode ipn : graph.getNodes().filter(FullInfopointNode.class)) {
        if (ipn.getReason() == InfopointReason.BYTECODE_POSITION) {
            ++graphLineSPs;
        }
    }
    assertTrue(graphLineSPs > 0);
    PhaseSuite<HighTierContext> graphBuilderSuite = getCustomGraphBuilderSuite(GraphBuilderConfiguration.getDefault(getDefaultGraphBuilderPlugins()).withFullInfopoints(true));
    final CompilationResult cr = compileGraph(graph, graph.method(), getProviders(), getBackend(), graphBuilderSuite, OptimisticOptimizations.ALL, graph.getProfilingInfo(),
                    createSuites(graph.getOptions()), createLIRSuites(graph.getOptions()), new CompilationResult(), CompilationResultBuilderFactory.Default);
    int lineSPs = 0;
    for (Infopoint sp : cr.getInfopoints()) {
        assertNotNull(sp.reason);
        if (sp.reason == InfopointReason.BYTECODE_POSITION) {
            ++lineSPs;
        }
    }
    assertTrue(lineSPs > 0);
}
 
开发者ID:graalvm,项目名称:graal-core,代码行数:24,代码来源:InfopointReasonTest.java

示例4: emitCode

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
public static void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm, GraalHotSpotVMConfig config, boolean atReturn, LIRFrameState state, Register safepointPollAddress) {
    crb.recordMark(atReturn ? config.MARKID_POLL_RETURN_FAR : config.MARKID_POLL_FAR);
    if (state != null) {
        final int pos = masm.position();
        crb.recordInfopoint(pos, state, InfopointReason.SAFEPOINT);
    }
    masm.ldx(new SPARCAddress(safepointPollAddress, 0), g0);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:SPARCHotSpotSafepointOp.java

示例5: countMethodInfopoints

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
private static int[] countMethodInfopoints(StructuredGraph graph) {
    int start = 0;
    int end = 0;
    for (FullInfopointNode ipn : graph.getNodes().filter(FullInfopointNode.class)) {
        if (ipn.getReason() == InfopointReason.METHOD_START) {
            ++start;
        } else if (ipn.getReason() == InfopointReason.METHOD_END) {
            ++end;
        }
    }
    return new int[]{start, end};
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:InliningTest.java

示例6: callInfopoints

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
@Test
public void callInfopoints() {
    final ResolvedJavaMethod method = getResolvedJavaMethod("testMethod");
    final StructuredGraph graph = parseEager(method, AllowAssumptions.YES);
    final CompilationResult cr = compileGraph(graph, graph.method(), getProviders(), getBackend(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL, graph.getProfilingInfo(),
                    createSuites(graph.getOptions()), createLIRSuites(graph.getOptions()), new CompilationResult(graph.compilationId()), CompilationResultBuilderFactory.Default);
    for (Infopoint sp : cr.getInfopoints()) {
        assertNotNull(sp.reason);
        if (sp instanceof Call) {
            assertDeepEquals(InfopointReason.CALL, sp.reason);
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:InfopointReasonTest.java

示例7: genThrow

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
protected void genThrow() {
    genInfoPointNode(InfopointReason.BYTECODE_POSITION, null);

    ValueNode exception = frameState.pop(JavaKind.Object);
    FixedGuardNode nullCheck = append(new FixedGuardNode(graph.addOrUniqueWithInputs(IsNullNode.create(exception)), NullCheckException, InvalidateReprofile, true));
    ValueNode nonNullException = graph.maybeAddOrUnique(PiNode.create(exception, exception.stamp().join(objectNonNull()), nullCheck));
    lastInstr.setNext(handleException(nonNullException, bci()));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:BytecodeParser.java

示例8: generate

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
@Override
public void generate(NodeLIRBuilderTool gen) {
    LIRGeneratorTool tool = gen.getLIRGeneratorTool();
    LIRFrameState state = gen.state(this);
    spec.spec(tool, state, st -> {
        tool.append(new FullInfopointOp(st, InfopointReason.SAFEPOINT));
    });
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:JVMCIInfopointErrorTest.java

示例9: callInfopoints

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
@Test
public void callInfopoints() {
    final ResolvedJavaMethod method = getResolvedJavaMethod("testMethod");
    final StructuredGraph graph = parseEager(method, AllowAssumptions.YES);
    final CompilationResult cr = compileGraph(graph, graph.method(), getProviders(), getBackend(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL, graph.getProfilingInfo(),
                    createSuites(graph.getOptions()), createLIRSuites(graph.getOptions()), new CompilationResult(), CompilationResultBuilderFactory.Default);
    for (Infopoint sp : cr.getInfopoints()) {
        assertNotNull(sp.reason);
        if (sp instanceof Call) {
            assertDeepEquals(InfopointReason.CALL, sp.reason);
        }
    }
}
 
开发者ID:graalvm,项目名称:graal-core,代码行数:14,代码来源:InfopointReasonTest.java

示例10: FullInfopointNode

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
public FullInfopointNode(InfopointReason reason, FrameState state, ValueNode escapedReturnValue) {
    super(TYPE, StampFactory.forVoid());
    this.reason = reason;
    this.state = state;
    this.escapedReturnValue = escapedReturnValue;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:7,代码来源:FullInfopointNode.java

示例11: getReason

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
public InfopointReason getReason() {
    return reason;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:FullInfopointNode.java

示例12: recordInfopoint

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
public void recordInfopoint(int pos, LIRFrameState info, InfopointReason reason) {
    // infopoints always need debug info
    DebugInfo debugInfo = info.debugInfo();
    recordInfopoint(pos, debugInfo, reason);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:CompilationResultBuilder.java

示例13: FullInfopointOp

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
public FullInfopointOp(LIRFrameState state, InfopointReason reason) {
    super(TYPE);
    this.state = state;
    this.reason = reason;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:FullInfopointOp.java

示例14: genInfoPointNode

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
private void genInfoPointNode(InfopointReason reason, ValueNode escapedReturnValue) {
    if (!parsingIntrinsic() && graphBuilderConfig.insertFullInfopoints()) {
        append(new FullInfopointNode(reason, createFrameState(bci(), null), escapedReturnValue));
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:BytecodeParser.java

示例15: testInfopointMissingDebugInfo

import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
@Test(expected = JVMCIError.class)
public void testInfopointMissingDebugInfo() {
    Infopoint info = new Infopoint(0, null, InfopointReason.METHOD_START);
    installEmptyCode(new Site[]{info}, new Assumption[0], new Comment[0], 16, new DataPatch[0], null);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:TestInvalidCompilationResult.java


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