7029509: nightly failures after static fields in Class
authornever
Mon, 21 Mar 2011 14:06:50 -0700
changeset 8726 7bafcf0e5bfb
parent 8725 8c1e3dd5fe1b
child 8727 1642a45f024f
7029509: nightly failures after static fields in Class Reviewed-by: kvn
hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
hotspot/src/share/vm/prims/jvmtiTagMap.cpp
hotspot/src/share/vm/services/heapDumper.cpp
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp	Fri Mar 18 16:00:34 2011 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp	Mon Mar 21 14:06:50 2011 -0700
@@ -3350,11 +3350,12 @@
 
   for (Klass *subk = ik->subklass(); subk != NULL;
        subk = subk->next_sibling()) {
-    klassOop sub = subk->as_klassOop();
-    instanceKlass *subik = (instanceKlass *)sub->klass_part();
-
-    // recursively do subclasses of the current subclass
-    increment_class_counter(subik, THREAD);
+    if (subk->oop_is_instance()) {
+      // Only update instanceKlasses
+      instanceKlass *subik = (instanceKlass*)subk;
+      // recursively do subclasses of the current subclass
+      increment_class_counter(subik, THREAD);
+    }
   }
 }
 
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Fri Mar 18 16:00:34 2011 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Mon Mar 21 14:06:50 2011 -0700
@@ -2955,7 +2955,7 @@
         }
       } else {
          if (is_reporting_primitive_fields()) {
-           address addr = (address)k + field->field_offset();
+           address addr = (address)mirror + field->field_offset();
            int slot = field->field_index();
            if (!CallbackInvoker::report_primitive_static_field(mirror, slot, addr, type)) {
              delete field_map;
--- a/hotspot/src/share/vm/services/heapDumper.cpp	Fri Mar 18 16:00:34 2011 -0700
+++ b/hotspot/src/share/vm/services/heapDumper.cpp	Mon Mar 21 14:06:50 2011 -0700
@@ -832,7 +832,7 @@
 
       // value
       int offset = fld.offset();
-      address addr = (address)k + offset;
+      address addr = (address)ikh->java_mirror() + offset;
 
       dump_field_value(writer, sig->byte_at(0), addr);
     }