src/share/vm/runtime/sweeper.cpp

changeset 8075
be740540f60c
parent 8073
682119c4c32e
child 8604
04d83ba48607
child 8713
8dfbb002197a
equal deleted inserted replaced
8074:c1950f51ed60 8075:be740540f60c
536 SWEEP(nm); 536 SWEEP(nm);
537 } 537 }
538 } else if (nm->is_not_entrant()) { 538 } else if (nm->is_not_entrant()) {
539 // If there are no current activations of this method on the 539 // If there are no current activations of this method on the
540 // stack we can safely convert it to a zombie method 540 // stack we can safely convert it to a zombie method
541 if (nm->can_not_entrant_be_converted()) { 541 if (nm->can_convert_to_zombie()) {
542 if (PrintMethodFlushing && Verbose) { 542 if (PrintMethodFlushing && Verbose) {
543 tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (not entrant) being made zombie", nm->compile_id(), nm); 543 tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (not entrant) being made zombie", nm->compile_id(), nm);
544 } 544 }
545 // Clear ICStubs to prevent back patching stubs of zombie or unloaded 545 // Clear ICStubs to prevent back patching stubs of zombie or unloaded
546 // nmethods during the next safepoint (see ICStub::finalize). 546 // nmethods during the next safepoint (see ICStub::finalize).
569 _total_nof_c2_methods_reclaimed++; 569 _total_nof_c2_methods_reclaimed++;
570 } 570 }
571 release_nmethod(nm); 571 release_nmethod(nm);
572 _flushed_count++; 572 _flushed_count++;
573 } else { 573 } else {
574 {
575 // Clean ICs of unloaded nmethods as well because they may reference other
576 // unloaded nmethods that may be flushed earlier in the sweeper cycle.
577 MutexLocker cl(CompiledIC_lock);
578 nm->cleanup_inline_caches();
579 }
574 // Code cache state change is tracked in make_zombie() 580 // Code cache state change is tracked in make_zombie()
575 nm->make_zombie(); 581 nm->make_zombie();
576 _zombified_count++; 582 _zombified_count++;
577 SWEEP(nm); 583 SWEEP(nm);
578 } 584 }

mercurial