Mercurial > hg > graal-jvmci-8
diff src/share/vm/memory/metachunk.cpp @ 7446:e51c9860cf66
8005082: NPG: Add specialized Metachunk sizes for reflection and anonymous classloaders
Reviewed-by: johnc, coleenp
author | jmasa |
---|---|
date | Mon, 03 Dec 2012 15:09:39 -0800 |
parents | eade6b2e4782 |
children | c23dbf0e8ab7 |
line wrap: on
line diff
--- a/src/share/vm/memory/metachunk.cpp Fri Dec 21 10:27:49 2012 -0800 +++ b/src/share/vm/memory/metachunk.cpp Mon Dec 03 15:09:39 2012 -0800 @@ -56,6 +56,7 @@ assert(chunk_end > chunk_bottom, "Chunk must be too small"); chunk->set_end(chunk_end); chunk->set_next(NULL); + chunk->set_prev(NULL); chunk->set_word_size(word_size); #ifdef ASSERT size_t data_word_size = pointer_delta(chunk_end, chunk_bottom, sizeof(MetaWord)); @@ -76,15 +77,15 @@ } // _bottom points to the start of the chunk including the overhead. -size_t Metachunk::used_word_size() { +size_t Metachunk::used_word_size() const { return pointer_delta(_top, _bottom, sizeof(MetaWord)); } -size_t Metachunk::free_word_size() { +size_t Metachunk::free_word_size() const { return pointer_delta(_end, _top, sizeof(MetaWord)); } -size_t Metachunk::capacity_word_size() { +size_t Metachunk::capacity_word_size() const { return pointer_delta(_end, _bottom, sizeof(MetaWord)); } @@ -93,6 +94,10 @@ " bottom " PTR_FORMAT " top " PTR_FORMAT " end " PTR_FORMAT " size " SIZE_FORMAT, bottom(), top(), end(), word_size()); + if (Verbose) { + st->print_cr(" used " SIZE_FORMAT " free " SIZE_FORMAT, + used_word_size(), free_word_size()); + } } #ifndef PRODUCT