8306733: Remove template parameter of G1DetermineCompactionQueueClosure::free_pinned_region
Reviewed-by: ayang, iwalulya
This commit is contained in:
parent
a98f58756d
commit
a4a5385831
@ -42,8 +42,7 @@ class G1DetermineCompactionQueueClosure : public HeapRegionClosure {
|
||||
G1FullCollector* _collector;
|
||||
uint _cur_worker;
|
||||
|
||||
template<bool is_humongous>
|
||||
inline void free_pinned_region(HeapRegion* hr);
|
||||
inline void free_empty_humongous_region(HeapRegion* hr);
|
||||
|
||||
inline bool should_compact(HeapRegion* hr) const;
|
||||
|
||||
|
@ -33,13 +33,8 @@
|
||||
#include "gc/g1/g1FullGCScope.hpp"
|
||||
#include "gc/g1/heapRegion.inline.hpp"
|
||||
|
||||
template<bool is_humongous>
|
||||
void G1DetermineCompactionQueueClosure::free_pinned_region(HeapRegion* hr) {
|
||||
if (is_humongous) {
|
||||
_g1h->free_humongous_region(hr, nullptr);
|
||||
} else {
|
||||
_g1h->free_region(hr, nullptr);
|
||||
}
|
||||
void G1DetermineCompactionQueueClosure::free_empty_humongous_region(HeapRegion* hr) {
|
||||
_g1h->free_humongous_region(hr, nullptr);
|
||||
_collector->set_free(hr->hrm_index());
|
||||
add_to_compaction_queue(hr);
|
||||
}
|
||||
@ -88,7 +83,7 @@ inline bool G1DetermineCompactionQueueClosure::do_heap_region(HeapRegion* hr) {
|
||||
oop obj = cast_to_oop(hr->humongous_start_region()->bottom());
|
||||
bool is_empty = !_collector->mark_bitmap()->is_marked(obj);
|
||||
if (is_empty) {
|
||||
free_pinned_region<true>(hr);
|
||||
free_empty_humongous_region(hr);
|
||||
} else {
|
||||
_collector->set_has_humongous();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user