8067378: Add segmented code heaps info into jfr events: vm/code_cache/stats and vm/code_cache/config

Added code heap specific information to code cache JFR events.

Reviewed-by: twisti, mgronlun
This commit is contained in:
Tobias Hartmann 2015-11-09 11:35:44 +01:00
parent 8d1f664989
commit 5d86db4b66
6 changed files with 104 additions and 37 deletions

View file

@ -47,7 +47,10 @@ CodeHeap::CodeHeap(const char* name, const int code_blob_type)
_freelist_segments = 0;
_freelist_length = 0;
_max_allocated_capacity = 0;
_was_full = false;
_blob_count = 0;
_nmethod_count = 0;
_adapter_count = 0;
_full_count = 0;
}
@ -185,6 +188,7 @@ void* CodeHeap::allocate(size_t instance_size) {
assert(!block->free(), "must be marked free");
DEBUG_ONLY(memset((void*)block->allocated_space(), badCodeHeapNewVal, instance_size));
_max_allocated_capacity = MAX2(_max_allocated_capacity, allocated_capacity());
_blob_count++;
return block->allocated_space();
}
@ -198,6 +202,7 @@ void* CodeHeap::allocate(size_t instance_size) {
_next_segment += number_of_segments;
DEBUG_ONLY(memset((void *)b->allocated_space(), badCodeHeapNewVal, instance_size));
_max_allocated_capacity = MAX2(_max_allocated_capacity, allocated_capacity());
_blob_count++;
return b->allocated_space();
} else {
return NULL;