diff options
author | tonyp <none@none> | 2010-12-19 20:57:16 -0500 |
---|---|---|
committer | tonyp <none@none> | 2010-12-19 20:57:16 -0500 |
commit | bb9df264e5e5f06542f4a331b19632924b80a840 (patch) | |
tree | 7fc5c640e406e8e7a837cada4eff917042615105 | |
parent | fa021cede7a8a49c225d24b82640ba15f45ab8cb (diff) |
6896624: G1: hotspot:::gc and hotspot:::mem-pool-gc probes are not fired
Summary: Fire the gc-begin and gc-end probes for G1.
Reviewed-by: kamg, ysr, jcoomes
-rw-r--r-- | src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 6 | ||||
-rw-r--r-- | src/share/vm/gc_implementation/shared/vmGCOperations.hpp | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index 02c9a1047..030aecade 100644 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -1192,6 +1192,7 @@ bool G1CollectedHeap::do_collection(bool explicit_gc, return false; } + DTraceGCProbeMarker gc_probe_marker(true /* full */); ResourceMark rm; if (PrintHeapAtGC) { @@ -3213,13 +3214,14 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) { return false; } + DTraceGCProbeMarker gc_probe_marker(false /* full */); + ResourceMark rm; + if (PrintHeapAtGC) { Universe::print_heap_before_gc(); } { - ResourceMark rm; - // This call will decide whether this pause is an initial-mark // pause. If it is, during_initial_mark_pause() will return true // for the duration of this pause. diff --git a/src/share/vm/gc_implementation/shared/vmGCOperations.hpp b/src/share/vm/gc_implementation/shared/vmGCOperations.hpp index 93611bdaf..c7ee95f44 100644 --- a/src/share/vm/gc_implementation/shared/vmGCOperations.hpp +++ b/src/share/vm/gc_implementation/shared/vmGCOperations.hpp @@ -209,4 +209,15 @@ class VM_GenCollectForPermanentAllocation: public VM_GC_Operation { HeapWord* result() const { return _res; } }; +class DTraceGCProbeMarker : public StackObj { +public: + DTraceGCProbeMarker(bool full) { + VM_GC_Operation::notify_gc_begin(full); + } + + ~DTraceGCProbeMarker() { + VM_GC_Operation::notify_gc_end(); + } +}; + #endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP |