hotspot/src/share/vm/runtime/sweeper.cpp
changeset 3696 9e5d9b5e1049
parent 1 489c9b5090e2
child 3912 3aaaaad1ccb0
child 3795 6227ff014cfe
--- a/hotspot/src/share/vm/runtime/sweeper.cpp	Mon Aug 31 05:27:29 2009 -0700
+++ b/hotspot/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 {