8150075: [JVMCI] expose reserved stack machinery and Inline flag in HotSpotVMConfig

Reviewed-by: kvn, twisti
This commit is contained in:
Tom Rodriguez 2016-02-17 09:57:10 -08:00
parent 2c5e376d98
commit cc370ff8f2
4 changed files with 28 additions and 0 deletions

View file

@ -56,6 +56,13 @@ public interface HotSpotResolvedJavaMethod extends ResolvedJavaMethod {
*/ */
boolean isDontInline(); boolean isDontInline();
/**
* Returns true if this method has a {@code ReservedStackAccess} annotation.
*
* @return true if ReservedStackAccess annotation present, false otherwise
*/
boolean hasReservedStackAccess();
/** /**
* Manually adds a DontInline annotation to this method. * Manually adds a DontInline annotation to this method.
*/ */

View file

@ -308,6 +308,15 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp
return (getFlags() & config().methodFlagsDontInline) != 0; return (getFlags() & config().methodFlagsDontInline) != 0;
} }
/**
* Returns true if this method has a {@code ReservedStackAccess} annotation.
*
* @return true if ReservedStackAccess annotation present, false otherwise
*/
public boolean hasReservedStackAccess() {
return (getFlags() & config().methodFlagsReservedStackAccess) != 0;
}
/** /**
* Manually adds a DontInline annotation to this method. * Manually adds a DontInline annotation to this method.
*/ */

View file

