mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
6863023: need non-perm oops in code cache for JSR 292
Make a special root-list for those few nmethods which might contain non-perm oops. Reviewed-by: twisti, kvn, never, jmasa, ysr
This commit is contained in:
parent
1cf5b7ae11
commit
e261aecad8
74 changed files with 979 additions and 279 deletions
|
@ -34,6 +34,17 @@ jint NMethodSweeper::_locked_seen = 0;
|
|||
jint NMethodSweeper::_not_entrant_seen_on_stack = 0;
|
||||
bool NMethodSweeper::_rescan = false;
|
||||
|
||||
class MarkActivationClosure: public CodeBlobClosure {
|
||||
public:
|
||||
virtual void do_code_blob(CodeBlob* cb) {
|
||||
// If we see an activation belonging to a non_entrant nmethod, we mark it.
|
||||
if (cb->is_nmethod() && ((nmethod*)cb)->is_not_entrant()) {
|
||||
((nmethod*)cb)->mark_as_seen_on_stack();
|
||||
}
|
||||
}
|
||||
};
|
||||
static MarkActivationClosure mark_activation_closure;
|
||||
|
||||
void NMethodSweeper::sweep() {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "must be executed at a safepoint");
|
||||
if (!MethodFlushing) return;
|
||||
|
@ -57,7 +68,7 @@ void NMethodSweeper::sweep() {
|
|||
if (PrintMethodFlushing) {
|
||||
tty->print_cr("### Sweep: stack traversal %d", _traversals);
|
||||
}
|
||||
Threads::nmethods_do();
|
||||
Threads::nmethods_do(&mark_activation_closure);
|
||||
|
||||
// reset the flags since we started a scan from the beginning.
|
||||
_rescan = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue