comparison src/share/vm/gc_implementation/shared/vmGCOperations.hpp @ 2125:7246a374a9f2

6458402: 3 jvmti tests fail with CMS and +ExplicitGCInvokesConcurrent Summary: Make JvmtiGCMark safe to run non-safepoint and instrument CMS Reviewed-by: ysr, dcubed
author kamg
date Mon, 10 Jan 2011 17:14:53 -0500
parents 7c5250dbd584
children c798c277ddd1
comparison
equal deleted inserted replaced
2124:e31d8c656c5b 2125:7246a374a9f2
28 #include "memory/heapInspection.hpp" 28 #include "memory/heapInspection.hpp"
29 #include "runtime/handles.hpp" 29 #include "runtime/handles.hpp"
30 #include "runtime/jniHandles.hpp" 30 #include "runtime/jniHandles.hpp"
31 #include "runtime/synchronizer.hpp" 31 #include "runtime/synchronizer.hpp"
32 #include "runtime/vm_operations.hpp" 32 #include "runtime/vm_operations.hpp"
33 #include "prims/jvmtiExport.hpp"
33 34
34 // The following class hierarchy represents 35 // The following class hierarchy represents
35 // a set of operations (VM_Operation) related to GC. 36 // a set of operations (VM_Operation) related to GC.
36 // 37 //
37 // VM_Operation 38 // VM_Operation
207 virtual VMOp_Type type() const { return VMOp_GenCollectForPermanentAllocation; } 208 virtual VMOp_Type type() const { return VMOp_GenCollectForPermanentAllocation; }
208 virtual void doit(); 209 virtual void doit();
209 HeapWord* result() const { return _res; } 210 HeapWord* result() const { return _res; }
210 }; 211 };
211 212
212 class DTraceGCProbeMarker : public StackObj { 213 class SvcGCMarker : public StackObj {
213 public: 214 private:
214 DTraceGCProbeMarker(bool full) { 215 JvmtiGCMarker _jgcm;
215 VM_GC_Operation::notify_gc_begin(full); 216 public:
216 } 217 typedef enum { MINOR, FULL, OTHER } reason_type;
217 218
218 ~DTraceGCProbeMarker() { 219 SvcGCMarker(reason_type reason ) {
220 VM_GC_Operation::notify_gc_begin(reason == FULL);
221 }
222
223 ~SvcGCMarker() {
219 VM_GC_Operation::notify_gc_end(); 224 VM_GC_Operation::notify_gc_end();
220 } 225 }
221 }; 226 };
222 227
223 #endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP 228 #endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP