提交 ec905165 编写于 作者: S stefank

8024751: Fix bugs in TraceMetadata

Reviewed-by: jmasa, brutisso
上级 426cedd7
...@@ -2366,10 +2366,10 @@ Metachunk* SpaceManager::get_new_chunk(size_t word_size, ...@@ -2366,10 +2366,10 @@ Metachunk* SpaceManager::get_new_chunk(size_t word_size,
grow_chunks_by_words, grow_chunks_by_words,
medium_chunk_bunch()); medium_chunk_bunch());
if (TraceMetadataHumongousAllocation && if (TraceMetadataHumongousAllocation && next != NULL &&
SpaceManager::is_humongous(next->word_size())) { SpaceManager::is_humongous(next->word_size())) {
gclog_or_tty->print_cr(" new humongous chunk word size " PTR_FORMAT, gclog_or_tty->print_cr(" new humongous chunk word size "
next->word_size()); PTR_FORMAT, next->word_size());
} }
return next; return next;
...@@ -2487,9 +2487,6 @@ void SpaceManager::dump(outputStream* const out) const { ...@@ -2487,9 +2487,6 @@ void SpaceManager::dump(outputStream* const out) const {
curr = curr->next()) { curr = curr->next()) {
out->print("%d) ", i++); out->print("%d) ", i++);
curr->print_on(out); curr->print_on(out);
if (TraceMetadataChunkAllocation && Verbose) {
block_freelists()->print_on(out);
}
curr_total += curr->word_size(); curr_total += curr->word_size();
used += curr->used_word_size(); used += curr->used_word_size();
capacity += curr->capacity_word_size(); capacity += curr->capacity_word_size();
...@@ -2497,6 +2494,10 @@ void SpaceManager::dump(outputStream* const out) const { ...@@ -2497,6 +2494,10 @@ void SpaceManager::dump(outputStream* const out) const {
} }
} }
if (TraceMetadataChunkAllocation && Verbose) {
block_freelists()->print_on(out);
}
size_t free = current_chunk() == NULL ? 0 : current_chunk()->free_word_size(); size_t free = current_chunk() == NULL ? 0 : current_chunk()->free_word_size();
// Free space isn't wasted. // Free space isn't wasted.
waste -= free; waste -= free;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册