6779339: turn off LinkWellKnownClasses by default pending further testing
authorjrose
Mon, 08 Dec 2008 17:15:02 -0800
changeset 1661 7cb0f0d385f3
parent 1614 7ffda4881e31
child 1662 76a93a5fb765
6779339: turn off LinkWellKnownClasses by default pending further testing Summary: temporarily turn off LinkWellKnownClasses optimization Reviewed-by: never, kvn
hotspot/src/share/vm/classfile/classFileParser.cpp
hotspot/src/share/vm/runtime/globals.hpp
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Thu Dec 04 08:55:34 2008 -0800
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Mon Dec 08 17:15:02 2008 -0800
@@ -581,7 +581,8 @@
       interf = KlassHandle(THREAD, k);
       vmtimer->resume();
 
-      cp->klass_at_put(interface_index, interf()); // eagerly resolve
+      if (LinkWellKnownClasses)  // my super type is well known to me
+        cp->klass_at_put(interface_index, interf()); // eagerly resolve
     }
 
     if (!Klass::cast(interf())->is_interface()) {
@@ -2699,7 +2700,8 @@
                                                            CHECK_(nullHandle));
       KlassHandle kh (THREAD, k);
       super_klass = instanceKlassHandle(THREAD, kh());
-      cp->klass_at_put(super_class_index, super_klass()); // eagerly resolve
+      if (LinkWellKnownClasses)  // my super class is well known to me
+        cp->klass_at_put(super_class_index, super_klass()); // eagerly resolve
     }
     if (super_klass.not_null()) {
       if (super_klass->is_interface()) {
@@ -3128,7 +3130,8 @@
     this_klass->set_method_ordering(method_ordering());
     this_klass->set_initial_method_idnum(methods->length());
     this_klass->set_name(cp->klass_name_at(this_class_index));
-    cp->klass_at_put(this_class_index, this_klass()); // eagerly resolve
+    if (LinkWellKnownClasses)  // I am well known to myself
+      cp->klass_at_put(this_class_index, this_klass()); // eagerly resolve
     this_klass->set_protection_domain(protection_domain());
     this_klass->set_fields_annotations(fields_annotations());
     this_klass->set_methods_annotations(methods_annotations());
--- a/hotspot/src/share/vm/runtime/globals.hpp	Thu Dec 04 08:55:34 2008 -0800
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Mon Dec 08 17:15:02 2008 -0800
@@ -815,7 +815,7 @@
   product(bool, ClassUnloading, true,                                       \
           "Do unloading of classes")                                        \
                                                                             \
-  diagnostic(bool, LinkWellKnownClasses, true,                              \
+  diagnostic(bool, LinkWellKnownClasses, false,                             \
           "Resolve a well known class as soon as its name is seen")         \
                                                                             \
   develop(bool, DisableStartThread, false,                                  \