Merge
This commit is contained in:
commit
6caaf8e2f2
src
hotspot/share/aot
java.base/linux/classes/sun/nio/fs
java.net.http/share/classes/java/net/http
jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat
jdk.internal.vm.compiler/share/classes
org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64
AArch64HotSpotBackend.javaAArch64HotSpotDeoptimizeCallerOp.javaAArch64HotSpotEpilogueOp.javaAArch64HotSpotJumpToExceptionHandlerInCallerOp.javaAArch64HotSpotLIRGenerator.javaAArch64HotSpotReturnOp.javaAArch64HotSpotUnwindOp.java
org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64
org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc
org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test
org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot
jdk.javadoc/share/classes/jdk/javadoc/internal/doclets
test
hotspot/jtreg
langtools/jdk/javadoc/doclet
testDeprecatedDocs
testHtmlDefinitionListTag
testIndentation
testInterface
testJavaFX
testLambdaFeature
testLiteralCodeInPre
testMemberSummary
testNewLanguageFeatures
testOptions
testOverriddenMethods
testPrivateClasses
testSerializedFormWithClassFile
testSummaryTag
testTypeAnnotations
@ -450,6 +450,7 @@ void AOTCodeHeap::link_shared_runtime_symbols() {
|
||||
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_object_notify", address, JVMCIRuntime::object_notify);
|
||||
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_object_notifyAll", address, JVMCIRuntime::object_notifyAll);
|
||||
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_OSR_migration_end", address, SharedRuntime::OSR_migration_end);
|
||||
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_enable_stack_reserved_zone", address, SharedRuntime::enable_stack_reserved_zone);
|
||||
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_resolve_dynamic_invoke", address, CompilerRuntime::resolve_dynamic_invoke);
|
||||
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_resolve_string_by_symbol", address, CompilerRuntime::resolve_string_by_symbol);
|
||||
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_resolve_klass_by_symbol", address, CompilerRuntime::resolve_klass_by_symbol);
|
||||
|
@ -25,9 +25,14 @@
|
||||
|
||||
package sun.nio.fs;
|
||||
|
||||
import java.nio.file.attribute.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.attribute.DosFileAttributeView;
|
||||
import java.nio.file.attribute.FileAttributeView;
|
||||
import java.nio.file.attribute.PosixFileAttributeView;
|
||||
import java.nio.file.attribute.UserDefinedFileAttributeView;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Linux implementation of FileStore
|
||||
@ -121,6 +126,18 @@ class LinuxFileStore
|
||||
return false;
|
||||
}
|
||||
|
||||
// get kernel version as a three element array {major, minor, micro}
|
||||
private static int[] getKernelVersion() {
|
||||
Pattern pattern = Pattern.compile("\\D+");
|
||||
String[] matches = pattern.split(System.getProperty("os.version"));
|
||||
int[] majorMinorMicro = new int[3];
|
||||
int length = Math.min(matches.length, majorMinorMicro.length);
|
||||
for (int i = 0; i < length; i++) {
|
||||
majorMinorMicro[i] = Integer.valueOf(matches[i]);
|
||||
}
|
||||
return majorMinorMicro;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFileAttributeView(Class<? extends FileAttributeView> type) {
|
||||
// support DosFileAttributeView and UserDefinedAttributeView if extended
|
||||
@ -140,11 +157,31 @@ class LinuxFileStore
|
||||
if ((entry().hasOption("user_xattr")))
|
||||
return true;
|
||||
|
||||
// for ext3 and ext4 user_xattr option is enabled by default so
|
||||
// check for explicit disabling of this option
|
||||
if (entry().fstype().equals("ext3") ||
|
||||
entry().fstype().equals("ext4")) {
|
||||
return !entry().hasOption("nouser_xattr");
|
||||
// check for explicit disabling of extended attributes
|
||||
if (entry().hasOption("nouser_xattr")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// user_{no}xattr options not present but we special-case ext3 as
|
||||
// we know that extended attributes are not enabled by default.
|
||||
if (entry().fstype().equals("ext3")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// user_xattr option not present but we special-case ext4 as we
|
||||
// know that extended attributes are enabled by default for
|
||||
// kernel version >= 2.6.39
|
||||
if (entry().fstype().equals("ext4")) {
|
||||
if (!xattrChecked) {
|
||||
// check kernel version
|
||||
int[] kernelVersion = getKernelVersion();
|
||||
xattrEnabled = kernelVersion[0] > 2 ||
|
||||
(kernelVersion[0] == 2 && kernelVersion[1] > 6) ||
|
||||
(kernelVersion[0] == 2 && kernelVersion[1] == 6 &&
|
||||
kernelVersion[2] >= 39);
|
||||
xattrChecked = true;
|
||||
}
|
||||
return xattrEnabled;
|
||||
}
|
||||
|
||||
// not ext3/4 so probe mount point
|
||||
|
@ -1188,7 +1188,7 @@ public interface HttpResponse<T> {
|
||||
|
||||
/**
|
||||
* Returns a response subscriber which publishes the response body
|
||||
* through a {@link Publisher Publisher<List<ByteBuffer>>}.
|
||||
* through a {@code Publisher<List<ByteBuffer>>}.
|
||||
*
|
||||
* <p> The {@link HttpResponse} using this subscriber is available
|
||||
* immediately after the response headers have been read, without
|
||||
|
@ -146,6 +146,7 @@ public final class BinaryContainer implements SymbolTable {
|
||||
{"SharedRuntime::exception_handler_for_return_address", "_aot_exception_handler_for_return_address"},
|
||||
{"SharedRuntime::register_finalizer", "_aot_register_finalizer"},
|
||||
{"SharedRuntime::OSR_migration_end", "_aot_OSR_migration_end"},
|
||||
{"SharedRuntime::enable_stack_reserved_zone", "_aot_enable_stack_reserved_zone"},
|
||||
{"CompilerRuntime::resolve_dynamic_invoke", "_aot_resolve_dynamic_invoke"},
|
||||
{"CompilerRuntime::resolve_string_by_symbol", "_aot_resolve_string_by_symbol"},
|
||||
{"CompilerRuntime::resolve_klass_by_symbol", "_aot_resolve_klass_by_symbol"},
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -110,7 +110,7 @@ public class AArch64HotSpotBackend extends HotSpotHostBackend {
|
||||
|
||||
@Override
|
||||
public LIRGenerationResult newLIRGenerationResult(CompilationIdentifier compilationId, LIR lir, FrameMapBuilder frameMapBuilder, StructuredGraph graph, Object stub) {
|
||||
return new HotSpotLIRGenerationResult(compilationId, lir, frameMapBuilder, makeCallingConvention(graph, (Stub) stub), stub);
|
||||
return new HotSpotLIRGenerationResult(compilationId, lir, frameMapBuilder, makeCallingConvention(graph, (Stub) stub), stub, config.requiresReservedStackCheck(graph.getMethods()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,7 +46,7 @@ public class AArch64HotSpotDeoptimizeCallerOp extends AArch64HotSpotEpilogueOp {
|
||||
|
||||
@Override
|
||||
public void emitCode(CompilationResultBuilder crb, AArch64MacroAssembler masm) {
|
||||
leaveFrame(crb, masm, /* emitSafepoint */false);
|
||||
leaveFrame(crb, masm, /* emitSafepoint */false, false);
|
||||
AArch64Call.directJmp(crb, masm, crb.foreignCalls.lookupForeignCall(UNCOMMON_TRAP_HANDLER));
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,14 +24,29 @@
|
||||
|
||||
package org.graalvm.compiler.hotspot.aarch64;
|
||||
|
||||
import static jdk.vm.ci.aarch64.AArch64.lr;
|
||||
import static jdk.vm.ci.aarch64.AArch64.sp;
|
||||
import static jdk.vm.ci.aarch64.AArch64.zr;
|
||||
import static jdk.vm.ci.hotspot.aarch64.AArch64HotSpotRegisterConfig.fp;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotHostBackend.ENABLE_STACK_RESERVED_ZONE;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotHostBackend.THROW_DELAYED_STACKOVERFLOW_ERROR;
|
||||
|
||||
import org.graalvm.compiler.asm.Label;
|
||||
import org.graalvm.compiler.asm.aarch64.AArch64Address;
|
||||
import org.graalvm.compiler.asm.aarch64.AArch64Assembler;
|
||||
import org.graalvm.compiler.asm.aarch64.AArch64MacroAssembler;
|
||||
import org.graalvm.compiler.asm.aarch64.AArch64MacroAssembler.ScratchRegister;
|
||||
import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
|
||||
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
|
||||
import org.graalvm.compiler.hotspot.meta.HotSpotForeignCallsProvider;
|
||||
import org.graalvm.compiler.lir.LIRInstructionClass;
|
||||
import org.graalvm.compiler.lir.aarch64.AArch64BlockEndOp;
|
||||
import org.graalvm.compiler.lir.aarch64.AArch64Call;
|
||||
import org.graalvm.compiler.lir.asm.CompilationResultBuilder;
|
||||
|
||||
import jdk.vm.ci.code.CallingConvention;
|
||||
import jdk.vm.ci.code.Register;
|
||||
import jdk.vm.ci.code.RegisterValue;
|
||||
|
||||
/**
|
||||
* Superclass for operations that leave a method's frame.
|
||||
@ -53,9 +68,31 @@ abstract class AArch64HotSpotEpilogueOp extends AArch64BlockEndOp {
|
||||
this.thread = null; // no safepoint
|
||||
}
|
||||
|
||||
protected void leaveFrame(CompilationResultBuilder crb, AArch64MacroAssembler masm, boolean emitSafepoint) {
|
||||
protected void leaveFrame(CompilationResultBuilder crb, AArch64MacroAssembler masm, boolean emitSafepoint, boolean requiresReservedStackAccessCheck) {
|
||||
assert crb.frameContext != null : "We never elide frames in aarch64";
|
||||
crb.frameContext.leave(crb);
|
||||
if (requiresReservedStackAccessCheck) {
|
||||
HotSpotForeignCallsProvider foreignCalls = (HotSpotForeignCallsProvider) crb.foreignCalls;
|
||||
Label noReserved = new Label();
|
||||
try (ScratchRegister sc = masm.getScratchRegister()) {
|
||||
Register scratch = sc.getRegister();
|
||||
masm.ldr(64, scratch, masm.makeAddress(thread, config.javaThreadReservedStackActivationOffset, 8));
|
||||
masm.subs(64, zr, sp, scratch);
|
||||
}
|
||||
masm.branchConditionally(AArch64Assembler.ConditionFlag.LO, noReserved);
|
||||
ForeignCallLinkage enableStackReservedZone = foreignCalls.lookupForeignCall(ENABLE_STACK_RESERVED_ZONE);
|
||||
CallingConvention cc = enableStackReservedZone.getOutgoingCallingConvention();
|
||||
assert cc.getArgumentCount() == 1;
|
||||
Register arg0 = ((RegisterValue) cc.getArgument(0)).getRegister();
|
||||
masm.mov(64, arg0, thread);
|
||||
try (ScratchRegister sc = masm.getScratchRegister()) {
|
||||
masm.stp(64, fp, lr, AArch64Address.createPreIndexedImmediateAddress(sp, -2));
|
||||
AArch64Call.directCall(crb, masm, enableStackReservedZone, sc.getRegister(), null);
|
||||
masm.ldp(64, fp, lr, AArch64Address.createPostIndexedImmediateAddress(sp, 2));
|
||||
}
|
||||
AArch64Call.directJmp(crb, masm, foreignCalls.lookupForeignCall(THROW_DELAYED_STACKOVERFLOW_ERROR));
|
||||
masm.bind(noReserved);
|
||||
}
|
||||
if (emitSafepoint) {
|
||||
try (ScratchRegister sc = masm.getScratchRegister()) {
|
||||
Register scratch = sc.getRegister();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,10 +24,10 @@
|
||||
|
||||
package org.graalvm.compiler.hotspot.aarch64;
|
||||
|
||||
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.REG;
|
||||
import static jdk.vm.ci.aarch64.AArch64.sp;
|
||||
import static jdk.vm.ci.code.ValueUtil.asRegister;
|
||||
import static jdk.vm.ci.hotspot.aarch64.AArch64HotSpotRegisterConfig.fp;
|
||||
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.REG;
|
||||
|
||||
import org.graalvm.compiler.asm.Label;
|
||||
import org.graalvm.compiler.asm.aarch64.AArch64Address;
|
||||
@ -69,7 +69,7 @@ public class AArch64HotSpotJumpToExceptionHandlerInCallerOp extends AArch64HotSp
|
||||
|
||||
@Override
|
||||
public void emitCode(CompilationResultBuilder crb, AArch64MacroAssembler masm) {
|
||||
leaveFrame(crb, masm, /* emitSafepoint */false);
|
||||
leaveFrame(crb, masm, /* emitSafepoint */false, false);
|
||||
|
||||
if (GraalServices.JAVA_SPECIFICATION_VERSION < 8) {
|
||||
// Restore sp from fp if the exception PC is a method handle call site.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -28,19 +28,18 @@ package org.graalvm.compiler.hotspot.aarch64;
|
||||
|
||||
import static org.graalvm.compiler.core.common.GraalOptions.GeneratePIC;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotBackend.INITIALIZE_KLASS_BY_SYMBOL;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotBackend.RESOLVE_DYNAMIC_INVOKE;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotBackend.RESOLVE_KLASS_BY_SYMBOL;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotBackend.RESOLVE_METHOD_BY_SYMBOL_AND_LOAD_COUNTERS;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotBackend.RESOLVE_STRING_BY_SYMBOL;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotBackend.RESOLVE_DYNAMIC_INVOKE;
|
||||
import static org.graalvm.compiler.hotspot.meta.HotSpotConstantLoadAction.RESOLVE;
|
||||
import static org.graalvm.compiler.hotspot.meta.HotSpotConstantLoadAction.INITIALIZE;
|
||||
import static org.graalvm.compiler.hotspot.meta.HotSpotConstantLoadAction.LOAD_COUNTERS;
|
||||
import static org.graalvm.compiler.hotspot.meta.HotSpotConstantLoadAction.RESOLVE;
|
||||
import static org.graalvm.compiler.lir.LIRValueUtil.asConstant;
|
||||
import static org.graalvm.compiler.lir.LIRValueUtil.isConstantValue;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import jdk.vm.ci.hotspot.HotSpotMetaspaceConstant;
|
||||
import org.graalvm.compiler.asm.Label;
|
||||
import org.graalvm.compiler.asm.aarch64.AArch64Address.AddressingMode;
|
||||
import org.graalvm.compiler.asm.aarch64.AArch64Assembler.ConditionFlag;
|
||||
@ -81,10 +80,10 @@ import org.graalvm.compiler.lir.aarch64.AArch64FrameMapBuilder;
|
||||
import org.graalvm.compiler.lir.aarch64.AArch64Move;
|
||||
import org.graalvm.compiler.lir.aarch64.AArch64Move.StoreOp;
|
||||
import org.graalvm.compiler.lir.aarch64.AArch64PrefetchOp;
|
||||
import org.graalvm.compiler.lir.aarch64.AArch64SaveRegistersOp;
|
||||
import org.graalvm.compiler.lir.aarch64.AArch64RestoreRegistersOp;
|
||||
|
||||
import org.graalvm.compiler.lir.aarch64.AArch64SaveRegistersOp;
|
||||
import org.graalvm.compiler.lir.gen.LIRGenerationResult;
|
||||
import org.graalvm.compiler.options.OptionValues;
|
||||
|
||||
import jdk.vm.ci.aarch64.AArch64;
|
||||
import jdk.vm.ci.aarch64.AArch64Kind;
|
||||
@ -93,6 +92,7 @@ import jdk.vm.ci.code.Register;
|
||||
import jdk.vm.ci.code.RegisterValue;
|
||||
import jdk.vm.ci.code.StackSlot;
|
||||
import jdk.vm.ci.hotspot.HotSpotCompressedNullConstant;
|
||||
import jdk.vm.ci.hotspot.HotSpotMetaspaceConstant;
|
||||
import jdk.vm.ci.hotspot.HotSpotObjectConstant;
|
||||
import jdk.vm.ci.meta.AllocatableValue;
|
||||
import jdk.vm.ci.meta.Constant;
|
||||
@ -103,7 +103,6 @@ import jdk.vm.ci.meta.JavaKind;
|
||||
import jdk.vm.ci.meta.PlatformKind;
|
||||
import jdk.vm.ci.meta.SpeculationLog;
|
||||
import jdk.vm.ci.meta.Value;
|
||||
import org.graalvm.compiler.options.OptionValues;
|
||||
|
||||
/**
|
||||
* LIR generator specialized for AArch64 HotSpot.
|
||||
@ -502,7 +501,7 @@ public class AArch64HotSpotLIRGenerator extends AArch64LIRGenerator implements H
|
||||
emitMove(operand, input);
|
||||
}
|
||||
Register thread = getProviders().getRegisters().getThreadRegister();
|
||||
append(new AArch64HotSpotReturnOp(operand, getStub() != null, config, thread));
|
||||
append(new AArch64HotSpotReturnOp(operand, getStub() != null, config, thread, getResult().requiresReservedStackAccessCheck()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,10 +24,10 @@
|
||||
|
||||
package org.graalvm.compiler.hotspot.aarch64;
|
||||
|
||||
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.ILLEGAL;
|
||||
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.REG;
|
||||
import static jdk.vm.ci.aarch64.AArch64.lr;
|
||||
import static jdk.vm.ci.code.ValueUtil.asRegister;
|
||||
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.ILLEGAL;
|
||||
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.REG;
|
||||
|
||||
import org.graalvm.compiler.asm.aarch64.AArch64MacroAssembler;
|
||||
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
|
||||
@ -48,9 +48,11 @@ public final class AArch64HotSpotReturnOp extends AArch64HotSpotEpilogueOp {
|
||||
|
||||
@Use({REG, ILLEGAL}) private Value result;
|
||||
private final boolean isStub;
|
||||
private final boolean requiresReservedStackAccessCheck;
|
||||
|
||||
public AArch64HotSpotReturnOp(Value result, boolean isStub, GraalHotSpotVMConfig config, Register thread) {
|
||||
public AArch64HotSpotReturnOp(Value result, boolean isStub, GraalHotSpotVMConfig config, Register thread, boolean requiresReservedStackAccessCheck) {
|
||||
super(TYPE, config, thread);
|
||||
this.requiresReservedStackAccessCheck = requiresReservedStackAccessCheck;
|
||||
assert validReturnValue(result);
|
||||
this.result = result;
|
||||
this.isStub = isStub;
|
||||
@ -66,7 +68,7 @@ public final class AArch64HotSpotReturnOp extends AArch64HotSpotEpilogueOp {
|
||||
@Override
|
||||
public void emitCode(CompilationResultBuilder crb, AArch64MacroAssembler masm) {
|
||||
final boolean emitSafepoint = !isStub;
|
||||
leaveFrame(crb, masm, emitSafepoint);
|
||||
leaveFrame(crb, masm, emitSafepoint, requiresReservedStackAccessCheck);
|
||||
masm.ret(lr);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,9 +24,9 @@
|
||||
|
||||
package org.graalvm.compiler.hotspot.aarch64;
|
||||
|
||||
import static org.graalvm.compiler.hotspot.HotSpotBackend.UNWIND_EXCEPTION_TO_CALLER;
|
||||
import static jdk.vm.ci.aarch64.AArch64.lr;
|
||||
import static jdk.vm.ci.code.ValueUtil.asRegister;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotBackend.UNWIND_EXCEPTION_TO_CALLER;
|
||||
|
||||
import org.graalvm.compiler.asm.aarch64.AArch64MacroAssembler;
|
||||
import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
|
||||
@ -57,7 +57,7 @@ public final class AArch64HotSpotUnwindOp extends AArch64HotSpotEpilogueOp {
|
||||
|
||||
@Override
|
||||
public void emitCode(CompilationResultBuilder crb, AArch64MacroAssembler masm) {
|
||||
leaveFrame(crb, masm, /* emitSafepoint */false);
|
||||
leaveFrame(crb, masm, /* emitSafepoint */false, false);
|
||||
|
||||
ForeignCallLinkage linkage = crb.foreignCalls.lookupForeignCall(UNWIND_EXCEPTION_TO_CALLER);
|
||||
CallingConvention cc = linkage.getOutgoingCallingConvention();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -111,7 +111,7 @@ public class AMD64HotSpotBackend extends HotSpotHostBackend {
|
||||
|
||||
@Override
|
||||
public LIRGenerationResult newLIRGenerationResult(CompilationIdentifier compilationId, LIR lir, FrameMapBuilder frameMapBuilder, StructuredGraph graph, Object stub) {
|
||||
return new HotSpotLIRGenerationResult(compilationId, lir, frameMapBuilder, makeCallingConvention(graph, (Stub) stub), stub);
|
||||
return new HotSpotLIRGenerationResult(compilationId, lir, frameMapBuilder, makeCallingConvention(graph, (Stub) stub), stub, config.requiresReservedStackCheck(graph.getMethods()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -268,7 +268,7 @@ public class AMD64HotSpotLIRGenerator extends AMD64LIRGenerator implements HotSp
|
||||
pollOnReturnScratchRegister = findPollOnReturnScratchRegister();
|
||||
}
|
||||
Register thread = getProviders().getRegisters().getThreadRegister();
|
||||
append(new AMD64HotSpotReturnOp(operand, getStub() != null, thread, pollOnReturnScratchRegister, config));
|
||||
append(new AMD64HotSpotReturnOp(operand, getStub() != null, thread, pollOnReturnScratchRegister, config, getResult().requiresReservedStackAccessCheck()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,18 +24,30 @@
|
||||
|
||||
package org.graalvm.compiler.hotspot.amd64;
|
||||
|
||||
import static jdk.vm.ci.amd64.AMD64.r15;
|
||||
import static jdk.vm.ci.amd64.AMD64.rsp;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotHostBackend.ENABLE_STACK_RESERVED_ZONE;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotHostBackend.THROW_DELAYED_STACKOVERFLOW_ERROR;
|
||||
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.ILLEGAL;
|
||||
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.REG;
|
||||
|
||||
import org.graalvm.compiler.asm.Label;
|
||||
import org.graalvm.compiler.asm.amd64.AMD64Address;
|
||||
import org.graalvm.compiler.asm.amd64.AMD64Assembler;
|
||||
import org.graalvm.compiler.asm.amd64.AMD64MacroAssembler;
|
||||
import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
|
||||
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
|
||||
import org.graalvm.compiler.hotspot.meta.HotSpotForeignCallsProvider;
|
||||
import org.graalvm.compiler.lir.LIRInstructionClass;
|
||||
import org.graalvm.compiler.lir.Opcode;
|
||||
import org.graalvm.compiler.lir.amd64.AMD64Call;
|
||||
import org.graalvm.compiler.lir.asm.CompilationResultBuilder;
|
||||
import org.graalvm.compiler.lir.gen.DiagnosticLIRGeneratorTool.ZapStackArgumentSpaceBeforeInstruction;
|
||||
|
||||
import jdk.vm.ci.amd64.AMD64.CPUFeature;
|
||||
import jdk.vm.ci.code.CallingConvention;
|
||||
import jdk.vm.ci.code.Register;
|
||||
import jdk.vm.ci.code.RegisterValue;
|
||||
import jdk.vm.ci.meta.Value;
|
||||
|
||||
/**
|
||||
@ -50,20 +62,46 @@ final class AMD64HotSpotReturnOp extends AMD64HotSpotEpilogueBlockEndOp implemen
|
||||
private final Register thread;
|
||||
private final Register scratchForSafepointOnReturn;
|
||||
private final GraalHotSpotVMConfig config;
|
||||
private final boolean requiresReservedStackAccessCheck;
|
||||
|
||||
AMD64HotSpotReturnOp(Value value, boolean isStub, Register thread, Register scratchForSafepointOnReturn, GraalHotSpotVMConfig config) {
|
||||
AMD64HotSpotReturnOp(Value value, boolean isStub, Register thread, Register scratchForSafepointOnReturn, GraalHotSpotVMConfig config, boolean requiresReservedStackAccessCheck) {
|
||||
super(TYPE);
|
||||
this.value = value;
|
||||
this.isStub = isStub;
|
||||
this.thread = thread;
|
||||
this.scratchForSafepointOnReturn = scratchForSafepointOnReturn;
|
||||
this.config = config;
|
||||
this.requiresReservedStackAccessCheck = requiresReservedStackAccessCheck;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void emitCode(CompilationResultBuilder crb, AMD64MacroAssembler masm) {
|
||||
leaveFrameAndRestoreRbp(crb, masm);
|
||||
if (!isStub) {
|
||||
if (requiresReservedStackAccessCheck) {
|
||||
HotSpotForeignCallsProvider foreignCalls = (HotSpotForeignCallsProvider) crb.foreignCalls;
|
||||
|
||||
Label noReserved = new Label();
|
||||
masm.cmpptr(rsp, new AMD64Address(r15, config.javaThreadReservedStackActivationOffset));
|
||||
masm.jccb(AMD64Assembler.ConditionFlag.Below, noReserved);
|
||||
// direct call to runtime without stub needs aligned stack
|
||||
int stackAdjust = crb.target.stackAlignment - crb.target.wordSize;
|
||||
if (stackAdjust > 0) {
|
||||
masm.subq(rsp, stackAdjust);
|
||||
}
|
||||
ForeignCallLinkage enableStackReservedZone = foreignCalls.lookupForeignCall(ENABLE_STACK_RESERVED_ZONE);
|
||||
CallingConvention cc = enableStackReservedZone.getOutgoingCallingConvention();
|
||||
assert cc.getArgumentCount() == 1;
|
||||
Register arg0 = ((RegisterValue) cc.getArgument(0)).getRegister();
|
||||
masm.movq(arg0, thread);
|
||||
AMD64Call.directCall(crb, masm, enableStackReservedZone, null, false, null);
|
||||
if (stackAdjust > 0) {
|
||||
masm.addq(rsp, stackAdjust);
|
||||
}
|
||||
AMD64Call.directJmp(crb, masm, foreignCalls.lookupForeignCall(THROW_DELAYED_STACKOVERFLOW_ERROR));
|
||||
masm.bind(noReserved);
|
||||
}
|
||||
|
||||
// Every non-stub compile method must have a poll before the return.
|
||||
AMD64HotSpotSafepointOp.emitCode(crb, masm, config, true, null, thread, scratchForSafepointOnReturn);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -152,7 +152,7 @@ public class SPARCHotSpotBackend extends HotSpotHostBackend {
|
||||
|
||||
@Override
|
||||
public LIRGenerationResult newLIRGenerationResult(CompilationIdentifier compilationId, LIR lir, FrameMapBuilder frameMapBuilder, StructuredGraph graph, Object stub) {
|
||||
return new HotSpotLIRGenerationResult(compilationId, lir, frameMapBuilder, makeCallingConvention(graph, (Stub) stub), stub);
|
||||
return new HotSpotLIRGenerationResult(compilationId, lir, frameMapBuilder, makeCallingConvention(graph, (Stub) stub), stub, config.requiresReservedStackCheck(graph.getMethods()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -195,7 +195,9 @@ public class SPARCHotSpotBackend extends HotSpotHostBackend {
|
||||
final int frameSize = crb.frameMap.totalFrameSize();
|
||||
final int stackpoinerChange = -frameSize;
|
||||
SPARCMacroAssembler masm = (SPARCMacroAssembler) crb.asm;
|
||||
emitStackOverflowCheck(crb);
|
||||
if (!isStub) {
|
||||
emitStackOverflowCheck(crb);
|
||||
}
|
||||
|
||||
if (SPARCAssembler.isSimm13(stackpoinerChange)) {
|
||||
masm.save(sp, stackpoinerChange, sp);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -194,7 +194,7 @@ public class SPARCHotSpotLIRGenerator extends SPARCLIRGenerator implements HotSp
|
||||
emitMove(operand, input);
|
||||
}
|
||||
Register thread = getProviders().getRegisters().getThreadRegister();
|
||||
append(new SPARCHotSpotReturnOp(operand, getStub() != null, config, thread, getSafepointAddressValue()));
|
||||
append(new SPARCHotSpotReturnOp(operand, getStub() != null, config, thread, getSafepointAddressValue(), getResult().requiresReservedStackAccessCheck()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,17 +24,29 @@
|
||||
|
||||
package org.graalvm.compiler.hotspot.sparc;
|
||||
|
||||
import static jdk.vm.ci.sparc.SPARC.sp;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotHostBackend.ENABLE_STACK_RESERVED_ZONE;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotHostBackend.THROW_DELAYED_STACKOVERFLOW_ERROR;
|
||||
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.ILLEGAL;
|
||||
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.REG;
|
||||
|
||||
import org.graalvm.compiler.asm.Label;
|
||||
import org.graalvm.compiler.asm.sparc.SPARCAddress;
|
||||
import org.graalvm.compiler.asm.sparc.SPARCAssembler;
|
||||
import org.graalvm.compiler.asm.sparc.SPARCMacroAssembler;
|
||||
import org.graalvm.compiler.asm.sparc.SPARCMacroAssembler.ScratchRegister;
|
||||
import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
|
||||
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
|
||||
import org.graalvm.compiler.hotspot.meta.HotSpotForeignCallsProvider;
|
||||
import org.graalvm.compiler.lir.LIRInstructionClass;
|
||||
import org.graalvm.compiler.lir.Opcode;
|
||||
import org.graalvm.compiler.lir.asm.CompilationResultBuilder;
|
||||
import org.graalvm.compiler.lir.sparc.SPARCCall;
|
||||
import org.graalvm.compiler.lir.sparc.SPARCControlFlow.ReturnOp;
|
||||
|
||||
import jdk.vm.ci.code.CallingConvention;
|
||||
import jdk.vm.ci.code.Register;
|
||||
import jdk.vm.ci.code.RegisterValue;
|
||||
import jdk.vm.ci.meta.Value;
|
||||
|
||||
/**
|
||||
@ -47,22 +59,42 @@ final class SPARCHotSpotReturnOp extends SPARCHotSpotEpilogueOp {
|
||||
|
||||
@Use({REG, ILLEGAL}) protected Value value;
|
||||
@Use({REG, ILLEGAL}) protected Value safepointPollAddress;
|
||||
private final boolean requiresReservedStackAccessCheck;
|
||||
private final boolean isStub;
|
||||
private final GraalHotSpotVMConfig config;
|
||||
private final Register thread;
|
||||
|
||||
SPARCHotSpotReturnOp(Value value, boolean isStub, GraalHotSpotVMConfig config, Register thread, Value safepointPoll) {
|
||||
SPARCHotSpotReturnOp(Value value, boolean isStub, GraalHotSpotVMConfig config, Register thread, Value safepointPoll, boolean requiresReservedStackAccessCheck) {
|
||||
super(TYPE, SIZE);
|
||||
this.value = value;
|
||||
this.isStub = isStub;
|
||||
this.config = config;
|
||||
this.thread = thread;
|
||||
this.safepointPollAddress = safepointPoll;
|
||||
this.requiresReservedStackAccessCheck = requiresReservedStackAccessCheck;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) {
|
||||
if (!isStub) {
|
||||
if (requiresReservedStackAccessCheck) {
|
||||
try (ScratchRegister sc = masm.getScratchRegister()) {
|
||||
HotSpotForeignCallsProvider foreignCalls = (HotSpotForeignCallsProvider) crb.foreignCalls;
|
||||
Label noReserved = new Label();
|
||||
Register scratch = sc.getRegister();
|
||||
masm.ldx(new SPARCAddress(thread, config.javaThreadReservedStackActivationOffset), scratch);
|
||||
masm.compareBranch(sp, scratch, SPARCAssembler.ConditionFlag.LessUnsigned, SPARCAssembler.CC.Xcc, noReserved, SPARCAssembler.BranchPredict.PREDICT_TAKEN, null);
|
||||
ForeignCallLinkage enableStackReservedZone = foreignCalls.lookupForeignCall(ENABLE_STACK_RESERVED_ZONE);
|
||||
CallingConvention cc = enableStackReservedZone.getOutgoingCallingConvention();
|
||||
assert cc.getArgumentCount() == 1;
|
||||
Register arg0 = ((RegisterValue) cc.getArgument(0)).getRegister();
|
||||
masm.mov(thread, arg0);
|
||||
SPARCCall.directCall(crb, masm, enableStackReservedZone, scratch, null);
|
||||
masm.restoreWindow();
|
||||
SPARCCall.indirectJmp(crb, masm, scratch, foreignCalls.lookupForeignCall(THROW_DELAYED_STACKOVERFLOW_ERROR));
|
||||
masm.bind(noReserved);
|
||||
}
|
||||
}
|
||||
// Every non-stub compile method must have a poll before the return.
|
||||
SPARCHotSpotSafepointOp.emitCode(crb, masm, config, true, null, thread, safepointPollAddress);
|
||||
}
|
||||
|
226
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ReservedStackAccessTest.java
Normal file
226
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ReservedStackAccessTest.java
Normal file
@ -0,0 +1,226 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
|
||||
package org.graalvm.compiler.hotspot.test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.List;
|
||||
|
||||
import org.graalvm.compiler.test.SubprocessUtil;
|
||||
import org.graalvm.compiler.test.SubprocessUtil.Subprocess;
|
||||
|
||||
import org.junit.Assume;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ReservedStackAccessTest extends HotSpotGraalCompilerTest {
|
||||
@Before
|
||||
public void check() {
|
||||
Assume.assumeTrue(runtime().getVMConfig().enableStackReservedZoneAddress != 0);
|
||||
}
|
||||
|
||||
public void stackAccessTest() {
|
||||
Assume.assumeTrue(runtime().getVMConfig().enableStackReservedZoneAddress != 0);
|
||||
|
||||
int passed = 0;
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
// Each iteration has to be executed by a new thread. The test
|
||||
// relies on the random size area pushed by the VM at the beginning
|
||||
// of the stack of each Java thread it creates.
|
||||
RunWithSOEContext r = new RunWithSOEContext(new ReentrantLockTest(), 256);
|
||||
Thread thread = new Thread(r);
|
||||
thread.start();
|
||||
try {
|
||||
thread.join();
|
||||
assertTrue(r.result.equals("PASSED"), r.result);
|
||||
++passed;
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
}
|
||||
System.out.println("RESULT: " + (passed == 1000 ? "PASSED" : "FAILED"));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new ReservedStackAccessTest().stackAccessTest();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void run() throws IOException, InterruptedException {
|
||||
Assume.assumeTrue(runtime().getVMConfig().enableStackReservedZoneAddress != 0);
|
||||
List<String> vmArgs = SubprocessUtil.withoutDebuggerArguments(SubprocessUtil.getVMCommandLine());
|
||||
vmArgs.add("-XX:+UseJVMCICompiler");
|
||||
vmArgs.add("-Dgraal.Inline=false");
|
||||
vmArgs.add("-XX:CompileCommand=exclude,java/util/concurrent/locks/AbstractOwnableSynchronizer.setExclusiveOwnerThread");
|
||||
Subprocess proc = SubprocessUtil.java(vmArgs, ReservedStackAccessTest.class.getName());
|
||||
boolean passed = false;
|
||||
for (String line : proc.output) {
|
||||
if (line.equals("RESULT: PASSED")) {
|
||||
passed = true;
|
||||
}
|
||||
}
|
||||
if (!passed) {
|
||||
for (String line : proc.output) {
|
||||
System.err.println("" + line);
|
||||
}
|
||||
}
|
||||
assertTrue(passed);
|
||||
}
|
||||
|
||||
static class ReentrantLockTest {
|
||||
|
||||
private ReentrantLock[] lockArray;
|
||||
// Frame sizes vary a lot between interpreted code and compiled code
|
||||
// so the lock array has to be big enough to cover all cases.
|
||||
// If test fails with message "Not conclusive test", try to increase
|
||||
// LOCK_ARRAY_SIZE value
|
||||
private static final int LOCK_ARRAY_SIZE = 8192;
|
||||
private boolean stackOverflowErrorReceived;
|
||||
StackOverflowError soe = null;
|
||||
int index = -1;
|
||||
|
||||
public void initialize() {
|
||||
lockArray = new ReentrantLock[LOCK_ARRAY_SIZE];
|
||||
for (int i = 0; i < LOCK_ARRAY_SIZE; i++) {
|
||||
lockArray[i] = new ReentrantLock();
|
||||
}
|
||||
stackOverflowErrorReceived = false;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
if (!stackOverflowErrorReceived) {
|
||||
return "ERROR: Not conclusive test: no StackOverflowError received";
|
||||
}
|
||||
for (int i = 0; i < LOCK_ARRAY_SIZE; i++) {
|
||||
if (lockArray[i].isLocked()) {
|
||||
if (!lockArray[i].isHeldByCurrentThread()) {
|
||||
StringBuilder s = new StringBuilder();
|
||||
s.append("FAILED: ReentrantLock ");
|
||||
s.append(i);
|
||||
s.append(" looks corrupted");
|
||||
return s.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
return "PASSED";
|
||||
}
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
lockAndCall(0);
|
||||
} catch (StackOverflowError e) {
|
||||
soe = e;
|
||||
stackOverflowErrorReceived = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void lockAndCall(int i) {
|
||||
index = i;
|
||||
if (i < LOCK_ARRAY_SIZE) {
|
||||
lockArray[i].lock();
|
||||
lockAndCall(i + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class RunWithSOEContext implements Runnable {
|
||||
|
||||
int counter;
|
||||
int deframe;
|
||||
int decounter;
|
||||
int setupSOEFrame;
|
||||
int testStartFrame;
|
||||
ReentrantLockTest test;
|
||||
String result = "FAILED: no result";
|
||||
|
||||
RunWithSOEContext(ReentrantLockTest test, int deframe) {
|
||||
this.test = test;
|
||||
this.deframe = deframe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
counter = 0;
|
||||
decounter = deframe;
|
||||
test.initialize();
|
||||
recursiveCall();
|
||||
System.out.println("Framework got StackOverflowError at frame = " + counter);
|
||||
System.out.println("Test started execution at frame = " + (counter - deframe));
|
||||
result = test.getResult();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
void recursiveCall() {
|
||||
// Unused local variables to increase the frame size
|
||||
long l1;
|
||||
long l2;
|
||||
long l3;
|
||||
long l4;
|
||||
long l5;
|
||||
long l6;
|
||||
long l7;
|
||||
long l8;
|
||||
long l9;
|
||||
long l10;
|
||||
long l11;
|
||||
long l12;
|
||||
long l13;
|
||||
long l14;
|
||||
long l15;
|
||||
long l16;
|
||||
long l17;
|
||||
long l18;
|
||||
long l19;
|
||||
long l20;
|
||||
long l21;
|
||||
long l22;
|
||||
long l23;
|
||||
long l24;
|
||||
long l25;
|
||||
long l26;
|
||||
long l27;
|
||||
long l28;
|
||||
long l30;
|
||||
long l31;
|
||||
long l32;
|
||||
long l33;
|
||||
long l34;
|
||||
long l35;
|
||||
long l36;
|
||||
long l37;
|
||||
counter++;
|
||||
try {
|
||||
recursiveCall();
|
||||
} catch (StackOverflowError e) {
|
||||
}
|
||||
decounter--;
|
||||
if (decounter == 0) {
|
||||
setupSOEFrame = counter;
|
||||
testStartFrame = counter - deframe;
|
||||
test.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -26,12 +26,15 @@ package org.graalvm.compiler.hotspot;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.List;
|
||||
|
||||
import org.graalvm.compiler.core.common.CompressEncoding;
|
||||
import org.graalvm.compiler.hotspot.nodes.GraalHotSpotVMConfigNode;
|
||||
|
||||
import jdk.vm.ci.common.JVMCIError;
|
||||
import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
|
||||
import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
|
||||
import jdk.vm.ci.meta.ResolvedJavaMethod;
|
||||
|
||||
/**
|
||||
* Used to access native configuration details.
|
||||
@ -315,6 +318,17 @@ public class GraalHotSpotVMConfig extends GraalHotSpotVMConfigBase {
|
||||
public final int jvmciCountersThreadOffset = getFieldOffset("JavaThread::_jvmci_counters", Integer.class, "jlong*");
|
||||
public final int javaThreadReservedStackActivationOffset = versioned.javaThreadReservedStackActivationOffset;
|
||||
|
||||
public boolean requiresReservedStackCheck(List<ResolvedJavaMethod> methods) {
|
||||
if (enableStackReservedZoneAddress != 0 && methods != null) {
|
||||
for (ResolvedJavaMethod method : methods) {
|
||||
if (((HotSpotResolvedJavaMethod) method).hasReservedStackAccess()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* An invalid value for {@link #rtldDefault}.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -50,6 +50,7 @@ import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
|
||||
import jdk.vm.ci.meta.JavaKind;
|
||||
import jdk.vm.ci.meta.JavaType;
|
||||
import jdk.vm.ci.runtime.JVMCICompiler;
|
||||
import org.graalvm.compiler.word.Word;
|
||||
|
||||
/**
|
||||
* Common functionality of HotSpot host backends.
|
||||
@ -66,6 +67,10 @@ public abstract class HotSpotHostBackend extends HotSpotBackend {
|
||||
*/
|
||||
public static final ForeignCallDescriptor UNCOMMON_TRAP_HANDLER = new ForeignCallDescriptor("uncommonTrapHandler", void.class);
|
||||
|
||||
public static final ForeignCallDescriptor ENABLE_STACK_RESERVED_ZONE = new ForeignCallDescriptor("enableStackReservedZoneEntry", void.class, Word.class);
|
||||
|
||||
public static final ForeignCallDescriptor THROW_DELAYED_STACKOVERFLOW_ERROR = new ForeignCallDescriptor("throwDelayedStackoverflowError", void.class);
|
||||
|
||||
protected final GraalHotSpotVMConfig config;
|
||||
|
||||
public HotSpotHostBackend(GraalHotSpotVMConfig config, HotSpotGraalRuntimeProvider runtime, HotSpotProviders providers) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,6 +46,7 @@ public class HotSpotLIRGenerationResult extends LIRGenerationResult {
|
||||
*/
|
||||
private StackSlot deoptimizationRescueSlot;
|
||||
protected final Object stub;
|
||||
private final boolean requiresReservedStackAccessCheck;
|
||||
|
||||
private int maxInterpreterFrameSize;
|
||||
|
||||
@ -55,9 +56,11 @@ public class HotSpotLIRGenerationResult extends LIRGenerationResult {
|
||||
*/
|
||||
private EconomicMap<LIRFrameState, SaveRegistersOp> calleeSaveInfo = EconomicMap.create(Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE);
|
||||
|
||||
public HotSpotLIRGenerationResult(CompilationIdentifier compilationId, LIR lir, FrameMapBuilder frameMapBuilder, CallingConvention callingConvention, Object stub) {
|
||||
public HotSpotLIRGenerationResult(CompilationIdentifier compilationId, LIR lir, FrameMapBuilder frameMapBuilder, CallingConvention callingConvention, Object stub,
|
||||
boolean requiresReservedStackAccessCheck) {
|
||||
super(compilationId, lir, frameMapBuilder, callingConvention);
|
||||
this.stub = stub;
|
||||
this.requiresReservedStackAccessCheck = requiresReservedStackAccessCheck;
|
||||
}
|
||||
|
||||
public EconomicMap<LIRFrameState, SaveRegistersOp> getCalleeSaveInfo() {
|
||||
@ -83,4 +86,8 @@ public class HotSpotLIRGenerationResult extends LIRGenerationResult {
|
||||
public int getMaxInterpreterFrameSize() {
|
||||
return maxInterpreterFrameSize;
|
||||
}
|
||||
|
||||
public boolean requiresReservedStackAccessCheck() {
|
||||
return requiresReservedStackAccessCheck;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -66,6 +66,8 @@ import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.
|
||||
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.SAFEPOINT;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.STACK_INSPECTABLE_LEAF;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotHostBackend.DEOPTIMIZATION_HANDLER;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotHostBackend.ENABLE_STACK_RESERVED_ZONE;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotHostBackend.THROW_DELAYED_STACKOVERFLOW_ERROR;
|
||||
import static org.graalvm.compiler.hotspot.HotSpotHostBackend.UNCOMMON_TRAP_HANDLER;
|
||||
import static org.graalvm.compiler.hotspot.replacements.AssertionSnippets.ASSERTION_VM_MESSAGE_C;
|
||||
import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.MARK_WORD_LOCATION;
|
||||
@ -251,6 +253,12 @@ public abstract class HotSpotHostForeignCallsProvider extends HotSpotForeignCall
|
||||
registerForeignCall(UNCOMMON_TRAP_HANDLER, c.uncommonTrapStub, NativeCall, PRESERVES_REGISTERS, LEAF_NOFP, REEXECUTABLE, NO_LOCATIONS);
|
||||
registerForeignCall(IC_MISS_HANDLER, c.inlineCacheMissStub, NativeCall, PRESERVES_REGISTERS, LEAF_NOFP, REEXECUTABLE, NO_LOCATIONS);
|
||||
|
||||
if (c.enableStackReservedZoneAddress != 0) {
|
||||
assert c.throwDelayedStackOverflowErrorEntry != 0 : "both must exist";
|
||||
registerForeignCall(ENABLE_STACK_RESERVED_ZONE, c.enableStackReservedZoneAddress, NativeCall, DESTROYS_REGISTERS, LEAF_NOFP, REEXECUTABLE, NO_LOCATIONS);
|
||||
registerForeignCall(THROW_DELAYED_STACKOVERFLOW_ERROR, c.throwDelayedStackOverflowErrorEntry, NativeCall, DESTROYS_REGISTERS, LEAF_NOFP, REEXECUTABLE, NO_LOCATIONS);
|
||||
}
|
||||
|
||||
registerForeignCall(JAVA_TIME_MILLIS, c.javaTimeMillisAddress, NativeCall, DESTROYS_REGISTERS, LEAF_NOFP, REEXECUTABLE, NO_LOCATIONS);
|
||||
registerForeignCall(JAVA_TIME_NANOS, c.javaTimeNanosAddress, NativeCall, DESTROYS_REGISTERS, LEAF_NOFP, REEXECUTABLE, NO_LOCATIONS);
|
||||
registerForeignCall(SIN.foreignCallDescriptor, c.arithmeticSinAddress, NativeCall, DESTROYS_REGISTERS, LEAF, REEXECUTABLE, NO_LOCATIONS);
|
||||
|
@ -140,7 +140,8 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public Content getSignature(ExecutableElement method) {
|
||||
Content pre = new HtmlTree(HtmlTag.PRE);
|
||||
HtmlTree pre = new HtmlTree(HtmlTag.PRE);
|
||||
pre.setStyle(HtmlStyle.methodSignature);
|
||||
writer.addAnnotationInfo(method, pre);
|
||||
int annotationLength = pre.charCount();
|
||||
addModifiers(method, pre);
|
||||
|
@ -83,6 +83,7 @@ public enum HtmlStyle {
|
||||
memberNameLabel,
|
||||
memberNameLink,
|
||||
memberSummary,
|
||||
methodSignature,
|
||||
moduleLabelInPackage,
|
||||
moduleLabelInType,
|
||||
nameValue,
|
||||
|
@ -822,7 +822,7 @@ ul.ui-autocomplete li {
|
||||
margin: -100px 0 0 100px;
|
||||
z-index: 1;
|
||||
}
|
||||
.details pre {
|
||||
.methodSignature {
|
||||
white-space:normal;
|
||||
}
|
||||
|
||||
|
@ -67,8 +67,6 @@ gc/g1/plab/TestPLABResize.java 8191048 generi
|
||||
|
||||
gc/TestNUMAPageSize.java 8194949 generic-all
|
||||
|
||||
runtime/ReservedStack/ReservedStackTestCompiler.java 8181855 generic-all
|
||||
|
||||
serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java 8195156 generic-all
|
||||
|
||||
compiler/compilercontrol/directives/LogTest.java 8181753 generic-all
|
||||
@ -179,6 +177,7 @@ org.graalvm.compiler.core.test.ProfilingInfoTest
|
||||
org.graalvm.compiler.hotspot.test.CompilationWrapperTest 8205081
|
||||
org.graalvm.compiler.hotspot.test.HsErrLogTest 8205081
|
||||
org.graalvm.compiler.hotspot.test.OptionsInFileTest 8205081
|
||||
org.graalvm.compiler.hotspot.test.ReservedStackAccessTest 8205081
|
||||
org.graalvm.compiler.replacements.test.classfile.ClassfileBytecodeProviderTest 8205081
|
||||
org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest 8205081
|
||||
|
||||
|
@ -86,7 +86,7 @@ public class TestDeprecatedDocs extends JavadocTester {
|
||||
"<pre>@Deprecated(forRemoval=true)\n"
|
||||
+ "public DeprecatedClassByAnnotation()</pre>\n"
|
||||
+ "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span></div>",
|
||||
"<pre>@Deprecated\n"
|
||||
"<pre class=\"methodSignature\">@Deprecated\n"
|
||||
+ "public void method()</pre>\n"
|
||||
+ "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span></div>");
|
||||
|
||||
|
@ -567,7 +567,7 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
|
||||
// Test with -nocomment and -nodeprecated options. The ClassDocs whould
|
||||
// not display definition lists for any member details.
|
||||
checkOutput("pkg1/C1.html", expectFound,
|
||||
"<pre>public void readObject()\n" +
|
||||
"<pre class=\"methodSignature\">public void readObject()\n" +
|
||||
" throws java.io.IOException</pre>\n" +
|
||||
"</li>");
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class TestIndentation extends JavadocTester {
|
||||
checkExit(Exit.OK);
|
||||
|
||||
checkOutput("p/Indent.html", true,
|
||||
"<pre>public <T> void m​(T t1,",
|
||||
"<pre class=\"methodSignature\">public <T> void m​(T t1,",
|
||||
"\n"
|
||||
+ " T t2)",
|
||||
"\n"
|
||||
|
@ -65,7 +65,7 @@ public class TestInterface extends JavadocTester {
|
||||
checkExit(Exit.OK);
|
||||
|
||||
checkOutput("pkg/Interface.html", true,
|
||||
"<pre>int method()</pre>",
|
||||
"<pre class=\"methodSignature\">int method()</pre>",
|
||||
"<pre>static final int field</pre>",
|
||||
// Make sure known implementing class list is correct and omits type parameters.
|
||||
"<dl>\n"
|
||||
@ -141,7 +141,7 @@ public class TestInterface extends JavadocTester {
|
||||
+ "</td>\n",
|
||||
|
||||
"<h4>staticMethod</h4>\n"
|
||||
+ "<pre>public static void staticMethod()</pre>\n"
|
||||
+ "<pre class=\"methodSignature\">public static void staticMethod()</pre>\n"
|
||||
+ "<div class=\"block\"><span class=\"descfrmTypeLabel\">"
|
||||
+ "Description copied from interface: <code>"
|
||||
+ "<a href=\"InterfaceWithStaticMembers.html#staticMethod()\">"
|
||||
@ -187,7 +187,7 @@ public class TestInterface extends JavadocTester {
|
||||
+ "</td>\n",
|
||||
|
||||
"<h4>staticMethod</h4>\n"
|
||||
+ "<pre>public static void staticMethod()</pre>\n"
|
||||
+ "<pre class=\"methodSignature\">public static void staticMethod()</pre>\n"
|
||||
+ "<div class=\"block\"><span class=\"descfrmTypeLabel\">"
|
||||
+ "Description copied from interface: <code>"
|
||||
+ "<a href=\"InterfaceWithStaticMembers.html#staticMethod--\">"
|
||||
|
@ -54,11 +54,11 @@ public class TestJavaFX extends JavadocTester {
|
||||
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
|
||||
+ "<dd><a href=\"#getRate()\"><code>getRate()</code></a>, \n"
|
||||
+ "<a href=\"#setRate(double)\"><code>setRate(double)</code></a></dd>",
|
||||
"<pre>public final void setRate​(double value)</pre>\n"
|
||||
"<pre class=\"methodSignature\">public final void setRate​(double value)</pre>\n"
|
||||
+ "<div class=\"block\">Sets the value of the property rate.</div>\n"
|
||||
+ "<dl>\n"
|
||||
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>",
|
||||
"<pre>public final double getRate()</pre>\n"
|
||||
"<pre class=\"methodSignature\">public final double getRate()</pre>\n"
|
||||
+ "<div class=\"block\">Gets the value of the property rate.</div>\n"
|
||||
+ "<dl>\n"
|
||||
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>",
|
||||
@ -88,10 +88,10 @@ public class TestJavaFX extends JavadocTester {
|
||||
+ "title=\"class in pkg1\">C.BooleanProperty</a> pausedProperty</pre>\n"
|
||||
+ "<div class=\"block\">Defines if paused. The second line.</div>",
|
||||
"<h4>isPaused</h4>\n"
|
||||
+ "<pre>public final double isPaused()</pre>\n"
|
||||
+ "<pre class=\"methodSignature\">public final double isPaused()</pre>\n"
|
||||
+ "<div class=\"block\">Gets the value of the property paused.</div>",
|
||||
"<h4>setPaused</h4>\n"
|
||||
+ "<pre>public final void setPaused​(boolean value)</pre>\n"
|
||||
+ "<pre class=\"methodSignature\">public final void setPaused​(boolean value)</pre>\n"
|
||||
+ "<div class=\"block\">Sets the value of the property paused.</div>\n"
|
||||
+ "<dl>\n"
|
||||
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\n"
|
||||
@ -99,7 +99,7 @@ public class TestJavaFX extends JavadocTester {
|
||||
+ "<dt><span class=\"simpleTagLabel\">Default value:</span></dt>\n"
|
||||
+ "<dd>false</dd>",
|
||||
"<h4>isPaused</h4>\n"
|
||||
+ "<pre>public final double isPaused()</pre>\n"
|
||||
+ "<pre class=\"methodSignature\">public final double isPaused()</pre>\n"
|
||||
+ "<div class=\"block\">Gets the value of the property paused.</div>\n"
|
||||
+ "<dl>\n"
|
||||
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\n"
|
||||
@ -113,7 +113,7 @@ public class TestJavaFX extends JavadocTester {
|
||||
+ "<code>Timeline</code> is expected to\n"
|
||||
+ " be played. This is the second line.</div>",
|
||||
"<h4>setRate</h4>\n"
|
||||
+ "<pre>public final void setRate​(double value)</pre>\n"
|
||||
+ "<pre class=\"methodSignature\">public final void setRate​(double value)</pre>\n"
|
||||
+ "<div class=\"block\">Sets the value of the property rate.</div>\n"
|
||||
+ "<dl>\n"
|
||||
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\n"
|
||||
@ -124,7 +124,7 @@ public class TestJavaFX extends JavadocTester {
|
||||
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
|
||||
+ "<dd>JavaFX 8.0</dd>",
|
||||
"<h4>getRate</h4>\n"
|
||||
+ "<pre>public final double getRate()</pre>\n"
|
||||
+ "<pre class=\"methodSignature\">public final double getRate()</pre>\n"
|
||||
+ "<div class=\"block\">Gets the value of the property rate.</div>\n"
|
||||
+ "<dl>\n"
|
||||
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\n"
|
||||
|
@ -55,7 +55,7 @@ public class TestLambdaFeature extends JavadocTester {
|
||||
|
||||
checkOutput("pkg/A.html", true,
|
||||
"<td class=\"colFirst\"><code>default void</code></td>",
|
||||
"<pre>default void defaultMethod()</pre>",
|
||||
"<pre class=\"methodSignature\">default void defaultMethod()</pre>",
|
||||
"<caption><span id=\"t0\" class=\"activeTableTab\"><span>"
|
||||
+ "All Methods</span><span class=\"tabEnd\"> </span></span>"
|
||||
+ "<span id=\"t2\" class=\"tableTab\"><span>"
|
||||
|
@ -89,7 +89,7 @@ public class TestLiteralCodeInPre extends JavadocTester {
|
||||
+ " <PRE>\n"
|
||||
+ " <b>id </b>\n"
|
||||
+ " </PRE></div>",
|
||||
"<pre>public void htmlAttrInPre1()</pre>\n"
|
||||
"<pre class=\"methodSignature\">public void htmlAttrInPre1()</pre>\n"
|
||||
+ "<div class=\"block\">More html tag outliers.\n"
|
||||
+ " <pre>\n"
|
||||
+ " @Override\n"
|
||||
|
@ -55,7 +55,7 @@ public class TestMemberSummary extends JavadocTester {
|
||||
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#returnTypeTest()\">"
|
||||
+ "returnTypeTest</a></span>()</code>",
|
||||
// Check return type in member detail.
|
||||
"<pre>public <a href=\"PublicChild.html\" title=\"class in pkg\">"
|
||||
"<pre class=\"methodSignature\">public <a href=\"PublicChild.html\" title=\"class in pkg\">"
|
||||
+ "PublicChild</a> returnTypeTest()</pre>",
|
||||
"<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">"
|
||||
+ "<a href=\"#%3Cinit%3E()\">PublicChild</a></span>()</code></th>");
|
||||
|
@ -96,7 +96,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
"for (Coin c : Coin.values())",
|
||||
"Overloaded valueOf() method has correct documentation.",
|
||||
"Overloaded values method has correct documentation.",
|
||||
"<pre>public static <a href=\"Coin.html\" title=\"enum in pkg\">Coin</a>" +
|
||||
"<pre class=\"methodSignature\">public static <a href=\"Coin.html\" title=\"enum in pkg\">Coin</a>" +
|
||||
" valueOf​(java.lang.String name)</pre>\n" +
|
||||
"<div class=\"block\">Returns the enum constant of this type with the specified name.\n" +
|
||||
"The string must match <i>exactly</i> an identifier used to declare an\n" +
|
||||
@ -155,7 +155,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
+ "<a href=\"#methodThatReturnsTypeParameterA(E%5B%5D)\">"
|
||||
+ "methodThatReturnsTypeParameterA</a></span>​(<a href=\"TypeParameters.html\" "
|
||||
+ "title=\"type parameter in TypeParameters\">E</a>[] e)</code>",
|
||||
"<pre>public <a href=\"TypeParameters.html\" "
|
||||
"<pre class=\"methodSignature\">public <a href=\"TypeParameters.html\" "
|
||||
+ "title=\"type parameter in TypeParameters\">E</a>[] "
|
||||
+ "methodThatReturnsTypeParameterA​(<a href=\"TypeParameters.html\" "
|
||||
+ "title=\"type parameter in TypeParameters\">E</a>[] e)</pre>\n",
|
||||
@ -695,7 +695,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
+ "required</a>=1994)\n"
|
||||
+ "public AnnotationTypeUsage()</pre>",
|
||||
// METHOD
|
||||
"<pre><a href=\"AnnotationType.html\" "
|
||||
"<pre class=\"methodSignature\"><a href=\"AnnotationType.html\" "
|
||||
+ "title=\"annotation in pkg\">@AnnotationType</a>("
|
||||
+ "<a href=\"AnnotationType.html#optional()\">optional</a>"
|
||||
+ "=\"Method Annotation\",\n"
|
||||
@ -703,7 +703,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
+ "required</a>=1994)\n"
|
||||
+ "public void method()</pre>",
|
||||
// METHOD PARAMS
|
||||
"<pre>public void methodWithParams​("
|
||||
"<pre class=\"methodSignature\">public void methodWithParams​("
|
||||
+ "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">"
|
||||
+ "@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">"
|
||||
+ "optional</a>=\"Parameter Annotation\",<a "
|
||||
@ -858,7 +858,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
+ "required</a>=1994)\n"
|
||||
+ "public AnnotationTypeUsage()</pre>",
|
||||
// METHOD
|
||||
"<pre><a href=\"AnnotationType.html\" "
|
||||
"<pre class=\"methodSignature\"><a href=\"AnnotationType.html\" "
|
||||
+ "title=\"annotation in pkg\">@AnnotationType</a>("
|
||||
+ "<a href=\"AnnotationType.html#optional--\">optional</a>"
|
||||
+ "=\"Method Annotation\",\n"
|
||||
@ -866,7 +866,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
+ "required</a>=1994)\n"
|
||||
+ "public void method()</pre>",
|
||||
// METHOD PARAMS
|
||||
"<pre>public void methodWithParams​("
|
||||
"<pre class=\"methodSignature\">public void methodWithParams​("
|
||||
+ "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">"
|
||||
+ "@AnnotationType</a>(<a href=\"AnnotationType.html#optional--\">"
|
||||
+ "optional</a>=\"Parameter Annotation\",<a "
|
||||
|
@ -207,7 +207,7 @@ public class TestOptions extends JavadocTester {
|
||||
+ "Properties</a>",
|
||||
"<pre>public java.lang.Object <a href="
|
||||
+ "\"../src-html/linksource/Properties.html#line.31\">someProperty</a></pre>",
|
||||
"<pre>public java.lang.Object <a href="
|
||||
"<pre class=\"methodSignature\">public java.lang.Object <a href="
|
||||
+ "\"../src-html/linksource/Properties.html#line.31\">someProperty</a>()</pre>");
|
||||
|
||||
checkOutput("src-html/linksource/Properties.html", true,
|
||||
@ -222,7 +222,7 @@ public class TestOptions extends JavadocTester {
|
||||
+ "field</a></pre>",
|
||||
"<pre>public <a href=\"../src-html/linksource/SomeClass.html#line.33\">"
|
||||
+ "SomeClass</a>()</pre>",
|
||||
"<pre>public int <a href=\"../src-html/linksource/SomeClass.html#line.36\">"
|
||||
"<pre class=\"methodSignature\">public int <a href=\"../src-html/linksource/SomeClass.html#line.36\">"
|
||||
+ "method</a>()</pre>");
|
||||
|
||||
checkOutput("src-html/linksource/SomeClass.html", true,
|
||||
|
@ -52,7 +52,7 @@ public class TestBadOverride extends JavadocTester {
|
||||
checkOutput("pkg4/Foo.html", true,
|
||||
"<li class=\"blockList\">\n"
|
||||
+ "<h4>toString</h4>\n"
|
||||
+ "<pre>public void toString()</pre>\n"
|
||||
+ "<pre class=\"methodSignature\">public void toString()</pre>\n"
|
||||
+ "<div class=\"block\">Why can't I do this ?</div>\n"
|
||||
+ "</li>");
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public class TestPrivateClasses extends JavadocTester {
|
||||
+ "</li>\n"
|
||||
+ "</ul>",
|
||||
// Method is documented as though it is declared in the inheriting method.
|
||||
"<pre>public void methodInheritedFromParent​(int p1)",
|
||||
"<pre class=\"methodSignature\">public void methodInheritedFromParent​(int p1)",
|
||||
"<dl>\n"
|
||||
+ "<dt>All Implemented Interfaces:</dt>\n"
|
||||
+ "<dd><code><a href=\"PublicInterface.html\" title=\"interface in pkg\">"
|
||||
|
@ -71,7 +71,7 @@ public class TestSerializedFormWithClassFile extends JavadocTester {
|
||||
checkExit(Exit.OK);
|
||||
|
||||
checkOutput("serialized-form.html", true,
|
||||
"<pre>public void readObject​"
|
||||
"<pre class=\"methodSignature\">public void readObject​"
|
||||
+ "(java.io.ObjectInputStream arg0)\n"
|
||||
+ " throws java.lang.ClassNotFoundException,\n"
|
||||
+ " java.io.IOException</pre>\n");
|
||||
|
@ -87,7 +87,7 @@ public class TestSummaryTag extends JavadocTester {
|
||||
checkOutput("p1/A.html", true,
|
||||
"<li class=\"blockList\">\n"
|
||||
+ "<h4>m3</h4>\n"
|
||||
+ "<pre>public void m3()</pre>\n"
|
||||
+ "<pre class=\"methodSignature\">public void m3()</pre>\n"
|
||||
+ "<div class=\"block\">First sentence some text maybe second sentence.</div>\n"
|
||||
+ "</li>\n"
|
||||
);
|
||||
|
@ -154,22 +154,22 @@ public class TestTypeAnnotations extends JavadocTester {
|
||||
|
||||
// Test for type annotations on method return types (MethodReturnType.java).
|
||||
checkOutput("typeannos/MtdDefaultScope.html", true,
|
||||
"<pre>public <T> <a href=\"MRtnA.html\" "
|
||||
"<pre class=\"methodSignature\">public <T> <a href=\"MRtnA.html\" "
|
||||
+ "title=\"annotation in typeannos\">@MRtnA</a> java.lang.String"
|
||||
+ " method()</pre>",
|
||||
|
||||
// When JDK-8068737 is fixed, we should change the order
|
||||
"<pre><a href=\"MRtnA.html\" title=\"annotation in typeannos\">"
|
||||
"<pre class=\"methodSignature\"><a href=\"MRtnA.html\" title=\"annotation in typeannos\">"
|
||||
+ "@MRtnA</a> java.lang.String "
|
||||
+ "<a href=\"MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> [] "
|
||||
+ "<a href=\"MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> []"
|
||||
+ " array2Deep()</pre>",
|
||||
|
||||
"<pre><a href=\"MRtnA.html\" title=\"annotation in "
|
||||
"<pre class=\"methodSignature\"><a href=\"MRtnA.html\" title=\"annotation in "
|
||||
+ "typeannos\">@MRtnA</a> java.lang.String[][] array2()</pre>");
|
||||
|
||||
checkOutput("typeannos/MtdModifiedScoped.html", true,
|
||||
"<pre>public final <a href=\"MtdParameterized.html\" "
|
||||
"<pre class=\"methodSignature\">public final <a href=\"MtdParameterized.html\" "
|
||||
+ "title=\"class in typeannos\">MtdParameterized</a><<a href=\""
|
||||
+ "MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> "
|
||||
+ "<a href=\"MtdParameterized.html\" title=\"class in "
|
||||
@ -182,11 +182,11 @@ public class TestTypeAnnotations extends JavadocTester {
|
||||
|
||||
// Test for type annotations on method type parameters (MethodTypeParameters.java).
|
||||
checkOutput("typeannos/UnscopedUnmodified.html", true,
|
||||
"<pre><K extends <a href=\"MTyParamA.html\" title=\""
|
||||
"<pre class=\"methodSignature\"><K extends <a href=\"MTyParamA.html\" title=\""
|
||||
+ "annotation in typeannos\">@MTyParamA</a> java.lang.String>"
|
||||
+ " void methodExtends()</pre>",
|
||||
|
||||
"<pre><K extends <a href=\"MTyParamA.html\" title=\""
|
||||
"<pre class=\"methodSignature\"><K extends <a href=\"MTyParamA.html\" title=\""
|
||||
+ "annotation in typeannos\">@MTyParamA</a> <a href=\""
|
||||
+ "MtdTyParameterized.html\" title=\"class in typeannos\">"
|
||||
+ "MtdTyParameterized</a><<a href=\"MTyParamB.html\" "
|
||||
@ -194,11 +194,11 @@ public class TestTypeAnnotations extends JavadocTester {
|
||||
+ ">> void nestedExtends()</pre>");
|
||||
|
||||
checkOutput("typeannos/PublicModifiedMethods.html", true,
|
||||
"<pre>public final <K extends <a href=\""
|
||||
"<pre class=\"methodSignature\">public final <K extends <a href=\""
|
||||
+ "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> "
|
||||
+ "java.lang.String> void methodExtends()</pre>",
|
||||
|
||||
"<pre>public final <K extends <a href=\""
|
||||
"<pre class=\"methodSignature\">public final <K extends <a href=\""
|
||||
+ "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> "
|
||||
+ "java.lang.String,​V extends <a href=\"MTyParamA.html\" "
|
||||
+ "title=\"annotation in typeannos\">@MTyParamA</a> <a href=\""
|
||||
@ -209,12 +209,12 @@ public class TestTypeAnnotations extends JavadocTester {
|
||||
|
||||
// Test for type annotations on parameters (Parameters.java).
|
||||
checkOutput("typeannos/Parameters.html", true,
|
||||
"<pre>void unannotated​(<a href=\""
|
||||
"<pre class=\"methodSignature\">void unannotated​(<a href=\""
|
||||
+ "ParaParameterized.html\" title=\"class in typeannos\">"
|
||||
+ "ParaParameterized</a><java.lang.String,​java.lang.String>"
|
||||
+ " a)</pre>",
|
||||
|
||||
"<pre>void nestedParaParameterized​(<a href=\""
|
||||
"<pre class=\"methodSignature\">void nestedParaParameterized​(<a href=\""
|
||||
+ "ParaParameterized.html\" title=\"class in typeannos\">"
|
||||
+ "ParaParameterized</a><<a href=\"ParamA.html\" "
|
||||
+ "title=\"annotation in typeannos\">@ParamA</a> <a href=\""
|
||||
@ -227,7 +227,7 @@ public class TestTypeAnnotations extends JavadocTester {
|
||||
+ "</a> java.lang.String> a)</pre>",
|
||||
|
||||
// When JDK-8068737 is fixed, we should change the order
|
||||
"<pre>void array2Deep​(<a href=\"ParamA.html\" "
|
||||
"<pre class=\"methodSignature\">void array2Deep​(<a href=\"ParamA.html\" "
|
||||
+ "title=\"annotation in typeannos\">@ParamA</a> java.lang.String "
|
||||
+ "<a href=\"ParamB.html\" title=\"annotation in typeannos\">"
|
||||
+ "@ParamB</a> [] "
|
||||
@ -237,34 +237,34 @@ public class TestTypeAnnotations extends JavadocTester {
|
||||
|
||||
// Test for type annotations on throws (Throws.java).
|
||||
checkOutput("typeannos/ThrDefaultUnmodified.html", true,
|
||||
"<pre>void oneException()\n"
|
||||
"<pre class=\"methodSignature\">void oneException()\n"
|
||||
+ " throws <a href=\"ThrA.html\" title=\""
|
||||
+ "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>",
|
||||
|
||||
"<pre>void twoExceptions()\n"
|
||||
"<pre class=\"methodSignature\">void twoExceptions()\n"
|
||||
+ " throws <a href=\"ThrA.html\" title=\""
|
||||
+ "annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n"
|
||||
+ " <a href=\"ThrA.html\" title=\""
|
||||
+ "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
|
||||
|
||||
checkOutput("typeannos/ThrPublicModified.html", true,
|
||||
"<pre>public final void oneException​(java.lang.String a)\n"
|
||||
+ " throws <a href=\"ThrA.html\" "
|
||||
"<pre class=\"methodSignature\">public final void oneException​"
|
||||
+ "(java.lang.String a)\n throws <a href=\"ThrA.html\" "
|
||||
+ "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>",
|
||||
|
||||
"<pre>public final void twoExceptions​(java.lang.String a)\n"
|
||||
+ " throws <a href=\"ThrA.html\" "
|
||||
"<pre class=\"methodSignature\">public final void twoExceptions​"
|
||||
+ "(java.lang.String a)\n throws <a href=\"ThrA.html\" "
|
||||
+ "title=\"annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n"
|
||||
+ " <a href=\"ThrA.html\" "
|
||||
+ "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
|
||||
|
||||
checkOutput("typeannos/ThrWithValue.html", true,
|
||||
"<pre>void oneException()\n"
|
||||
"<pre class=\"methodSignature\">void oneException()\n"
|
||||
+ " throws <a href=\"ThrB.html\" title=\""
|
||||
+ "annotation in typeannos\">@ThrB</a>("
|
||||
+ "\"m\") java.lang.Exception</pre>",
|
||||
|
||||
"<pre>void twoExceptions()\n"
|
||||
"<pre class=\"methodSignature\">void twoExceptions()\n"
|
||||
+ " throws <a href=\"ThrB.html\" title=\""
|
||||
+ "annotation in typeannos\">@ThrB</a>("
|
||||
+ "\"m\") java.lang.RuntimeException,\n"
|
||||
@ -273,32 +273,32 @@ public class TestTypeAnnotations extends JavadocTester {
|
||||
|
||||
// Test for type annotations on type parameters (TypeParameters.java).
|
||||
checkOutput("typeannos/TestMethods.html", true,
|
||||
"<pre><K,​<a href=\"TyParaA.html\" title=\"annotation in typeannos\">"
|
||||
+ "@TyParaA</a> V extends <a href=\"TyParaA.html\" "
|
||||
"<pre class=\"methodSignature\"><K,​<a href=\"TyParaA.html\" title="
|
||||
+ "\"annotation in typeannos\">@TyParaA</a> V extends <a href=\"TyParaA.html\" "
|
||||
+ "title=\"annotation in typeannos\">@TyParaA</a> "
|
||||
+ "java.lang.String> void secondAnnotated()</pre>"
|
||||
);
|
||||
|
||||
// Test for type annotations on wildcard type (Wildcards.java).
|
||||
checkOutput("typeannos/BoundTest.html", true,
|
||||
"<pre>void wcExtends​(<a href=\"MyList.html\" "
|
||||
"<pre class=\"methodSignature\">void wcExtends​(<a href=\"MyList.html\" "
|
||||
+ "title=\"class in typeannos\">MyList</a><? extends <a href=\""
|
||||
+ "WldA.html\" title=\"annotation in typeannos\">@WldA"
|
||||
+ "</a> java.lang.String> l)</pre>",
|
||||
|
||||
"<pre><a href=\"MyList.html\" title=\"class in "
|
||||
"<pre class=\"methodSignature\"><a href=\"MyList.html\" title=\"class in "
|
||||
+ "typeannos\">MyList</a><? super <a href=\"WldA.html\" "
|
||||
+ "title=\"annotation in typeannos\">@WldA</a> java.lang.String>"
|
||||
+ " returnWcSuper()</pre>");
|
||||
|
||||
checkOutput("typeannos/BoundWithValue.html", true,
|
||||
"<pre>void wcSuper​(<a href=\"MyList.html\" title=\""
|
||||
+ "class in typeannos\">MyList</a><? super <a href=\""
|
||||
"<pre class=\"methodSignature\">void wcSuper​(<a href=\"MyList.html\""
|
||||
+ " title=\"class in typeannos\">MyList</a><? super <a href=\""
|
||||
+ "WldB.html\" title=\"annotation in typeannos\">@WldB</a>("
|
||||
+ "\"m\") java.lang."
|
||||
+ "String> l)</pre>",
|
||||
|
||||
"<pre><a href=\"MyList.html\" title=\"class in "
|
||||
"<pre class=\"methodSignature\"><a href=\"MyList.html\" title=\"class in "
|
||||
+ "typeannos\">MyList</a><? extends <a href=\"WldB."
|
||||
+ "html\" title=\"annotation in typeannos\">@WldB</a>("
|
||||
+ "\"m\") java.lang.String"
|
||||
@ -306,37 +306,37 @@ public class TestTypeAnnotations extends JavadocTester {
|
||||
|
||||
// Test for receiver annotations (Receivers.java).
|
||||
checkOutput("typeannos/DefaultUnmodified.html", true,
|
||||
"<pre>void withException​(<a href=\"RcvrA.html\" "
|
||||
"<pre class=\"methodSignature\">void withException​(<a href=\"RcvrA.html\" "
|
||||
+ "title=\"annotation in typeannos\">@RcvrA</a> "
|
||||
+ "DefaultUnmodified this)\n"
|
||||
+ " throws java."
|
||||
+ "lang.Exception</pre>",
|
||||
|
||||
"<pre>java.lang.String nonVoid​(<a href=\"RcvrA."
|
||||
"<pre class=\"methodSignature\">java.lang.String nonVoid​(<a href=\"RcvrA."
|
||||
+ "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\""
|
||||
+ "RcvrB.html\" title=\"annotation in typeannos\">@RcvrB"
|
||||
+ "</a>(\"m\")"
|
||||
+ " DefaultUnmodified this)</pre>",
|
||||
|
||||
"<pre><T extends java.lang.Runnable> void accept​("
|
||||
"<pre class=\"methodSignature\"><T extends java.lang.Runnable> void accept​("
|
||||
+ "<a href=\"RcvrA.html\" title=\"annotation in "
|
||||
+ "typeannos\">@RcvrA</a> DefaultUnmodified this,\n"
|
||||
+ " T r)\n"
|
||||
+ " throws java.lang.Exception</pre>");
|
||||
|
||||
checkOutput("typeannos/PublicModified.html", true,
|
||||
"<pre>public final java.lang.String nonVoid​(<a href=\""
|
||||
+ "RcvrA.html\" title=\"annotation in typeannos\">"
|
||||
"<pre class=\"methodSignature\">public final java.lang.String nonVoid​"
|
||||
+ "(<a href=\"RcvrA.html\" title=\"annotation in typeannos\">"
|
||||
+ "@RcvrA</a> PublicModified this)</pre>",
|
||||
|
||||
"<pre>public final <T extends java.lang.Runnable> "
|
||||
"<pre class=\"methodSignature\">public final <T extends java.lang.Runnable> "
|
||||
+ "void accept​(<a href=\"RcvrA.html\" title=\""
|
||||
+ "annotation in typeannos\">@RcvrA</a> PublicModified this,\n"
|
||||
+ " T r)\n"
|
||||
+ " throws java.lang.Exception</pre>");
|
||||
|
||||
checkOutput("typeannos/WithValue.html", true,
|
||||
"<pre><T extends java.lang.Runnable> void accept​("
|
||||
"<pre class=\"methodSignature\"><T extends java.lang.Runnable> void accept​("
|
||||
+ "<a href=\"RcvrB.html\" title=\"annotation in "
|
||||
+ "typeannos\">@RcvrB</a>("
|
||||
+ "\"m\") WithValue this,\n"
|
||||
@ -344,17 +344,17 @@ public class TestTypeAnnotations extends JavadocTester {
|
||||
+ " throws java.lang.Exception</pre>");
|
||||
|
||||
checkOutput("typeannos/WithFinal.html", true,
|
||||
"<pre>java.lang.String nonVoid​(<a href=\"RcvrB.html\" "
|
||||
"<pre class=\"methodSignature\">java.lang.String nonVoid​(<a href=\"RcvrB.html\" "
|
||||
+ "title=\"annotation in typeannos\">@RcvrB</a>(\"m\") "
|
||||
+ "<a href=\"WithFinal.html\" title=\"class in typeannos\">"
|
||||
+ "WithFinal</a> afield)</pre>");
|
||||
|
||||
checkOutput("typeannos/WithBody.html", true,
|
||||
"<pre>void field​(<a href=\"RcvrA.html\" title=\""
|
||||
"<pre class=\"methodSignature\">void field​(<a href=\"RcvrA.html\" title=\""
|
||||
+ "annotation in typeannos\">@RcvrA</a> WithBody this)</pre>");
|
||||
|
||||
checkOutput("typeannos/Generic2.html", true,
|
||||
"<pre>void test2​(<a href=\"RcvrA.html\" title=\""
|
||||
"<pre class=\"methodSignature\">void test2​(<a href=\"RcvrA.html\" title=\""
|
||||
+ "annotation in typeannos\">@RcvrA</a> Generic2<X> this)</pre>");
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user