< prev index next >

src/share/vm/gc/g1/heapRegionRemSet.cpp

Print this page
rev 9505 : [mq]: 8144583-test-sanity-executeinternalvmtests-fails


1003          n_yielded() == _hrrs->occupied(),
1004          "Should have yielded all the cards in the rem set "
1005          "(in the non-par case).");
1006   return false;
1007 }
1008 
1009 void HeapRegionRemSet::reset_for_cleanup_tasks() {
1010   SparsePRT::reset_for_cleanup_tasks();
1011 }
1012 
1013 void HeapRegionRemSet::do_cleanup_work(HRRSCleanupTask* hrrs_cleanup_task) {
1014   _other_regions.do_cleanup_work(hrrs_cleanup_task);
1015 }
1016 
1017 void
1018 HeapRegionRemSet::finish_cleanup_task(HRRSCleanupTask* hrrs_cleanup_task) {
1019   SparsePRT::finish_cleanup_task(hrrs_cleanup_task);
1020 }
1021 
1022 #ifndef PRODUCT
1023 void PerRegionTable::test_fl_mem_size() {
1024   PerRegionTable* dummy = alloc(NULL);
1025 
1026   size_t min_prt_size = sizeof(void*) + dummy->bm()->size_in_words() * HeapWordSize;
1027   assert(dummy->mem_size() > min_prt_size,
1028          "PerRegionTable memory usage is suspiciously small, only has " SIZE_FORMAT " bytes. "
1029          "Should be at least " SIZE_FORMAT " bytes.", dummy->mem_size(), min_prt_size);
1030   free(dummy);
1031   guarantee(dummy->mem_size() == fl_mem_size(), "fl_mem_size() does not return the correct element size");
1032   // try to reset the state
1033   _free_list = NULL;
1034   delete dummy;
1035 }
1036 
1037 void HeapRegionRemSet::test_prt() {
1038   PerRegionTable::test_fl_mem_size();
1039 }
1040 
1041 void HeapRegionRemSet::test() {
1042   os::sleep(Thread::current(), (jlong)5000, false);
1043   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1044 
1045   // Run with "-XX:G1LogRSetRegionEntries=2", so that 1 and 5 end up in same
1046   // hash bucket.
1047   HeapRegion* hr0 = g1h->region_at(0);
1048   HeapRegion* hr1 = g1h->region_at(1);
1049   HeapRegion* hr2 = g1h->region_at(5);
1050   HeapRegion* hr3 = g1h->region_at(6);
1051   HeapRegion* hr4 = g1h->region_at(7);
1052   HeapRegion* hr5 = g1h->region_at(8);
1053 
1054   HeapWord* hr1_start = hr1->bottom();
1055   HeapWord* hr1_mid = hr1_start + HeapRegion::GrainWords/2;
1056   HeapWord* hr1_last = hr1->end() - 1;
1057 
1058   HeapWord* hr2_start = hr2->bottom();
1059   HeapWord* hr2_mid = hr2_start + HeapRegion::GrainWords/2;
1060   HeapWord* hr2_last = hr2->end() - 1;




1003          n_yielded() == _hrrs->occupied(),
1004          "Should have yielded all the cards in the rem set "
1005          "(in the non-par case).");
1006   return false;
1007 }
1008 
1009 void HeapRegionRemSet::reset_for_cleanup_tasks() {
1010   SparsePRT::reset_for_cleanup_tasks();
1011 }
1012 
1013 void HeapRegionRemSet::do_cleanup_work(HRRSCleanupTask* hrrs_cleanup_task) {
1014   _other_regions.do_cleanup_work(hrrs_cleanup_task);
1015 }
1016 
1017 void
1018 HeapRegionRemSet::finish_cleanup_task(HRRSCleanupTask* hrrs_cleanup_task) {
1019   SparsePRT::finish_cleanup_task(hrrs_cleanup_task);
1020 }
1021 
1022 #ifndef PRODUCT


















1023 void HeapRegionRemSet::test() {
1024   os::sleep(Thread::current(), (jlong)5000, false);
1025   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1026 
1027   // Run with "-XX:G1LogRSetRegionEntries=2", so that 1 and 5 end up in same
1028   // hash bucket.
1029   HeapRegion* hr0 = g1h->region_at(0);
1030   HeapRegion* hr1 = g1h->region_at(1);
1031   HeapRegion* hr2 = g1h->region_at(5);
1032   HeapRegion* hr3 = g1h->region_at(6);
1033   HeapRegion* hr4 = g1h->region_at(7);
1034   HeapRegion* hr5 = g1h->region_at(8);
1035 
1036   HeapWord* hr1_start = hr1->bottom();
1037   HeapWord* hr1_mid = hr1_start + HeapRegion::GrainWords/2;
1038   HeapWord* hr1_last = hr1->end() - 1;
1039 
1040   HeapWord* hr2_start = hr2->bottom();
1041   HeapWord* hr2_mid = hr2_start + HeapRegion::GrainWords/2;
1042   HeapWord* hr2_last = hr2->end() - 1;


< prev index next >