src/hotspot/share/code/compiledMethod.cpp
changeset 50995 3c59afe1afc9
parent 50416 ef980b9ac191
child 51333 f6641fcf7b7e
equal deleted inserted replaced
50994:09776f847bf4 50995:3c59afe1afc9
   323 }
   323 }
   324 
   324 
   325 // Clear ICStubs of all compiled ICs
   325 // Clear ICStubs of all compiled ICs
   326 void CompiledMethod::clear_ic_stubs() {
   326 void CompiledMethod::clear_ic_stubs() {
   327   assert_locked_or_safepoint(CompiledIC_lock);
   327   assert_locked_or_safepoint(CompiledIC_lock);
       
   328   ResourceMark rm;
   328   RelocIterator iter(this);
   329   RelocIterator iter(this);
   329   while(iter.next()) {
   330   while(iter.next()) {
   330     if (iter.type() == relocInfo::virtual_call_type) {
   331     if (iter.type() == relocInfo::virtual_call_type) {
   331       CompiledIC* ic = CompiledIC_at(&iter);
   332       CompiledIC* ic = CompiledIC_at(&iter);
   332       ic->clear_ic_stub();
   333       ic->clear_ic_stub();
   545 // Called to clean up after class unloading for live nmethods and from the sweeper
   546 // Called to clean up after class unloading for live nmethods and from the sweeper
   546 // for all methods.
   547 // for all methods.
   547 bool CompiledMethod::cleanup_inline_caches_impl(bool parallel, bool unloading_occurred, bool clean_all) {
   548 bool CompiledMethod::cleanup_inline_caches_impl(bool parallel, bool unloading_occurred, bool clean_all) {
   548   assert_locked_or_safepoint(CompiledIC_lock);
   549   assert_locked_or_safepoint(CompiledIC_lock);
   549   bool postponed = false;
   550   bool postponed = false;
       
   551   ResourceMark rm;
   550 
   552 
   551   // Find all calls in an nmethod and clear the ones that point to non-entrant,
   553   // Find all calls in an nmethod and clear the ones that point to non-entrant,
   552   // zombie and unloaded nmethods.
   554   // zombie and unloaded nmethods.
   553   RelocIterator iter(this, oops_reloc_begin());
   555   RelocIterator iter(this, oops_reloc_begin());
   554   while(iter.next()) {
   556   while(iter.next()) {