< prev index next >

src/share/vm/oops/klass.cpp

Print this page




 437       stack.push(sub);
 438     }
 439 
 440     // Find and set the first alive sibling
 441     Klass* sibling = current->next_sibling_oop();
 442     while (sibling != NULL && !sibling->is_loader_alive(is_alive)) {
 443       if (TraceClassUnloading && WizardMode) {
 444         ResourceMark rm;
 445         tty->print_cr("[Unlinking class (sibling) %s]", sibling->external_name());
 446       }
 447       sibling = sibling->next_sibling_oop();
 448     }
 449     current->set_next_sibling(sibling);
 450     if (sibling != NULL) {
 451       stack.push(sibling);
 452     }
 453 
 454     // Clean the implementors list and method data.
 455     if (clean_alive_klasses && current->oop_is_instance()) {
 456       InstanceKlass* ik = InstanceKlass::cast(current);
 457       ik->clean_implementors_list(is_alive);
 458       ik->clean_method_data(is_alive);
 459     }
 460   }
 461 }
 462 
 463 void Klass::klass_update_barrier_set(oop v) {
 464   record_modified_oops();
 465 }
 466 
 467 // This barrier is used by G1 to remember the old oop values, so
 468 // that we don't forget any objects that were live at the snapshot at
 469 // the beginning. This function is only used when we write oops into Klasses.
 470 void Klass::klass_update_barrier_set_pre(oop* p, oop v) {
 471 #if INCLUDE_ALL_GCS
 472   if (UseG1GC) {
 473     oop obj = *p;
 474     if (obj != NULL) {
 475       G1SATBCardTableModRefBS::enqueue(obj);
 476     }
 477   }
 478 #endif




 437       stack.push(sub);
 438     }
 439 
 440     // Find and set the first alive sibling
 441     Klass* sibling = current->next_sibling_oop();
 442     while (sibling != NULL && !sibling->is_loader_alive(is_alive)) {
 443       if (TraceClassUnloading && WizardMode) {
 444         ResourceMark rm;
 445         tty->print_cr("[Unlinking class (sibling) %s]", sibling->external_name());
 446       }
 447       sibling = sibling->next_sibling_oop();
 448     }
 449     current->set_next_sibling(sibling);
 450     if (sibling != NULL) {
 451       stack.push(sibling);
 452     }
 453 
 454     // Clean the implementors list and method data.
 455     if (clean_alive_klasses && current->oop_is_instance()) {
 456       InstanceKlass* ik = InstanceKlass::cast(current);
 457       ik->clean_weak_instanceklass_links(is_alive);

 458     }
 459   }
 460 }
 461 
 462 void Klass::klass_update_barrier_set(oop v) {
 463   record_modified_oops();
 464 }
 465 
 466 // This barrier is used by G1 to remember the old oop values, so
 467 // that we don't forget any objects that were live at the snapshot at
 468 // the beginning. This function is only used when we write oops into Klasses.
 469 void Klass::klass_update_barrier_set_pre(oop* p, oop v) {
 470 #if INCLUDE_ALL_GCS
 471   if (UseG1GC) {
 472     oop obj = *p;
 473     if (obj != NULL) {
 474       G1SATBCardTableModRefBS::enqueue(obj);
 475     }
 476   }
 477 #endif


< prev index next >