--- a/hotspot/src/share/vm/runtime/sweeper.cpp Fri Sep 18 09:57:47 2009 -0700
+++ b/hotspot/src/share/vm/runtime/sweeper.cpp Wed Sep 23 23:56:15 2009 -0700
@@ -136,8 +136,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;
}
@@ -145,6 +151,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 {
@@ -157,7 +166,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 {