本文整理汇总了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));
}
}
示例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);
}
示例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);
}
示例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);
}
示例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};
}
示例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);
}
}
}
示例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()));
}
示例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));
});
}
示例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);
}
}
}
示例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;
}
示例11: getReason
import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
public InfopointReason getReason() {
return reason;
}
示例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);
}
示例13: FullInfopointOp
import jdk.vm.ci.code.site.InfopointReason; //导入依赖的package包/类
public FullInfopointOp(LIRFrameState state, InfopointReason reason) {
super(TYPE);
this.state = state;
this.reason = reason;
}
示例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));
}
}
示例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);
}