2371 } |
2371 } |
2372 #endif |
2372 #endif |
2373 |
2373 |
2374 void CompactibleFreeListSpace::printFLCensus(size_t sweep_count) const { |
2374 void CompactibleFreeListSpace::printFLCensus(size_t sweep_count) const { |
2375 assert_lock_strong(&_freelistLock); |
2375 assert_lock_strong(&_freelistLock); |
2376 Log(gc, freelist, census) log; |
2376 LogTarget(Debug, gc, freelist, census) log; |
2377 if (!log.is_debug()) { |
2377 if (!log.is_enabled()) { |
2378 return; |
2378 return; |
2379 } |
2379 } |
2380 AdaptiveFreeList<FreeChunk> total; |
2380 AdaptiveFreeList<FreeChunk> total; |
2381 log.debug("end sweep# " SIZE_FORMAT, sweep_count); |
2381 log.print("end sweep# " SIZE_FORMAT, sweep_count); |
2382 ResourceMark rm; |
2382 ResourceMark rm; |
2383 outputStream* out = log.debug_stream(); |
2383 outputStream* out = log.stream(); |
2384 AdaptiveFreeList<FreeChunk>::print_labels_on(out, "size"); |
2384 AdaptiveFreeList<FreeChunk>::print_labels_on(out, "size"); |
2385 size_t total_free = 0; |
2385 size_t total_free = 0; |
2386 for (size_t i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) { |
2386 for (size_t i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) { |
2387 const AdaptiveFreeList<FreeChunk> *fl = &_indexedFreeList[i]; |
2387 const AdaptiveFreeList<FreeChunk> *fl = &_indexedFreeList[i]; |
2388 total_free += fl->count() * fl->size(); |
2388 total_free += fl->count() * fl->size(); |
2400 total.set_coal_deaths( total.coal_deaths() + fl->coal_deaths() ); |
2400 total.set_coal_deaths( total.coal_deaths() + fl->coal_deaths() ); |
2401 total.set_split_births(total.split_births() + fl->split_births()); |
2401 total.set_split_births(total.split_births() + fl->split_births()); |
2402 total.set_split_deaths(total.split_deaths() + fl->split_deaths()); |
2402 total.set_split_deaths(total.split_deaths() + fl->split_deaths()); |
2403 } |
2403 } |
2404 total.print_on(out, "TOTAL"); |
2404 total.print_on(out, "TOTAL"); |
2405 log.debug("Total free in indexed lists " SIZE_FORMAT " words", total_free); |
2405 log.print("Total free in indexed lists " SIZE_FORMAT " words", total_free); |
2406 log.debug("growth: %8.5f deficit: %8.5f", |
2406 log.print("growth: %8.5f deficit: %8.5f", |
2407 (double)(total.split_births()+total.coal_births()-total.split_deaths()-total.coal_deaths())/ |
2407 (double)(total.split_births()+total.coal_births()-total.split_deaths()-total.coal_deaths())/ |
2408 (total.prev_sweep() != 0 ? (double)total.prev_sweep() : 1.0), |
2408 (total.prev_sweep() != 0 ? (double)total.prev_sweep() : 1.0), |
2409 (double)(total.desired() - total.count())/(total.desired() != 0 ? (double)total.desired() : 1.0)); |
2409 (double)(total.desired() - total.count())/(total.desired() != 0 ? (double)total.desired() : 1.0)); |
2410 _dictionary->print_dict_census(out); |
2410 _dictionary->print_dict_census(out); |
2411 } |
2411 } |