@ -850,6 +850,7 @@ public class HotSpotVMConfig {
@HotSpotVMFlag(name = "DontCompileHugeMethods") @Stable public boolean dontCompileHugeMethods; @HotSpotVMFlag(name = "DontCompileHugeMethods") @Stable public boolean dontCompileHugeMethods;
@HotSpotVMFlag(name = "HugeMethodLimit") @Stable public int hugeMethodLimit; @HotSpotVMFlag(name = "HugeMethodLimit") @Stable public int hugeMethodLimit;
@HotSpotVMFlag(name = "PrintInlining") @Stable public boolean printInlining; @HotSpotVMFlag(name = "PrintInlining") @Stable public boolean printInlining;
@HotSpotVMFlag(name = "Inline") @Stable public boolean inline;
@HotSpotVMFlag(name = "JVMCIUseFastLocking") @Stable public boolean useFastLocking; @HotSpotVMFlag(name = "JVMCIUseFastLocking") @Stable public boolean useFastLocking;
@HotSpotVMFlag(name = "ForceUnreachable") @Stable public boolean forceUnreachable; @HotSpotVMFlag(name = "ForceUnreachable") @Stable public boolean forceUnreachable;
@HotSpotVMFlag(name = "CodeCacheSegmentSize") @Stable public int codeSegmentSize; @HotSpotVMFlag(name = "CodeCacheSegmentSize") @Stable public int codeSegmentSize;
@ -974,6 +975,7 @@ public class HotSpotVMConfig {
@HotSpotVMFlag(name = "BlockZeroingLowLimit", archs = {"sparc"}) @Stable public int blockZeroingLowLimit; @HotSpotVMFlag(name = "BlockZeroingLowLimit", archs = {"sparc"}) @Stable public int blockZeroingLowLimit;
@HotSpotVMFlag(name = "StackShadowPages") @Stable public int stackShadowPages; @HotSpotVMFlag(name = "StackShadowPages") @Stable public int stackShadowPages;
@HotSpotVMFlag(name = "StackReservedPages") @Stable public int stackReservedPages;
@HotSpotVMFlag(name = "UseStackBanging") @Stable public boolean useStackBanging; @HotSpotVMFlag(name = "UseStackBanging") @Stable public boolean useStackBanging;
@HotSpotVMConstant(name = "STACK_BIAS") @Stable public int stackBias; @HotSpotVMConstant(name = "STACK_BIAS") @Stable public int stackBias;
@HotSpotVMField(name = "CompilerToVM::Data::vm_page_size", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int vmPageSize; @HotSpotVMField(name = "CompilerToVM::Data::vm_page_size", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int vmPageSize;
@ -1092,6 +1094,7 @@ public class HotSpotVMConfig {
@HotSpotVMField(name = "JavaThread::_satb_mark_queue", type = "SATBMarkQueue", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadSatbMarkQueueOffset; @HotSpotVMField(name = "JavaThread::_satb_mark_queue", type = "SATBMarkQueue", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadSatbMarkQueueOffset;
@HotSpotVMField(name = "JavaThread::_vm_result", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectResultOffset; @HotSpotVMField(name = "JavaThread::_vm_result", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectResultOffset;
@HotSpotVMField(name = "JavaThread::_jvmci_counters", type = "jlong*", get = HotSpotVMField.Type.OFFSET) @Stable public int jvmciCountersThreadOffset; @HotSpotVMField(name = "JavaThread::_jvmci_counters", type = "jlong*", get = HotSpotVMField.Type.OFFSET) @Stable public int jvmciCountersThreadOffset;
@HotSpotVMField(name = "JavaThread::_reserved_stack_activation", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadReservedStackActivationOffset;
/** /**
* An invalid value for {@link #rtldDefault}. * An invalid value for {@link #rtldDefault}.
@ -1235,6 +1238,7 @@ public class HotSpotVMConfig {
@HotSpotVMConstant(name = "Method::_force_inline") @Stable public int methodFlagsForceInline; @HotSpotVMConstant(name = "Method::_force_inline") @Stable public int methodFlagsForceInline;
@HotSpotVMConstant(name = "Method::_dont_inline") @Stable public int methodFlagsDontInline; @HotSpotVMConstant(name = "Method::_dont_inline") @Stable public int methodFlagsDontInline;
@HotSpotVMConstant(name = "Method::_hidden") @Stable public int methodFlagsHidden; @HotSpotVMConstant(name = "Method::_hidden") @Stable public int methodFlagsHidden;
@HotSpotVMConstant(name = "Method::_reserved_stack_access") @Stable public int methodFlagsReservedStackAccess;
@HotSpotVMConstant(name = "Method::nonvirtual_vtable_index") @Stable public int nonvirtualVtableIndex; @HotSpotVMConstant(name = "Method::nonvirtual_vtable_index") @Stable public int nonvirtualVtableIndex;
@HotSpotVMConstant(name = "Method::invalid_vtable_index") @Stable public int invalidVtableIndex; @HotSpotVMConstant(name = "Method::invalid_vtable_index") @Stable public int invalidVtableIndex;
@ -1491,6 +1495,8 @@ public class HotSpotVMConfig {
@HotSpotVMField(name = "StubRoutines::_updateBytesCRC32", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long updateBytesCRC32Stub; @HotSpotVMField(name = "StubRoutines::_updateBytesCRC32", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long updateBytesCRC32Stub;
@HotSpotVMField(name = "StubRoutines::_crc_table_adr", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long crcTableAddress; @HotSpotVMField(name = "StubRoutines::_crc_table_adr", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long crcTableAddress;
@HotSpotVMField(name = "StubRoutines::_throw_delayed_StackOverflowError_entry", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long throwDelayedStackOverflowErrorEntry;
@HotSpotVMField(name = "StubRoutines::_jbyte_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jbyteArraycopy; @HotSpotVMField(name = "StubRoutines::_jbyte_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jbyteArraycopy;
@HotSpotVMField(name = "StubRoutines::_jshort_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jshortArraycopy; @HotSpotVMField(name = "StubRoutines::_jshort_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jshortArraycopy;
@HotSpotVMField(name = "StubRoutines::_jint_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jintArraycopy; @HotSpotVMField(name = "StubRoutines::_jint_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jintArraycopy;
@ -1548,6 +1554,7 @@ public class HotSpotVMConfig {
@HotSpotVMAddress(name = "SharedRuntime::register_finalizer") @Stable public long registerFinalizerAddress; @HotSpotVMAddress(name = "SharedRuntime::register_finalizer") @Stable public long registerFinalizerAddress;
@HotSpotVMAddress(name = "SharedRuntime::exception_handler_for_return_address") @Stable public long exceptionHandlerForReturnAddressAddress; @HotSpotVMAddress(name = "SharedRuntime::exception_handler_for_return_address") @Stable public long exceptionHandlerForReturnAddressAddress;
@HotSpotVMAddress(name = "SharedRuntime::OSR_migration_end") @Stable public long osrMigrationEndAddress; @HotSpotVMAddress(name = "SharedRuntime::OSR_migration_end") @Stable public long osrMigrationEndAddress;
@HotSpotVMAddress(name = "SharedRuntime::enable_stack_reserved_zone") @Stable public long enableStackReservedZoneAddress;
@HotSpotVMAddress(name = "os::javaTimeMillis") @Stable public long javaTimeMillisAddress; @HotSpotVMAddress(name = "os::javaTimeMillis") @Stable public long javaTimeMillisAddress;
@HotSpotVMAddress(name = "os::javaTimeNanos") @Stable public long javaTimeNanosAddress; @HotSpotVMAddress(name = "os::javaTimeNanos") @Stable public long javaTimeNanosAddress;

View file

@ -151,6 +151,7 @@
nonstatic_field(JavaThread, _pending_failed_speculation, oop) \ nonstatic_field(JavaThread, _pending_failed_speculation, oop) \
nonstatic_field(JavaThread, _pending_transfer_to_interpreter, bool) \ nonstatic_field(JavaThread, _pending_transfer_to_interpreter, bool) \
nonstatic_field(JavaThread, _jvmci_counters, jlong*) \ nonstatic_field(JavaThread, _jvmci_counters, jlong*) \
nonstatic_field(JavaThread, _reserved_stack_activation, address) \
\ \
static_field(java_lang_Class, _klass_offset, int) \ static_field(java_lang_Class, _klass_offset, int) \
static_field(java_lang_Class, _array_klass_offset, int) \ static_field(java_lang_Class, _array_klass_offset, int) \
@ -210,6 +211,8 @@
\ \
static_field(StubRoutines, _verify_oop_count, jint) \ static_field(StubRoutines, _verify_oop_count, jint) \
\ \
static_field(StubRoutines, _throw_delayed_StackOverflowError_entry, address) \
\
static_field(StubRoutines, _jbyte_arraycopy, address) \ static_field(StubRoutines, _jbyte_arraycopy, address) \
static_field(StubRoutines, _jshort_arraycopy, address) \ static_field(StubRoutines, _jshort_arraycopy, address) \
static_field(StubRoutines, _jint_arraycopy, address) \ static_field(StubRoutines, _jint_arraycopy, address) \
@ -471,6 +474,7 @@
declare_constant(Method::_force_inline) \ declare_constant(Method::_force_inline) \
declare_constant(Method::_dont_inline) \ declare_constant(Method::_dont_inline) \
declare_constant(Method::_hidden) \ declare_constant(Method::_hidden) \
declare_constant(Method::_reserved_stack_access) \
\ \
declare_constant(Method::nonvirtual_vtable_index) \ declare_constant(Method::nonvirtual_vtable_index) \
declare_constant(Method::invalid_vtable_index) \ declare_constant(Method::invalid_vtable_index) \
@ -517,6 +521,7 @@
declare_function(SharedRuntime::register_finalizer) \ declare_function(SharedRuntime::register_finalizer) \
declare_function(SharedRuntime::exception_handler_for_return_address) \ declare_function(SharedRuntime::exception_handler_for_return_address) \
declare_function(SharedRuntime::OSR_migration_end) \ declare_function(SharedRuntime::OSR_migration_end) \
declare_function(SharedRuntime::enable_stack_reserved_zone) \
declare_function(SharedRuntime::dsin) \ declare_function(SharedRuntime::dsin) \
declare_function(SharedRuntime::dcos) \ declare_function(SharedRuntime::dcos) \
declare_function(SharedRuntime::dtan) \ declare_function(SharedRuntime::dtan) \