19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc/g1/g1FullGCScope.hpp"
27
28 G1FullGCScope::G1FullGCScope(G1MonitoringSupport* monitoring_support, bool explicit_gc, bool clear_soft) :
29 _rm(),
30 _explicit_gc(explicit_gc),
31 _g1h(G1CollectedHeap::heap()),
32 _gc_id(),
33 _svc_marker(SvcGCMarker::FULL),
34 _timer(),
35 _tracer(),
36 _active(),
37 _cpu_time(),
38 _soft_refs(clear_soft, _g1h->soft_ref_policy()),
39 _monitoring_scope(monitoring_support, true /* full_gc */, true /* all_memory_pools_affected */),
40 _heap_transition(_g1h) {
41 _timer.register_gc_start();
42 _tracer.report_gc_start(_g1h->gc_cause(), _timer.gc_start());
43 _g1h->pre_full_gc_dump(&_timer);
44 _g1h->trace_heap_before_gc(&_tracer);
45 }
46
47 G1FullGCScope::~G1FullGCScope() {
48 // We must call G1MonitoringSupport::update_sizes() in the same scoping level
49 // as an active TraceMemoryManagerStats object (i.e. before the destructor for the
50 // TraceMemoryManagerStats is called) so that the G1 memory pools are updated
51 // before any GC notifications are raised.
52 _g1h->g1mm()->update_sizes();
53 _g1h->trace_heap_after_gc(&_tracer);
54 _g1h->post_full_gc_dump(&_timer);
55 _timer.register_gc_end();
56 _tracer.report_gc_end(_timer.gc_end(), _timer.time_partitions());
57 }
58
59 bool G1FullGCScope::is_explicit_gc() {
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc/g1/g1FullGCScope.hpp"
27
28 G1FullGCScope::G1FullGCScope(G1MonitoringSupport* monitoring_support, bool explicit_gc, bool clear_soft) :
29 _rm(),
30 _explicit_gc(explicit_gc),
31 _g1h(G1CollectedHeap::heap()),
32 _gc_id(),
33 _svc_marker(SvcGCMarker::FULL),
34 _timer(),
35 _tracer(),
36 _active(),
37 _cpu_time(),
38 _soft_refs(clear_soft, _g1h->soft_ref_policy()),
39 _monitoring_scope(monitoring_support, true /* full_gc */, false /* mixed_gc */),
40 _heap_transition(_g1h) {
41 _timer.register_gc_start();
42 _tracer.report_gc_start(_g1h->gc_cause(), _timer.gc_start());
43 _g1h->pre_full_gc_dump(&_timer);
44 _g1h->trace_heap_before_gc(&_tracer);
45 }
46
47 G1FullGCScope::~G1FullGCScope() {
48 // We must call G1MonitoringSupport::update_sizes() in the same scoping level
49 // as an active TraceMemoryManagerStats object (i.e. before the destructor for the
50 // TraceMemoryManagerStats is called) so that the G1 memory pools are updated
51 // before any GC notifications are raised.
52 _g1h->g1mm()->update_sizes();
53 _g1h->trace_heap_after_gc(&_tracer);
54 _g1h->post_full_gc_dump(&_timer);
55 _timer.register_gc_end();
56 _tracer.report_gc_end(_timer.gc_end(), _timer.time_partitions());
57 }
58
59 bool G1FullGCScope::is_explicit_gc() {
|