6741004: UseLargePages + UseCompressedOops breaks implicit null checking guard page

Turn off c2 implicit null checking on windows and large pages specified.

Reviewed-by: jrose, xlu
This commit is contained in:
Coleen Phillimore 2008-09-02 15:18:26 -04:00
parent 1d328ffab8
commit 83e7d32161
4 changed files with 16 additions and 9 deletions

View File

@ -2082,7 +2082,7 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &fpu ) {
in2 = n->in(2)->in(1);
} else if ( n->in(2)->Opcode() == Op_ConP ) {
const Type* t = n->in(2)->bottom_type();
if (t == TypePtr::NULL_PTR) {
if (t == TypePtr::NULL_PTR && UseImplicitNullCheckForNarrowOop) {
Node *in1 = n->in(1);
if (Matcher::clone_shift_expressions) {
// x86, ARM and friends can handle 2 adds in addressing mode.

View File

@ -1204,15 +1204,17 @@ void Arguments::set_ergonomics_flags() {
// Turn off until bug is fixed.
// FLAG_SET_ERGO(bool, UseCompressedOops, true);
}
#ifdef _WIN64
if (UseLargePages && UseCompressedOops) {
// Cannot allocate guard pages for implicit checks in indexed addressing
// mode, when large pages are specified on windows.
FLAG_SET_DEFAULT(UseImplicitNullCheckForNarrowOop, false);
}
#endif // _WIN64
} else {
if (UseCompressedOops && !FLAG_IS_DEFAULT(UseCompressedOops)) {
// If specified, give a warning
if (UseConcMarkSweepGC){
warning("Compressed Oops does not work with CMS");
} else {
warning(
"Max heap size too large for Compressed Oops");
}
warning( "Max heap size too large for Compressed Oops");
FLAG_SET_DEFAULT(UseCompressedOops, false);
}
}

View File

@ -294,6 +294,9 @@ class CommandLineFlags {
lp64_product(bool, CheckCompressedOops, trueInDebug, \
"generate checks in encoding/decoding code") \
\
product(bool, UseImplicitNullCheckForNarrowOop, true, \
"generate implicit null check in indexed addressing mode.") \
\
/* UseMembar is theoretically a temp flag used for memory barrier \
* removal testing. It was supposed to be removed before FCS but has \
* been re-added (see 6401008) */ \

View File

@ -380,7 +380,8 @@ ReservedHeapSpace::ReservedHeapSpace(size_t size, size_t alignment,
bool large, char* requested_address) :
ReservedSpace(size, alignment, large,
requested_address,
UseCompressedOops ? lcm(os::vm_page_size(), alignment) : 0) {
UseCompressedOops && UseImplicitNullCheckForNarrowOop ?
lcm(os::vm_page_size(), alignment) : 0) {
// Only reserved space for the java heap should have a noaccess_prefix
// if using compressed oops.
protect_noaccess_prefix(size);
@ -391,7 +392,8 @@ ReservedHeapSpace::ReservedHeapSpace(const size_t prefix_size,
const size_t suffix_size,
const size_t suffix_align) :
ReservedSpace(prefix_size, prefix_align, suffix_size, suffix_align,
UseCompressedOops ? lcm(os::vm_page_size(), prefix_align) : 0) {
UseCompressedOops && UseImplicitNullCheckForNarrowOop ?
lcm(os::vm_page_size(), prefix_align) : 0) {
protect_noaccess_prefix(prefix_size+suffix_size);
}