mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8306733: Remove template parameter of G1DetermineCompactionQueueClosure::free_pinned_region
Reviewed-by: ayang, iwalulya
(cherry picked from commit a4a5385831)
This commit is contained in:
committed by
Vitaly Provodin
parent
d1d2638baa
commit
a88fc6f121
@@ -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);
|
||||
}
|
||||
@@ -91,7 +86,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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user