Skip to content

Commit d427c79

Browse files
author
Hamlin Li
committed
8277428: G1: Move and inline G1STWIsAliveClosure::do_object_b
Reviewed-by: tschatzl, sjohanss
1 parent 32839ba commit d427c79

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@
4141
#include "runtime/atomic.hpp"
4242
#include "utilities/bitMap.inline.hpp"
4343

44+
inline bool G1STWIsAliveClosure::do_object_b(oop p) {
45+
// An object is reachable if it is outside the collection set,
46+
// or is inside and copied.
47+
return !_g1h->is_in_cset(p) || p->is_forwarded();
48+
}
49+
4450
G1GCPhaseTimes* G1CollectedHeap::phase_times() const {
4551
return _policy->phase_times();
4652
}

src/hotspot/share/gc/g1/g1YoungCollector.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "compiler/oopMap.hpp"
3030
#include "gc/g1/g1Allocator.hpp"
3131
#include "gc/g1/g1CardSetMemory.hpp"
32-
#include "gc/g1/g1CollectedHeap.hpp"
32+
#include "gc/g1/g1CollectedHeap.inline.hpp"
3333
#include "gc/g1/g1CollectorState.hpp"
3434
#include "gc/g1/g1ConcurrentMark.hpp"
3535
#include "gc/g1/g1GCPhaseTimes.hpp"
@@ -987,12 +987,6 @@ void G1YoungCollector::process_discovered_references(G1ParScanThreadStateSet* pe
987987
phase_times()->record_ref_proc_time((Ticks::now() - start).seconds() * MILLIUNITS);
988988
}
989989

990-
bool G1STWIsAliveClosure::do_object_b(oop p) {
991-
// An object is reachable if it is outside the collection set,
992-
// or is inside and copied.
993-
return !_g1h->is_in_cset(p) || p->is_forwarded();
994-
}
995-
996990
void G1YoungCollector::post_evacuate_cleanup_1(G1ParScanThreadStateSet* per_thread_states) {
997991
Ticks start = Ticks::now();
998992
{

0 commit comments

Comments
 (0)