comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 8504:86b4965f0c9a

-Cleanup code
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Wed, 20 Mar 2013 21:39:24 +0100
parents ff4fa8b0516e
children dee7c8b578c7
comparison
equal deleted inserted replaced
8503:58385e7565ff 8504:86b4965f0c9a
852 HeapWord* G1CollectedHeap::allocate_new_tlab(size_t word_size) { 852 HeapWord* G1CollectedHeap::allocate_new_tlab(size_t word_size) {
853 assert_heap_not_locked_and_not_at_safepoint(); 853 assert_heap_not_locked_and_not_at_safepoint();
854 assert(!isHumongous(word_size), "we do not allow humongous TLABs"); 854 assert(!isHumongous(word_size), "we do not allow humongous TLABs");
855 855
856 unsigned int dummy_gc_count_before; 856 unsigned int dummy_gc_count_before;
857 HeapWord* word=attempt_allocation(word_size, &dummy_gc_count_before); 857 return attempt_allocation(word_size, &dummy_gc_count_before);
858 tty->print_cr("Allocate new TLAB at 0x%16lx",(oop) word);
859 return word;
860 } 858 }
861 859
862 HeapWord* 860 HeapWord*
863 G1CollectedHeap::mem_allocate(size_t word_size, 861 G1CollectedHeap::mem_allocate(size_t word_size,
864 bool* gc_overhead_limit_was_exceeded) { 862 bool* gc_overhead_limit_was_exceeded) {
2398 } 2396 }
2399 } 2397 }
2400 } 2398 }
2401 #endif // !PRODUCT 2399 #endif // !PRODUCT
2402 2400
2403 #ifdef GRAAL
2404 HeapWord** G1CollectedHeap::top_addr() const {
2405 return _mutator_alloc_region.top_addr();
2406 }
2407
2408 HeapWord** G1CollectedHeap::end_addr() const {
2409 return _mutator_alloc_region.end_addr();
2410 }
2411
2412 #endif
2413
2414 void G1CollectedHeap::increment_old_marking_cycles_started() { 2401 void G1CollectedHeap::increment_old_marking_cycles_started() {
2415 assert(_old_marking_cycles_started == _old_marking_cycles_completed || 2402 assert(_old_marking_cycles_started == _old_marking_cycles_completed ||
2416 _old_marking_cycles_started == _old_marking_cycles_completed + 1, 2403 _old_marking_cycles_started == _old_marking_cycles_completed + 1,
2417 err_msg("Wrong marking cycle count (started: %d, completed: %d)", 2404 err_msg("Wrong marking cycle count (started: %d, completed: %d)",
2418 _old_marking_cycles_started, _old_marking_cycles_completed)); 2405 _old_marking_cycles_started, _old_marking_cycles_completed));
6437 6424
6438 void G1CollectedHeap::verify_region_sets() { 6425 void G1CollectedHeap::verify_region_sets() {
6439 assert_heap_locked_or_at_safepoint(true /* should_be_vm_thread */); 6426 assert_heap_locked_or_at_safepoint(true /* should_be_vm_thread */);
6440 6427
6441 // First, check the explicit lists. 6428 // First, check the explicit lists.
6442
6443 _free_list.verify(); 6429 _free_list.verify();
6444 { 6430 {
6445 // Given that a concurrent operation might be adding regions to 6431 // Given that a concurrent operation might be adding regions to
6446 // the secondary free list we have to take the lock before 6432 // the secondary free list we have to take the lock before
6447 // verifying it. 6433 // verifying it.