< prev index next >

src/share/vm/memory/universe.cpp

Print this page




 524 }
 525 
 526 
 527 // initialize_vtable could cause gc if
 528 // 1) we specified true to initialize_vtable and
 529 // 2) this ran after gc was enabled
 530 // In case those ever change we use handles for oops
 531 void Universe::reinitialize_vtable_of(Klass* ko, TRAPS) {
 532   // init vtable of k and all subclasses
 533   ko->vtable().initialize_vtable(false, CHECK);
 534   if (ko->is_instance_klass()) {
 535     for (Klass* sk = ko->subklass();
 536          sk != NULL;
 537          sk = sk->next_sibling()) {
 538       reinitialize_vtable_of(sk, CHECK);
 539     }
 540   }
 541 }
 542 
 543 
 544 void initialize_itable_for_klass(Klass* k, TRAPS) {
 545   InstanceKlass::cast(k)->itable().initialize_itable(false, CHECK);
 546 }
 547 
 548 
 549 void Universe::reinitialize_itables(TRAPS) {
 550   SystemDictionary::classes_do(initialize_itable_for_klass, CHECK);
 551 
 552 }
 553 
 554 
 555 bool Universe::on_page_boundary(void* addr) {
 556   return is_aligned(addr, os::vm_page_size());
 557 }
 558 
 559 
 560 bool Universe::should_fill_in_stack_trace(Handle throwable) {
 561   // never attempt to fill in the stack trace of preallocated errors that do not have
 562   // backtrace. These errors are kept alive forever and may be "re-used" when all
 563   // preallocated errors with backtrace have been consumed. Also need to avoid
 564   // a potential loop which could happen if an out of memory occurs when attempting
 565   // to allocate the backtrace.
 566   return ((throwable() != Universe::_out_of_memory_error_java_heap) &&
 567           (throwable() != Universe::_out_of_memory_error_metaspace)  &&
 568           (throwable() != Universe::_out_of_memory_error_class_metaspace)  &&
 569           (throwable() != Universe::_out_of_memory_error_array_size) &&
 570           (throwable() != Universe::_out_of_memory_error_gc_overhead_limit) &&
 571           (throwable() != Universe::_out_of_memory_error_realloc_objects));




 524 }
 525 
 526 
 527 // initialize_vtable could cause gc if
 528 // 1) we specified true to initialize_vtable and
 529 // 2) this ran after gc was enabled
 530 // In case those ever change we use handles for oops
 531 void Universe::reinitialize_vtable_of(Klass* ko, TRAPS) {
 532   // init vtable of k and all subclasses
 533   ko->vtable().initialize_vtable(false, CHECK);
 534   if (ko->is_instance_klass()) {
 535     for (Klass* sk = ko->subklass();
 536          sk != NULL;
 537          sk = sk->next_sibling()) {
 538       reinitialize_vtable_of(sk, CHECK);
 539     }
 540   }
 541 }
 542 
 543 
 544 void initialize_itable_for_klass(InstanceKlass* k, TRAPS) {
 545   k->itable().initialize_itable(false, CHECK);
 546 }
 547 
 548 
 549 void Universe::reinitialize_itables(TRAPS) {
 550   ClassLoaderDataGraph::dictionary_classes_do(initialize_itable_for_klass, CHECK);

 551 }
 552 
 553 
 554 bool Universe::on_page_boundary(void* addr) {
 555   return is_aligned(addr, os::vm_page_size());
 556 }
 557 
 558 
 559 bool Universe::should_fill_in_stack_trace(Handle throwable) {
 560   // never attempt to fill in the stack trace of preallocated errors that do not have
 561   // backtrace. These errors are kept alive forever and may be "re-used" when all
 562   // preallocated errors with backtrace have been consumed. Also need to avoid
 563   // a potential loop which could happen if an out of memory occurs when attempting
 564   // to allocate the backtrace.
 565   return ((throwable() != Universe::_out_of_memory_error_java_heap) &&
 566           (throwable() != Universe::_out_of_memory_error_metaspace)  &&
 567           (throwable() != Universe::_out_of_memory_error_class_metaspace)  &&
 568           (throwable() != Universe::_out_of_memory_error_array_size) &&
 569           (throwable() != Universe::_out_of_memory_error_gc_overhead_limit) &&
 570           (throwable() != Universe::_out_of_memory_error_realloc_objects));


< prev index next >