Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/vm_operations_g1.hpp @ 4022:db89aa49298f
7099824: G1: we should take the pending list lock before doing the remark pause
Summary: Acquire the pending list lock in the prologue method of G1's concurrent VM_Operation and release the lock in the epilogue() method. The locking/unlocking order of the pending list lock and the Heap_lock should match that in the prologue and epilogue methods of VM_GC_Operation.
Reviewed-by: tonyp, ysr
author | johnc |
---|---|
date | Thu, 20 Oct 2011 12:06:20 -0700 |
parents | c798c277ddd1 |
children | 64bf7c8270cb |
comparison
equal
deleted
inserted
replaced
4021:8d161913dfc3 | 4022:db89aa49298f |
---|---|
91 virtual const char* name() const { | 91 virtual const char* name() const { |
92 return "garbage-first incremental collection pause"; | 92 return "garbage-first incremental collection pause"; |
93 } | 93 } |
94 }; | 94 }; |
95 | 95 |
96 // Concurrent GC stop-the-world operations such as initial and final mark; | 96 // Concurrent GC stop-the-world operations such as remark and cleanup; |
97 // consider sharing these with CMS's counterparts. | 97 // consider sharing these with CMS's counterparts. |
98 class VM_CGC_Operation: public VM_Operation { | 98 class VM_CGC_Operation: public VM_Operation { |
99 VoidClosure* _cl; | 99 VoidClosure* _cl; |
100 const char* _printGCMessage; | 100 const char* _printGCMessage; |
101 | |
102 protected: | |
103 // java.lang.ref.Reference support | |
104 void acquire_pending_list_lock(); | |
105 void release_and_notify_pending_list_lock(); | |
106 | |
101 public: | 107 public: |
102 VM_CGC_Operation(VoidClosure* cl, const char *printGCMsg) | 108 VM_CGC_Operation(VoidClosure* cl, const char *printGCMsg) |
103 : _cl(cl), _printGCMessage(printGCMsg) { } | 109 : _cl(cl), _printGCMessage(printGCMsg) { } |
104 virtual VMOp_Type type() const { return VMOp_CGC_Operation; } | 110 virtual VMOp_Type type() const { return VMOp_CGC_Operation; } |
105 virtual void doit(); | 111 virtual void doit(); |