Mercurial > hg > graal-compiler
diff src/share/vm/runtime/sweeper.cpp @ 941:8b46c4d82093
4957990: Perm heap bloat in JVM
Summary: 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
author | ysr |
---|---|
date | Wed, 02 Sep 2009 00:04:29 -0700 |
parents | a61af66fc99e |
children | 89e0543e1737 54b3b351d6f9 |
line wrap: on
line diff
--- a/src/share/vm/runtime/sweeper.cpp Mon Aug 31 05:27:29 2009 -0700 +++ b/src/share/vm/runtime/sweeper.cpp Wed Sep 02 00:04:29 2009 -0700 @@ -125,8 +125,14 @@ // 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 @@ // 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 @@ } } 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 {