8277428: G1: Move and inline G1STWIsAliveClosure::do_object_b

Reviewed-by: tschatzl, sjohanss
This commit is contained in:
Hamlin Li 2021-11-22 11:27:05 +00:00
parent 32839ba012
commit d427c79d3b
2 changed files with 7 additions and 7 deletions

View File

@ -41,6 +41,12 @@
#include "runtime/atomic.hpp"
#include "utilities/bitMap.inline.hpp"
inline bool G1STWIsAliveClosure::do_object_b(oop p) {
// An object is reachable if it is outside the collection set,
// or is inside and copied.
return !_g1h->is_in_cset(p) || p->is_forwarded();
}
G1GCPhaseTimes* G1CollectedHeap::phase_times() const {
return _policy->phase_times();
}

View File

@ -29,7 +29,7 @@
#include "compiler/oopMap.hpp"
#include "gc/g1/g1Allocator.hpp"
#include "gc/g1/g1CardSetMemory.hpp"
#include "gc/g1/g1CollectedHeap.hpp"
#include "gc/g1/g1CollectedHeap.inline.hpp"
#include "gc/g1/g1CollectorState.hpp"
#include "gc/g1/g1ConcurrentMark.hpp"
#include "gc/g1/g1GCPhaseTimes.hpp"
@ -987,12 +987,6 @@ void G1YoungCollector::process_discovered_references(G1ParScanThreadStateSet* pe
phase_times()->record_ref_proc_time((Ticks::now() - start).seconds() * MILLIUNITS);
}
bool G1STWIsAliveClosure::do_object_b(oop p) {
// An object is reachable if it is outside the collection set,
// or is inside and copied.
return !_g1h->is_in_cset(p) || p->is_forwarded();
}
void G1YoungCollector::post_evacuate_cleanup_1(G1ParScanThreadStateSet* per_thread_states) {
Ticks start = Ticks::now();
{