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

8302462: [REDO] 8297487: G1 Remark: no need to keep alive oop constants of nmethods on stack #12561

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/hotspot/share/gc/shared/barrierSet.cpp
Original file line number Diff line number Diff line change
@@ -57,11 +57,8 @@ static BarrierSetNMethod* select_barrier_set_nmethod(BarrierSetNMethod* barrier_
// The GC needs nmethod entry barriers to do concurrent GC
return barrier_set_nmethod;
} else {
// The GC needs nmethod entry barriers for code cache unloading.
// Concurrent GC needs them also for preserving the weakly referenced objects in
// the constant pool of nmethods as part of the SATB snapshot, and to deal with
// compiled frames contained in continuation stack chunks allocated after
// concurent mark start.
// The GC needs nmethod entry barriers to deal with continuations
// and code cache unloading
return new BarrierSetNMethod();
}
}
2 changes: 2 additions & 0 deletions src/hotspot/share/gc/shared/barrierSetNMethod.cpp
Original file line number Diff line number Diff line change
@@ -99,6 +99,8 @@ bool BarrierSetNMethod::nmethod_entry_barrier(nmethod* nm) {

// If the nmethod is the only thing pointing to the oops, and we are using a
// SATB GC, then it is important that this code marks them live.
// Also, with concurrent GC, it is possible that frames in continuation stack
// chunks are not visited if they are allocated after concurrent GC started.
OopKeepAliveClosure cl;
nm->oops_do(&cl);