< prev index next >

src/share/vm/oops/klass.cpp

Print this page




 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




 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       // JVMTI RedefineClasses creates previous versions that are not in
 460       // the class hierarchy, so process them here.
 461       while ((ik = ik->previous_versions()) != NULL) {
 462         ik->clean_weak_instanceklass_links(is_alive);
 463       }
 464     }
 465   }
 466 }
 467 
 468 void Klass::klass_update_barrier_set(oop v) {
 469   record_modified_oops();
 470 }
 471 
 472 // This barrier is used by G1 to remember the old oop values, so
 473 // that we don't forget any objects that were live at the snapshot at
 474 // the beginning. This function is only used when we write oops into Klasses.
 475 void Klass::klass_update_barrier_set_pre(oop* p, oop v) {
 476 #if INCLUDE_ALL_GCS
 477   if (UseG1GC) {
 478     oop obj = *p;
 479     if (obj != NULL) {
 480       G1SATBCardTableModRefBS::enqueue(obj);
 481     }
 482   }
 483 #endif


< prev index next >