8306733: Remove template parameter of G1DetermineCompactionQueueClosure::free_pinned_region

Reviewed-by: ayang, iwalulya
This commit is contained in:
Thomas Schatzl 2023-04-25 10:39:45 +00:00
parent a98f58756d
commit a4a5385831
2 changed files with 4 additions and 10 deletions

View File

@ -42,8 +42,7 @@ class G1DetermineCompactionQueueClosure : public HeapRegionClosure {
G1FullCollector* _collector; G1FullCollector* _collector;
uint _cur_worker; uint _cur_worker;
template<bool is_humongous> inline void free_empty_humongous_region(HeapRegion* hr);
inline void free_pinned_region(HeapRegion* hr);
inline bool should_compact(HeapRegion* hr) const; inline bool should_compact(HeapRegion* hr) const;

View File

@ -33,13 +33,8 @@
#include "gc/g1/g1FullGCScope.hpp" #include "gc/g1/g1FullGCScope.hpp"
#include "gc/g1/heapRegion.inline.hpp" #include "gc/g1/heapRegion.inline.hpp"
template<bool is_humongous> void G1DetermineCompactionQueueClosure::free_empty_humongous_region(HeapRegion* hr) {
void G1DetermineCompactionQueueClosure::free_pinned_region(HeapRegion* hr) { _g1h->free_humongous_region(hr, nullptr);
if (is_humongous) {
_g1h->free_humongous_region(hr, nullptr);
} else {
_g1h->free_region(hr, nullptr);
}
_collector->set_free(hr->hrm_index()); _collector->set_free(hr->hrm_index());
add_to_compaction_queue(hr); 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()); oop obj = cast_to_oop(hr->humongous_start_region()->bottom());
bool is_empty = !_collector->mark_bitmap()->is_marked(obj); bool is_empty = !_collector->mark_bitmap()->is_marked(obj);
if (is_empty) { if (is_empty) {
free_pinned_region<true>(hr); free_empty_humongous_region(hr);
} else { } else {
_collector->set_has_humongous(); _collector->set_has_humongous();
} }