25 #ifndef SHARE_VM_GC_SHARED_VMGCOPERATIONS_HPP |
25 #ifndef SHARE_VM_GC_SHARED_VMGCOPERATIONS_HPP |
26 #define SHARE_VM_GC_SHARED_VMGCOPERATIONS_HPP |
26 #define SHARE_VM_GC_SHARED_VMGCOPERATIONS_HPP |
27 |
27 |
28 #include "gc/shared/collectedHeap.hpp" |
28 #include "gc/shared/collectedHeap.hpp" |
29 #include "gc/shared/genCollectedHeap.hpp" |
29 #include "gc/shared/genCollectedHeap.hpp" |
30 #include "gc/shared/referencePendingListLocker.hpp" |
|
31 #include "memory/heapInspection.hpp" |
30 #include "memory/heapInspection.hpp" |
32 #include "prims/jvmtiExport.hpp" |
31 #include "prims/jvmtiExport.hpp" |
33 #include "runtime/handles.hpp" |
32 #include "runtime/handles.hpp" |
34 #include "runtime/jniHandles.hpp" |
33 #include "runtime/jniHandles.hpp" |
35 #include "runtime/synchronizer.hpp" |
34 #include "runtime/synchronizer.hpp" |
68 // - these operations preform full collection of heaps of |
67 // - these operations preform full collection of heaps of |
69 // different kind |
68 // different kind |
70 // |
69 // |
71 |
70 |
72 class VM_GC_Operation: public VM_Operation { |
71 class VM_GC_Operation: public VM_Operation { |
73 private: |
|
74 ReferencePendingListLocker _pending_list_locker; |
|
75 |
|
76 protected: |
72 protected: |
77 uint _gc_count_before; // gc count before acquiring PLL |
73 uint _gc_count_before; // gc count before acquiring PLL |
78 uint _full_gc_count_before; // full gc count before acquiring PLL |
74 uint _full_gc_count_before; // full gc count before acquiring PLL |
79 bool _full; // whether a "full" collection |
75 bool _full; // whether a "full" collection |
80 bool _prologue_succeeded; // whether doit_prologue succeeded |
76 bool _prologue_succeeded; // whether doit_prologue succeeded |
81 GCCause::Cause _gc_cause; // the putative cause for this gc op |
77 GCCause::Cause _gc_cause; // the putative cause for this gc op |
82 bool _gc_locked; // will be set if gc was locked |
78 bool _gc_locked; // will be set if gc was locked |
83 |
79 |
84 virtual bool skip_operation() const; |
80 virtual bool skip_operation() const; |
85 |
|
86 // java.lang.ref.Reference support |
|
87 void acquire_pending_list_lock(); |
|
88 void release_and_notify_pending_list_lock(); |
|
89 |
81 |
90 public: |
82 public: |
91 VM_GC_Operation(uint gc_count_before, |
83 VM_GC_Operation(uint gc_count_before, |
92 GCCause::Cause _cause, |
84 GCCause::Cause _cause, |
93 uint full_gc_count_before = 0, |
85 uint full_gc_count_before = 0, |