Fri, 13 Sep 2013 22:23:48 +0200
8024751: Fix bugs in TraceMetadata
Reviewed-by: jmasa, brutisso
src/share/vm/memory/metaspace.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/memory/metaspace.cpp Fri Sep 13 22:22:14 2013 +0200 1.2 +++ b/src/share/vm/memory/metaspace.cpp Fri Sep 13 22:23:48 2013 +0200 1.3 @@ -2366,10 +2366,10 @@ 1.4 grow_chunks_by_words, 1.5 medium_chunk_bunch()); 1.6 1.7 - if (TraceMetadataHumongousAllocation && 1.8 + if (TraceMetadataHumongousAllocation && next != NULL && 1.9 SpaceManager::is_humongous(next->word_size())) { 1.10 - gclog_or_tty->print_cr(" new humongous chunk word size " PTR_FORMAT, 1.11 - next->word_size()); 1.12 + gclog_or_tty->print_cr(" new humongous chunk word size " 1.13 + PTR_FORMAT, next->word_size()); 1.14 } 1.15 1.16 return next; 1.17 @@ -2487,9 +2487,6 @@ 1.18 curr = curr->next()) { 1.19 out->print("%d) ", i++); 1.20 curr->print_on(out); 1.21 - if (TraceMetadataChunkAllocation && Verbose) { 1.22 - block_freelists()->print_on(out); 1.23 - } 1.24 curr_total += curr->word_size(); 1.25 used += curr->used_word_size(); 1.26 capacity += curr->capacity_word_size(); 1.27 @@ -2497,6 +2494,10 @@ 1.28 } 1.29 } 1.30 1.31 + if (TraceMetadataChunkAllocation && Verbose) { 1.32 + block_freelists()->print_on(out); 1.33 + } 1.34 + 1.35 size_t free = current_chunk() == NULL ? 0 : current_chunk()->free_word_size(); 1.36 // Free space isn't wasted. 1.37 waste -= free;