Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 1545:cc387008223e
6921317: (partial) G1: assert(top() == bottom() || zfs == Allocated,"Region must be empty, or we must be setting it to
Summary: Extended the failing assertion with the new message format to get more data.
Reviewed-by: tonyp
author | apetrusenko |
---|---|
date | Fri, 14 May 2010 10:28:46 -0700 |
parents | cff162798819 |
children | fb1a39993f69 |
comparison
equal
deleted
inserted
replaced
1523:8bfe9058ca46 | 1545:cc387008223e |
---|---|
469 (!res->isHumongous() && | 469 (!res->isHumongous() && |
470 (!zero_filled || | 470 (!zero_filled || |
471 res->zero_fill_state() == HeapRegion::Allocated)), | 471 res->zero_fill_state() == HeapRegion::Allocated)), |
472 "Alloc Regions must be zero filled (and non-H)"); | 472 "Alloc Regions must be zero filled (and non-H)"); |
473 } | 473 } |
474 if (res != NULL && res->is_empty()) _free_regions--; | 474 if (res != NULL) { |
475 assert(res == NULL || | 475 if (res->is_empty()) { |
476 (!res->isHumongous() && | 476 _free_regions--; |
477 (!zero_filled || | 477 } |
478 res->zero_fill_state() == HeapRegion::Allocated)), | 478 assert(!res->isHumongous() && |
479 "Non-young alloc Regions must be zero filled (and non-H)"); | 479 (!zero_filled || res->zero_fill_state() == HeapRegion::Allocated), |
480 | 480 err_msg("Non-young alloc Regions must be zero filled (and non-H):" |
481 if (G1PrintHeapRegions) { | 481 " res->isHumongous()=%d, zero_filled=%d, res->zero_fill_state()=%d", |
482 if (res != NULL) { | 482 res->isHumongous(), zero_filled, res->zero_fill_state())); |
483 assert(!res->is_on_unclean_list(), | |
484 "Alloc Regions must not be on the unclean list"); | |
485 if (G1PrintHeapRegions) { | |
483 gclog_or_tty->print_cr("new alloc region %d:["PTR_FORMAT", "PTR_FORMAT"], " | 486 gclog_or_tty->print_cr("new alloc region %d:["PTR_FORMAT", "PTR_FORMAT"], " |
484 "top "PTR_FORMAT, | 487 "top "PTR_FORMAT, |
485 res->hrs_index(), res->bottom(), res->end(), res->top()); | 488 res->hrs_index(), res->bottom(), res->end(), res->top()); |
486 } | 489 } |
487 } | 490 } |
488 | |
489 return res; | 491 return res; |
490 } | 492 } |
491 | 493 |
492 HeapRegion* G1CollectedHeap::newAllocRegionWithExpansion(int purpose, | 494 HeapRegion* G1CollectedHeap::newAllocRegionWithExpansion(int purpose, |
493 size_t word_size, | 495 size_t word_size, |
4598 } | 4600 } |
4599 | 4601 |
4600 void | 4602 void |
4601 G1CollectedHeap::put_region_on_unclean_list_locked(HeapRegion* r) { | 4603 G1CollectedHeap::put_region_on_unclean_list_locked(HeapRegion* r) { |
4602 assert(ZF_mon->owned_by_self(), "precondition."); | 4604 assert(ZF_mon->owned_by_self(), "precondition."); |
4605 #ifdef ASSERT | |
4606 if (r->is_gc_alloc_region()) { | |
4607 ResourceMark rm; | |
4608 stringStream region_str; | |
4609 print_on(®ion_str); | |
4610 assert(!r->is_gc_alloc_region(), err_msg("Unexpected GC allocation region: %s", | |
4611 region_str.as_string())); | |
4612 } | |
4613 #endif | |
4603 _unclean_region_list.insert_before_head(r); | 4614 _unclean_region_list.insert_before_head(r); |
4604 } | 4615 } |
4605 | 4616 |
4606 void | 4617 void |
4607 G1CollectedHeap::prepend_region_list_on_unclean_list(UncleanRegionList* list) { | 4618 G1CollectedHeap::prepend_region_list_on_unclean_list(UncleanRegionList* list) { |