mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
4957990: Perm heap bloat in JVM
Treat ProfileData in MDO's as a source of weak, not strong, roots. Fixes the bug for stop-world collection -- the case of concurrent collection will be fixed separately. Reviewed-by: jcoomes, jmasa, kvn, never
This commit is contained in:
parent
2491751525
commit
c6763b5bad
27 changed files with 385 additions and 65 deletions
|
@ -125,8 +125,14 @@ void NMethodSweeper::process_nmethod(nmethod *nm) {
|
|||
// there are no inline caches that referes to it.
|
||||
if (nm->is_marked_for_reclamation()) {
|
||||
assert(!nm->is_locked_by_vm(), "must not flush locked nmethods");
|
||||
if (PrintMethodFlushing && Verbose) {
|
||||
tty->print_cr("### Nmethod 0x%x (marked for reclamation) being flushed", nm);
|
||||
}
|
||||
nm->flush();
|
||||
} else {
|
||||
if (PrintMethodFlushing && Verbose) {
|
||||
tty->print_cr("### Nmethod 0x%x (zombie) being marked for reclamation", nm);
|
||||
}
|
||||
nm->mark_for_reclamation();
|
||||
_rescan = true;
|
||||
}
|
||||
|
@ -134,6 +140,9 @@ void NMethodSweeper::process_nmethod(nmethod *nm) {
|
|||
// If there is no current activations of this method on the
|
||||
// stack we can safely convert it to a zombie method
|
||||
if (nm->can_not_entrant_be_converted()) {
|
||||
if (PrintMethodFlushing && Verbose) {
|
||||
tty->print_cr("### Nmethod 0x%x (not entrant) being made zombie", nm);
|
||||
}
|
||||
nm->make_zombie();
|
||||
_rescan = true;
|
||||
} else {
|
||||
|
@ -146,7 +155,9 @@ void NMethodSweeper::process_nmethod(nmethod *nm) {
|
|||
}
|
||||
} else if (nm->is_unloaded()) {
|
||||
// Unloaded code, just make it a zombie
|
||||
if (nm->is_osr_only_method()) {
|
||||
if (PrintMethodFlushing && Verbose)
|
||||
tty->print_cr("### Nmethod 0x%x (unloaded) being made zombie", nm);
|
||||
if (nm->is_osr_method()) {
|
||||
// No inline caches will ever point to osr methods, so we can just remove it
|
||||
nm->flush();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue