changeset 7439:21d3b0133d61

Several fixes: make full-gc use the reference-pending lock, clean up when shutting down the Shenandoah thread. Added write barrier to static_field_addr().
author Roman Kennke <rkennke@redhat.com>
date Wed, 10 Dec 2014 17:18:53 +0100
parents f93578332d69
children e71997fba947
files src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentThread.cpp src/share/vm/gc_implementation/shenandoah/vm_operations_shenandoah.hpp src/share/vm/oops/instanceKlass.cpp
diffstat 3 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentThread.cpp	Tue Dec 09 16:05:51 2014 +0100
+++ b/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentThread.cpp	Wed Dec 10 17:18:53 2014 +0100
@@ -151,6 +151,12 @@
       // yield();
     }
   }
+
+  // Release any threads waiting for full-gc. We won't do it ;-)
+  MonitorLockerEx ml(ShenandoahFullGC_lock);
+  _do_full_gc = false;
+  ml.notify_all();
+
 }
 
 void ShenandoahConcurrentThread::do_full_gc() {
--- a/src/share/vm/gc_implementation/shenandoah/vm_operations_shenandoah.hpp	Tue Dec 09 16:05:51 2014 +0100
+++ b/src/share/vm/gc_implementation/shenandoah/vm_operations_shenandoah.hpp	Wed Dec 10 17:18:53 2014 +0100
@@ -54,7 +54,7 @@
 
 };
 
-class VM_ShenandoahFullGC : public VM_Operation {
+class VM_ShenandoahFullGC : public VM_ShenandoahReferenceOperation {
  public:
   VMOp_Type type() const;
   void doit();
--- a/src/share/vm/oops/instanceKlass.cpp	Tue Dec 09 16:05:51 2014 +0100
+++ b/src/share/vm/oops/instanceKlass.cpp	Wed Dec 10 17:18:53 2014 +0100
@@ -2516,7 +2516,7 @@
 }
 
 address InstanceKlass::static_field_addr(int offset) {
-  return (address)(offset + InstanceMirrorKlass::offset_of_static_fields() + cast_from_oop<intptr_t>(java_mirror()));
+  return (address)(offset + InstanceMirrorKlass::offset_of_static_fields() + cast_from_oop<intptr_t>(oopDesc::bs()->resolve_and_maybe_copy_oop(java_mirror())));
 }