mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 12:34:32 +02:00
6896624: G1: hotspot:::gc and hotspot:::mem-pool-gc probes are not fired
Fire the gc-begin and gc-end probes for G1. Reviewed-by: kamg, ysr, jcoomes
This commit is contained in:
parent
41bf31bff4
commit
2aa9ac1177
2 changed files with 15 additions and 2 deletions
|
@ -1192,6 +1192,7 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DTraceGCProbeMarker gc_probe_marker(true /* full */);
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
|
|
||||||
if (PrintHeapAtGC) {
|
if (PrintHeapAtGC) {
|
||||||
|
@ -3213,13 +3214,14 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DTraceGCProbeMarker gc_probe_marker(false /* full */);
|
||||||
|
ResourceMark rm;
|
||||||
|
|
||||||
if (PrintHeapAtGC) {
|
if (PrintHeapAtGC) {
|
||||||
Universe::print_heap_before_gc();
|
Universe::print_heap_before_gc();
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
ResourceMark rm;
|
|
||||||
|
|
||||||
// This call will decide whether this pause is an initial-mark
|
// This call will decide whether this pause is an initial-mark
|
||||||
// pause. If it is, during_initial_mark_pause() will return true
|
// pause. If it is, during_initial_mark_pause() will return true
|
||||||
// for the duration of this pause.
|
// for the duration of this pause.
|
||||||
|
|
|
@ -209,4 +209,15 @@ class VM_GenCollectForPermanentAllocation: public VM_GC_Operation {
|
||||||
HeapWord* result() const { return _res; }
|
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
|
#endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue