src/share/vm/code/codeCache.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/code/codeCache.cpp
src/share/vm/code/codeCache.cpp
Print this page
*** 220,234 ****
ReservedSpace rest = rs.last_part(non_method_size);
ReservedSpace profiled_space = rest.first_part(profiled_size);
ReservedSpace non_profiled_space = rest.last_part(profiled_size);
// Non-methods (stubs, adapters, ...)
! add_heap(non_method_space, "non-methods", init_non_method_size, CodeBlobType::NonMethod);
// Tier 2 and tier 3 (profiled) methods
! add_heap(profiled_space, "profiled nmethods", init_profiled_size, CodeBlobType::MethodProfiled);
// Tier 1 and tier 4 (non-profiled) methods and native methods
! add_heap(non_profiled_space, "non-profiled nmethods", init_non_profiled_size, CodeBlobType::MethodNonProfiled);
}
ReservedCodeSpace CodeCache::reserve_heap_memory(size_t size) {
// Determine alignment
const size_t page_size = os::can_execute_large_page_memory() ?
--- 220,234 ----
ReservedSpace rest = rs.last_part(non_method_size);
ReservedSpace profiled_space = rest.first_part(profiled_size);
ReservedSpace non_profiled_space = rest.last_part(profiled_size);
// Non-methods (stubs, adapters, ...)
! add_heap(non_method_space, "Code Heap 'non-methods'", init_non_method_size, CodeBlobType::NonMethod);
// Tier 2 and tier 3 (profiled) methods
! add_heap(profiled_space, "Code Heap 'profiled nmethods'", init_profiled_size, CodeBlobType::MethodProfiled);
// Tier 1 and tier 4 (non-profiled) methods and native methods
! add_heap(non_profiled_space, "Code Heap 'non-profiled nmethods'", init_non_profiled_size, CodeBlobType::MethodNonProfiled);
}
ReservedCodeSpace CodeCache::reserve_heap_memory(size_t size) {
// Determine alignment
const size_t page_size = os::can_execute_large_page_memory() ?
*** 362,374 ****
return NULL;
}
if (PrintCodeCacheExtension) {
ResourceMark rm;
if (SegmentedCodeCache) {
! tty->print("Code heap '%s'", heap->name());
} else {
! tty->print("Code cache");
}
tty->print_cr(" extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)",
(intptr_t)heap->low_boundary(), (intptr_t)heap->high(),
(address)heap->high() - (address)heap->low_boundary());
}
--- 362,374 ----
return NULL;
}
if (PrintCodeCacheExtension) {
ResourceMark rm;
if (SegmentedCodeCache) {
! tty->print("%s", heap->name());
} else {
! tty->print("Code Cache");
}
tty->print_cr(" extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)",
(intptr_t)heap->low_boundary(), (intptr_t)heap->high(),
(address)heap->high() - (address)heap->low_boundary());
}
*** 818,828 ****
// Use multiple code heaps
initialize_heaps();
} else {
// Use a single code heap
ReservedCodeSpace rs = reserve_heap_memory(ReservedCodeCacheSize);
! add_heap(rs, "Code heap", InitialCodeCacheSize, CodeBlobType::All);
}
// Initialize ICache flush mechanism
// This service is needed for os::register_code_area
icache_init();
--- 818,828 ----
// Use multiple code heaps
initialize_heaps();
} else {
// Use a single code heap
ReservedCodeSpace rs = reserve_heap_memory(ReservedCodeCacheSize);
! add_heap(rs, "Code Cache", InitialCodeCacheSize, CodeBlobType::All);
}
// Initialize ICache flush mechanism
// This service is needed for os::register_code_area
icache_init();
*** 1004,1014 ****
if (!heap->was_full() || print) {
// Not yet reported for this heap, report
heap->report_full();
if (SegmentedCodeCache) {
! warning("CodeHeap for %s is full. Compiler has been disabled.", CodeCache::get_code_heap_name(code_blob_type));
warning("Try increasing the code heap size using -XX:%s=",
(code_blob_type == CodeBlobType::MethodNonProfiled) ? "NonProfiledCodeHeapSize" : "ProfiledCodeHeapSize");
} else {
warning("CodeCache is full. Compiler has been disabled.");
warning("Try increasing the code cache size using -XX:ReservedCodeCacheSize=");
--- 1004,1014 ----
if (!heap->was_full() || print) {
// Not yet reported for this heap, report
heap->report_full();
if (SegmentedCodeCache) {
! warning("%s is full. Compiler has been disabled.", CodeCache::get_code_heap_name(code_blob_type));
warning("Try increasing the code heap size using -XX:%s=",
(code_blob_type == CodeBlobType::MethodNonProfiled) ? "NonProfiledCodeHeapSize" : "ProfiledCodeHeapSize");
} else {
warning("CodeCache is full. Compiler has been disabled.");
warning("Try increasing the code cache size using -XX:ReservedCodeCacheSize=");
*** 1088,1098 ****
ResourceMark rm;
int i = 0;
FOR_ALL_HEAPS(heap) {
if (SegmentedCodeCache && Verbose) {
! tty->print_cr("-- Code heap '%s' --", (*heap)->name());
}
FOR_ALL_BLOBS(cb, *heap) {
total++;
if (cb->is_nmethod()) {
nmethod* nm = (nmethod*)cb;
--- 1088,1098 ----
ResourceMark rm;
int i = 0;
FOR_ALL_HEAPS(heap) {
if (SegmentedCodeCache && Verbose) {
! tty->print_cr("-- %s --", (*heap)->name());
}
FOR_ALL_BLOBS(cb, *heap) {
total++;
if (cb->is_nmethod()) {
nmethod* nm = (nmethod*)cb;
*** 1237,1249 ****
void CodeCache::print_summary(outputStream* st, bool detailed) {
FOR_ALL_HEAPS(heap_iterator) {
CodeHeap* heap = (*heap_iterator);
size_t total = (heap->high_boundary() - heap->low_boundary());
if (SegmentedCodeCache) {
! st->print("CodeHeap '%s':", heap->name());
} else {
! st->print("CodeCache:");
}
st->print_cr(" size=" SIZE_FORMAT "Kb used=" SIZE_FORMAT
"Kb max_used=" SIZE_FORMAT "Kb free=" SIZE_FORMAT "Kb",
total/K, (total - heap->unallocated_capacity())/K,
heap->max_allocated_capacity()/K, heap->unallocated_capacity()/K);
--- 1237,1249 ----
void CodeCache::print_summary(outputStream* st, bool detailed) {
FOR_ALL_HEAPS(heap_iterator) {
CodeHeap* heap = (*heap_iterator);
size_t total = (heap->high_boundary() - heap->low_boundary());
if (SegmentedCodeCache) {
! st->print("%s:", heap->name());
} else {
! st->print("Code Cache:");
}
st->print_cr(" size=" SIZE_FORMAT "Kb used=" SIZE_FORMAT
"Kb max_used=" SIZE_FORMAT "Kb free=" SIZE_FORMAT "Kb",
total/K, (total - heap->unallocated_capacity())/K,
heap->max_allocated_capacity()/K, heap->unallocated_capacity()/K);
src/share/vm/code/codeCache.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File