view src/hotspot/share/gc/g1/g1FullGCScope.cpp @ 49273:216c2aabbf1f

8196602: Change HeapRegionClosure to comply to naming conventions Reviewed-by: kbarrett, sjohanss
author tschatzl
date Fri, 09 Feb 2018 11:51:40 +0100
parents 5caa1d5f74c1
children 8f004146e407
line wrap: on
line source
 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit if you need additional information or have any
 * questions.

#include "precompiled.hpp"
#include "gc/g1/g1FullGCScope.hpp"

G1FullGCScope::G1FullGCScope(GCMemoryManager* memory_manager, bool explicit_gc, bool clear_soft) :
    _soft_refs(clear_soft, _g1h->collector_policy()),
    _memory_stats(memory_manager, _g1h->gc_cause()),
    _heap_transition(_g1h) {
  _tracer.report_gc_start(_g1h->gc_cause(), _timer.gc_start());

G1FullGCScope::~G1FullGCScope() {
  // We must call G1MonitoringSupport::update_sizes() in the same scoping level
  // as an active TraceMemoryManagerStats object (i.e. before the destructor for the
  // TraceMemoryManagerStats is called) so that the G1 memory pools are updated
  // before any GC notifications are raised.
  _tracer.report_gc_end(_timer.gc_end(), _timer.time_partitions());

bool G1FullGCScope::is_explicit_gc() {
  return _explicit_gc;

bool G1FullGCScope::should_clear_soft_refs() {
  return _soft_refs.should_clear();

STWGCTimer* G1FullGCScope::timer() {
  return &_timer;

G1FullGCTracer* G1FullGCScope::tracer() {
  return &_tracer;

G1HeapTransition* G1FullGCScope::heap_transition() {
  return &_heap_transition;