< prev index next >
src/hotspot/share/gc/g1/g1Allocator.cpp
Print this page
rev 53385 : [mq]: 8217374-rename-g1evacuationinfo
*** 1,7 ****
/*
! * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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.
--- 1,7 ----
/*
! * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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.
*** 24,33 ****
--- 24,34 ----
#include "precompiled.hpp"
#include "gc/g1/g1Allocator.inline.hpp"
#include "gc/g1/g1AllocRegion.inline.hpp"
#include "gc/g1/g1EvacStats.inline.hpp"
+ #include "gc/g1/g1EvacuationInfo.hpp"
#include "gc/g1/g1CollectedHeap.inline.hpp"
#include "gc/g1/g1Policy.hpp"
#include "gc/g1/heapRegion.inline.hpp"
#include "gc/g1/heapRegionSet.inline.hpp"
#include "gc/g1/heapRegionType.hpp"
*** 55,65 ****
bool G1Allocator::is_retained_old_region(HeapRegion* hr) {
return _retained_old_gc_alloc_region == hr;
}
! void G1Allocator::reuse_retained_old_region(EvacuationInfo& evacuation_info,
OldGCAllocRegion* old,
HeapRegion** retained_old) {
HeapRegion* retained_region = *retained_old;
*retained_old = NULL;
assert(retained_region == NULL || !retained_region->is_archive(),
--- 56,66 ----
bool G1Allocator::is_retained_old_region(HeapRegion* hr) {
return _retained_old_gc_alloc_region == hr;
}
! void G1Allocator::reuse_retained_old_region(G1EvacuationInfo& evacuation_info,
OldGCAllocRegion* old,
HeapRegion** retained_old) {
HeapRegion* retained_region = *retained_old;
*retained_old = NULL;
assert(retained_region == NULL || !retained_region->is_archive(),
*** 88,98 ****
_g1h->hr_printer()->reuse(retained_region);
evacuation_info.set_alloc_regions_used_before(retained_region->used());
}
}
! void G1Allocator::init_gc_alloc_regions(EvacuationInfo& evacuation_info) {
assert_at_safepoint_on_vm_thread();
_survivor_is_full = false;
_old_is_full = false;
--- 89,99 ----
_g1h->hr_printer()->reuse(retained_region);
evacuation_info.set_alloc_regions_used_before(retained_region->used());
}
}
! void G1Allocator::init_gc_alloc_regions(G1EvacuationInfo& evacuation_info) {
assert_at_safepoint_on_vm_thread();
_survivor_is_full = false;
_old_is_full = false;
*** 101,111 ****
reuse_retained_old_region(evacuation_info,
&_old_gc_alloc_region,
&_retained_old_gc_alloc_region);
}
! void G1Allocator::release_gc_alloc_regions(EvacuationInfo& evacuation_info) {
evacuation_info.set_allocation_regions(survivor_gc_alloc_region()->count() +
old_gc_alloc_region()->count());
survivor_gc_alloc_region()->release();
// If we have an old GC alloc region to release, we'll save it in
// _retained_old_gc_alloc_region. If we don't
--- 102,112 ----
reuse_retained_old_region(evacuation_info,
&_old_gc_alloc_region,
&_retained_old_gc_alloc_region);
}
! void G1Allocator::release_gc_alloc_regions(G1EvacuationInfo& evacuation_info) {
evacuation_info.set_allocation_regions(survivor_gc_alloc_region()->count() +
old_gc_alloc_region()->count());
survivor_gc_alloc_region()->release();
// If we have an old GC alloc region to release, we'll save it in
// _retained_old_gc_alloc_region. If we don't
< prev index next >