8238356: CodeHeap::blob_count() overestimates the number of blobs

Decremented _blob_count on addition to the free list

Reviewed-by: lucy, shade, thartmann
This commit is contained in:
Rahul Raghavan 2020-02-19 15:01:57 +05:30
parent 57ceb1bc5e
commit b2762836fc

View File

@ -611,6 +611,9 @@ void CodeHeap::add_to_freelist(HeapBlock* a) {
size_t bseg = segment_for(b);
_freelist_length++;
_blob_count--;
assert(_blob_count >= 0, "sanity");
assert(b != _freelist, "cannot be removed twice");
// Mark as free and update free space count