Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8277428: G1: Move and inline G1STWIsAliveClosure::do_object_b #6470

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp
Expand Up @@ -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();
}
Expand Down
8 changes: 1 addition & 7 deletions src/hotspot/share/gc/g1/g1YoungCollector.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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();
{
Expand Down