changeset 3436:7df3125953cb

7146354: Re-enable Compressed OOPs after 7118647 is resolved Summary: Relax the assertion to simply check for COOP mode rather than an exact address. Reviewed-by: coleenp, kvn, phh, dcubed Contributed-by: james.melvin@oracle.com
author coleenp
date Thu, 16 Feb 2012 15:52:01 -0500
parents f1cb6f9cfe21
children df4927a3b82e
files src/share/vm/runtime/arguments.cpp src/share/vm/runtime/virtualspace.cpp
diffstat 2 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Wed Feb 15 12:17:30 2012 -0800
+++ b/src/share/vm/runtime/arguments.cpp	Thu Feb 16 15:52:01 2012 -0500
@@ -1370,12 +1370,9 @@
   // by ergonomics.
   if (MaxHeapSize <= max_heap_for_compressed_oops()) {
 #if !defined(COMPILER1) || defined(TIERED)
-// disable UseCompressedOops by default on MacOS X until 7118647 is fixed
-#ifndef __APPLE__
     if (FLAG_IS_DEFAULT(UseCompressedOops)) {
       FLAG_SET_ERGO(bool, UseCompressedOops, true);
     }
-#endif // !__APPLE__
 #endif
 #ifdef _WIN64
     if (UseLargePages && UseCompressedOops) {
--- a/src/share/vm/runtime/virtualspace.cpp	Wed Feb 15 12:17:30 2012 -0800
+++ b/src/share/vm/runtime/virtualspace.cpp	Thu Feb 16 15:52:01 2012 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, 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
@@ -455,7 +455,7 @@
 
 void ReservedSpace::protect_noaccess_prefix(const size_t size) {
   assert( (_noaccess_prefix != 0) == (UseCompressedOops && _base != NULL &&
-                                      (size_t(_base + _size) > OopEncodingHeapMax) &&
+                                      (Universe::narrow_oop_base() != NULL) &&
                                       Universe::narrow_oop_use_implicit_null_checks()),
          "noaccess_prefix should be used only with non zero based compressed oops");