changeset 3743:bdb5f8c9978b

7199068: NPG: SharedSkipVerify is meaningless Summary: Remove the SharedSkipVerify flag Reviewed-by: kamg, sspitsyn, coleenp Contributed-by: harold.seigel@oracle.com
author coleenp
date Wed, 10 Oct 2012 17:04:33 -0400
parents b9a9ed0f8eeb
children 48a75d2640a5
files src/share/vm/classfile/javaClasses.cpp src/share/vm/memory/universe.cpp src/share/vm/oops/klass.cpp src/share/vm/runtime/globals.hpp src/share/vm/runtime/handles.cpp src/share/vm/runtime/handles.hpp
diffstat 6 files changed, 9 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/javaClasses.cpp	Tue Oct 09 10:09:34 2012 -0700
+++ b/src/share/vm/classfile/javaClasses.cpp	Wed Oct 10 17:04:33 2012 -0400
@@ -413,8 +413,7 @@
 }
 
 bool java_lang_String::equals(oop java_string, jchar* chars, int len) {
-  assert(SharedSkipVerify ||
-         java_string->klass() == SystemDictionary::String_klass(),
+  assert(java_string->klass() == SystemDictionary::String_klass(),
          "must be java_string");
   typeArrayOop value  = java_lang_String::value(java_string);
   int          offset = java_lang_String::offset(java_string);
--- a/src/share/vm/memory/universe.cpp	Tue Oct 09 10:09:34 2012 -0700
+++ b/src/share/vm/memory/universe.cpp	Wed Oct 10 17:04:33 2012 -0400
@@ -1243,10 +1243,6 @@
 }
 
 void Universe::verify(bool silent, VerifyOption option) {
-  if (SharedSkipVerify) {
-    return;
-  }
-
   // The use of _verify_in_progress is a temporary work around for
   // 6320749.  Don't bother with a creating a class to set and clear
   // it since it is only used in this method and the control flow is
--- a/src/share/vm/oops/klass.cpp	Tue Oct 09 10:09:34 2012 -0700
+++ b/src/share/vm/oops/klass.cpp	Wed Oct 10 17:04:33 2012 -0400
@@ -356,12 +356,11 @@
 }
 
 void Klass::append_to_sibling_list() {
-  debug_only(if (!SharedSkipVerify) verify();)
+  debug_only(verify();)
   // add ourselves to superklass' subklass list
   InstanceKlass* super = superklass();
   if (super == NULL) return;        // special case: class Object
-  assert(SharedSkipVerify ||
-         (!super->is_interface()    // interfaces cannot be supers
+  assert((!super->is_interface()    // interfaces cannot be supers
           && (super->superklass() == NULL || !is_interface())),
          "an interface can only be a subklass of Object");
   Klass* prev_first_subklass = super->subklass_oop();
@@ -371,7 +370,7 @@
   }
   // make ourselves the superklass' first subklass
   super->set_subklass(this);
-  debug_only(if (!SharedSkipVerify) verify();)
+  debug_only(verify();)
 }
 
 void Klass::remove_from_sibling_list() {
--- a/src/share/vm/runtime/globals.hpp	Tue Oct 09 10:09:34 2012 -0700
+++ b/src/share/vm/runtime/globals.hpp	Wed Oct 10 17:04:33 2012 -0400
@@ -3542,10 +3542,6 @@
   product(uintx, SharedDummyBlockSize, 0,                                   \
           "Size of dummy block used to shift heap addresses (in bytes)")    \
                                                                             \
-  diagnostic(bool, SharedSkipVerify, false,                                 \
-          "Skip assert() and verify() which page-in unwanted shared "       \
-          "objects. ")                                                      \
-                                                                            \
   diagnostic(bool, EnableInvokeDynamic, true,                               \
           "support JSR 292 (method handles, invokedynamic, "                \
           "anonymous classes")                                              \
--- a/src/share/vm/runtime/handles.cpp	Tue Oct 09 10:09:34 2012 -0700
+++ b/src/share/vm/runtime/handles.cpp	Wed Oct 10 17:04:33 2012 -0400
@@ -48,7 +48,7 @@
 oop* HandleArea::allocate_handle(oop obj) {
   assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark");
   assert(_no_handle_mark_nesting == 0, "allocating handle inside NoHandleMark");
-  assert(SharedSkipVerify || obj->is_oop(), "sanity check");
+  assert(obj->is_oop(), "sanity check");
   return real_allocate_handle(obj);
 }
 
--- a/src/share/vm/runtime/handles.hpp	Tue Oct 09 10:09:34 2012 -0700
+++ b/src/share/vm/runtime/handles.hpp	Wed Oct 10 17:04:33 2012 -0400
@@ -110,11 +110,11 @@
     /* Constructors */                           \
     type##Handle ()                              : Handle()                 {} \
     type##Handle (type##Oop obj) : Handle((oop)obj) {                         \
-      assert(SharedSkipVerify || is_null() || ((oop)obj)->is_a(),             \
+      assert(is_null() || ((oop)obj)->is_a(),                                 \
              "illegal type");                                                 \
     }                                                                         \
     type##Handle (Thread* thread, type##Oop obj) : Handle(thread, (oop)obj) { \
-      assert(SharedSkipVerify || is_null() || ((oop)obj)->is_a(), "illegal type");  \
+      assert(is_null() || ((oop)obj)->is_a(), "illegal type");                \
     }                                                                         \
     \
     /* Operators for ease of use */              \
@@ -201,11 +201,11 @@
   /* Constructors */
   instanceKlassHandle () : KlassHandle() {}
   instanceKlassHandle (const Klass* k) : KlassHandle(k) {
-    assert(SharedSkipVerify || k == NULL || k->oop_is_instance(),
+    assert(k == NULL || k->oop_is_instance(),
            "illegal type");
   }
   instanceKlassHandle (Thread* thread, const Klass* k) : KlassHandle(thread, k) {
-    assert(SharedSkipVerify || k == NULL || k->oop_is_instance(),
+    assert(k == NULL || k->oop_is_instance(),
            "illegal type");
   }
   /* Access to klass part */