src/share/vm/runtime/sweeper.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/sweeper.cpp

Print this page




 526       }
 527       release_nmethod(nm);
 528       _flushed_count++;
 529     } else {
 530       if (PrintMethodFlushing && Verbose) {
 531         tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (zombie) being marked for reclamation", nm->compile_id(), nm);
 532       }
 533       nm->mark_for_reclamation();
 534       // Keep track of code cache state change
 535       _bytes_changed += nm->total_size();
 536       _marked_for_reclamation_count++;
 537       SWEEP(nm);
 538     }
 539   } else if (nm->is_not_entrant()) {
 540     // If there are no current activations of this method on the
 541     // stack we can safely convert it to a zombie method
 542     if (nm->can_not_entrant_be_converted()) {
 543       if (PrintMethodFlushing && Verbose) {
 544         tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (not entrant) being made zombie", nm->compile_id(), nm);
 545       }


 546       // Clear ICStubs to prevent back patching stubs of zombie or unloaded
 547       // nmethods during the next safepoint (see ICStub::finalize).
 548       MutexLocker cl(CompiledIC_lock);
 549       nm->clear_ic_stubs();
 550       // Code cache state change is tracked in make_zombie()
 551       nm->make_zombie();
 552       _zombified_count++;
 553       SWEEP(nm);
 554     } else {
 555       // Still alive, clean up its inline caches
 556       MutexLocker cl(CompiledIC_lock);
 557       nm->cleanup_inline_caches();
 558       SWEEP(nm);
 559     }
 560   } else if (nm->is_unloaded()) {
 561     // Unloaded code, just make it a zombie
 562     if (PrintMethodFlushing && Verbose) {
 563       tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (unloaded) being made zombie", nm->compile_id(), nm);
 564     }
 565     if (nm->is_osr_method()) {
 566       SWEEP(nm);
 567       // No inline caches will ever point to osr methods, so we can just remove it
 568       freed_memory = nm->total_size();




 526       }
 527       release_nmethod(nm);
 528       _flushed_count++;
 529     } else {
 530       if (PrintMethodFlushing && Verbose) {
 531         tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (zombie) being marked for reclamation", nm->compile_id(), nm);
 532       }
 533       nm->mark_for_reclamation();
 534       // Keep track of code cache state change
 535       _bytes_changed += nm->total_size();
 536       _marked_for_reclamation_count++;
 537       SWEEP(nm);
 538     }
 539   } else if (nm->is_not_entrant()) {
 540     // If there are no current activations of this method on the
 541     // stack we can safely convert it to a zombie method
 542     if (nm->can_not_entrant_be_converted()) {
 543       if (PrintMethodFlushing && Verbose) {
 544         tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (not entrant) being made zombie", nm->compile_id(), nm);
 545       }
 546       // Do not check for a safepoint here
 547       MutexLockerEx cl(CompiledIC_lock, Mutex::_no_safepoint_check_flag);
 548       // Clear ICStubs to prevent back patching stubs of zombie or unloaded
 549       // nmethods during the next safepoint (see ICStub::finalize).

 550       nm->clear_ic_stubs();
 551       // Code cache state change is tracked in make_zombie()
 552       nm->make_zombie();
 553       _zombified_count++;
 554       SWEEP(nm);
 555     } else {
 556       // Still alive, clean up its inline caches
 557       MutexLocker cl(CompiledIC_lock);
 558       nm->cleanup_inline_caches();
 559       SWEEP(nm);
 560     }
 561   } else if (nm->is_unloaded()) {
 562     // Unloaded code, just make it a zombie
 563     if (PrintMethodFlushing && Verbose) {
 564       tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (unloaded) being made zombie", nm->compile_id(), nm);
 565     }
 566     if (nm->is_osr_method()) {
 567       SWEEP(nm);
 568       // No inline caches will ever point to osr methods, so we can just remove it
 569       freed_memory = nm->total_size();


src/share/vm/runtime/sweeper.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File