8059468: Fix PrintCodeCache output changed by JDK-8059137

Change output of PrintCodeCache to print "CodeCache" instead of "Code Cache" and change name of non-method code heap to non-nmethod code heap.

Reviewed-by: vlivanov, anoll
This commit is contained in:
Tobias Hartmann 2014-09-30 15:44:43 +02:00
parent 3525490c57
commit ea755702aa
19 changed files with 80 additions and 80 deletions

View File

@ -81,7 +81,7 @@ define_pd_global(intx, InitialCodeCacheSize, 2048*K); // Integral multip
define_pd_global(intx, ReservedCodeCacheSize, 256*M); define_pd_global(intx, ReservedCodeCacheSize, 256*M);
define_pd_global(intx, NonProfiledCodeHeapSize, 125*M); define_pd_global(intx, NonProfiledCodeHeapSize, 125*M);
define_pd_global(intx, ProfiledCodeHeapSize, 126*M); define_pd_global(intx, ProfiledCodeHeapSize, 126*M);
define_pd_global(intx, NonMethodCodeHeapSize, 5*M ); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(intx, CodeCacheExpansionSize, 64*K); define_pd_global(intx, CodeCacheExpansionSize, 64*K);
// Ergonomics related flags // Ergonomics related flags

View File

@ -49,7 +49,7 @@ define_pd_global(bool, ResizeTLAB, true );
define_pd_global(intx, ReservedCodeCacheSize, 32*M ); define_pd_global(intx, ReservedCodeCacheSize, 32*M );
define_pd_global(intx, NonProfiledCodeHeapSize, 13*M ); define_pd_global(intx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(intx, ProfiledCodeHeapSize, 14*M ); define_pd_global(intx, ProfiledCodeHeapSize, 14*M );
define_pd_global(intx, NonMethodCodeHeapSize, 5*M ); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(intx, CodeCacheExpansionSize, 32*K ); define_pd_global(intx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1); define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);

View File

@ -76,7 +76,7 @@ define_pd_global(intx, InitialCodeCacheSize, 2048*K); // Integral multip
define_pd_global(intx, ReservedCodeCacheSize, 48*M); define_pd_global(intx, ReservedCodeCacheSize, 48*M);
define_pd_global(intx, NonProfiledCodeHeapSize, 21*M); define_pd_global(intx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(intx, ProfiledCodeHeapSize, 22*M); define_pd_global(intx, ProfiledCodeHeapSize, 22*M);
define_pd_global(intx, NonMethodCodeHeapSize, 5*M ); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(intx, CodeCacheExpansionSize, 64*K); define_pd_global(intx, CodeCacheExpansionSize, 64*K);
// Ergonomics related flags // Ergonomics related flags
@ -87,7 +87,7 @@ define_pd_global(intx, InitialCodeCacheSize, 1536*K); // Integral multip
define_pd_global(intx, ReservedCodeCacheSize, 32*M); define_pd_global(intx, ReservedCodeCacheSize, 32*M);
define_pd_global(intx, NonProfiledCodeHeapSize, 13*M); define_pd_global(intx, NonProfiledCodeHeapSize, 13*M);
define_pd_global(intx, ProfiledCodeHeapSize, 14*M); define_pd_global(intx, ProfiledCodeHeapSize, 14*M);
define_pd_global(intx, NonMethodCodeHeapSize, 5*M ); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(intx, CodeCacheExpansionSize, 32*K); define_pd_global(intx, CodeCacheExpansionSize, 32*K);
// Ergonomics related flags // Ergonomics related flags
define_pd_global(uint64_t,MaxRAM, 4ULL*G); define_pd_global(uint64_t,MaxRAM, 4ULL*G);

View File

@ -49,7 +49,7 @@ define_pd_global(intx, InitialCodeCacheSize, 160*K);
define_pd_global(intx, ReservedCodeCacheSize, 32*M ); define_pd_global(intx, ReservedCodeCacheSize, 32*M );
define_pd_global(intx, NonProfiledCodeHeapSize, 13*M ); define_pd_global(intx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(intx, ProfiledCodeHeapSize, 14*M ); define_pd_global(intx, ProfiledCodeHeapSize, 14*M );
define_pd_global(intx, NonMethodCodeHeapSize, 5*M ); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(bool, ProfileInterpreter, false); define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(intx, CodeCacheExpansionSize, 32*K ); define_pd_global(intx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1); define_pd_global(uintx, CodeCacheMinBlockLength, 1);

View File

@ -86,7 +86,7 @@ define_pd_global(bool, OptoBundling, false);
define_pd_global(intx, ReservedCodeCacheSize, 48*M); define_pd_global(intx, ReservedCodeCacheSize, 48*M);
define_pd_global(intx, NonProfiledCodeHeapSize, 21*M); define_pd_global(intx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(intx, ProfiledCodeHeapSize, 22*M); define_pd_global(intx, ProfiledCodeHeapSize, 22*M);
define_pd_global(intx, NonMethodCodeHeapSize, 5*M ); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheMinBlockLength, 4); define_pd_global(uintx, CodeCacheMinBlockLength, 4);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);

View File

@ -55,7 +55,7 @@ define_pd_global(intx, InitialCodeCacheSize, 160*K);
define_pd_global(intx, ReservedCodeCacheSize, 32*M ); define_pd_global(intx, ReservedCodeCacheSize, 32*M );
define_pd_global(intx, NonProfiledCodeHeapSize, 13*M ); define_pd_global(intx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(intx, ProfiledCodeHeapSize, 14*M ); define_pd_global(intx, ProfiledCodeHeapSize, 14*M );
define_pd_global(intx, NonMethodCodeHeapSize, 5*M ); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(bool, ProfileInterpreter, false); define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(intx, CodeCacheExpansionSize, 32*K ); define_pd_global(intx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1 ); define_pd_global(uintx, CodeCacheMinBlockLength, 1 );

View File

@ -230,7 +230,7 @@ BufferBlob* BufferBlob::create(const char* name, CodeBuffer* cb) {
} }
void* BufferBlob::operator new(size_t s, unsigned size, bool is_critical) throw() { void* BufferBlob::operator new(size_t s, unsigned size, bool is_critical) throw() {
return CodeCache::allocate(size, CodeBlobType::NonMethod, is_critical); return CodeCache::allocate(size, CodeBlobType::NonNMethod, is_critical);
} }
void BufferBlob::free(BufferBlob *blob) { void BufferBlob::free(BufferBlob *blob) {
@ -336,14 +336,14 @@ RuntimeStub* RuntimeStub::new_runtime_stub(const char* stub_name,
void* RuntimeStub::operator new(size_t s, unsigned size) throw() { void* RuntimeStub::operator new(size_t s, unsigned size) throw() {
void* p = CodeCache::allocate(size, CodeBlobType::NonMethod, true); void* p = CodeCache::allocate(size, CodeBlobType::NonNMethod, true);
if (!p) fatal("Initial size of CodeCache is too small"); if (!p) fatal("Initial size of CodeCache is too small");
return p; return p;
} }
// operator new shared by all singletons: // operator new shared by all singletons:
void* SingletonBlob::operator new(size_t s, unsigned size) throw() { void* SingletonBlob::operator new(size_t s, unsigned size) throw() {
void* p = CodeCache::allocate(size, CodeBlobType::NonMethod, true); void* p = CodeCache::allocate(size, CodeBlobType::NonNMethod, true);
if (!p) fatal("Initial size of CodeCache is too small"); if (!p) fatal("Initial size of CodeCache is too small");
return p; return p;
} }

View File

@ -36,7 +36,7 @@ struct CodeBlobType {
enum { enum {
MethodNonProfiled = 0, // Execution level 1 and 4 (non-profiled) nmethods (including native nmethods) MethodNonProfiled = 0, // Execution level 1 and 4 (non-profiled) nmethods (including native nmethods)
MethodProfiled = 1, // Execution level 2 and 3 (profiled) nmethods MethodProfiled = 1, // Execution level 2 and 3 (profiled) nmethods
NonMethod = 2, // Non-methods like Buffers, Adapters and Runtime Stubs NonNMethod = 2, // Non-nmethods like Buffers, Adapters and Runtime Stubs
All = 3, // All types (No code cache segmentation) All = 3, // All types (No code cache segmentation)
NumTypes = 4 // Number of CodeBlobTypes NumTypes = 4 // Number of CodeBlobTypes
}; };

View File

@ -158,23 +158,23 @@ void CodeCache::initialize_heaps() {
#endif #endif
// Calculate default CodeHeap sizes if not set by user // Calculate default CodeHeap sizes if not set by user
if (!FLAG_IS_CMDLINE(NonMethodCodeHeapSize) && !FLAG_IS_CMDLINE(ProfiledCodeHeapSize) if (!FLAG_IS_CMDLINE(NonNMethodCodeHeapSize) && !FLAG_IS_CMDLINE(ProfiledCodeHeapSize)
&& !FLAG_IS_CMDLINE(NonProfiledCodeHeapSize)) { && !FLAG_IS_CMDLINE(NonProfiledCodeHeapSize)) {
// Increase default NonMethodCodeHeapSize to account for compiler buffers // Increase default NonNMethodCodeHeapSize to account for compiler buffers
FLAG_SET_ERGO(uintx, NonMethodCodeHeapSize, NonMethodCodeHeapSize + code_buffers_size); FLAG_SET_ERGO(uintx, NonNMethodCodeHeapSize, NonNMethodCodeHeapSize + code_buffers_size);
// Check if we have enough space for the non-method code heap // Check if we have enough space for the non-nmethod code heap
if (ReservedCodeCacheSize > NonMethodCodeHeapSize) { if (ReservedCodeCacheSize > NonNMethodCodeHeapSize) {
// Use the default value for NonMethodCodeHeapSize and one half of the // Use the default value for NonNMethodCodeHeapSize and one half of the
// remaining size for non-profiled methods and one half for profiled methods // remaining size for non-profiled methods and one half for profiled methods
size_t remaining_size = ReservedCodeCacheSize - NonMethodCodeHeapSize; size_t remaining_size = ReservedCodeCacheSize - NonNMethodCodeHeapSize;
size_t profiled_size = remaining_size / 2; size_t profiled_size = remaining_size / 2;
size_t non_profiled_size = remaining_size - profiled_size; size_t non_profiled_size = remaining_size - profiled_size;
FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, profiled_size); FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, profiled_size);
FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, non_profiled_size); FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, non_profiled_size);
} else { } else {
// Use all space for the non-method heap and set other heaps to minimal size // Use all space for the non-nmethod heap and set other heaps to minimal size
FLAG_SET_ERGO(uintx, NonMethodCodeHeapSize, ReservedCodeCacheSize - os::vm_page_size() * 2); FLAG_SET_ERGO(uintx, NonNMethodCodeHeapSize, ReservedCodeCacheSize - os::vm_page_size() * 2);
FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, os::vm_page_size()); FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, os::vm_page_size());
FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, os::vm_page_size()); FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, os::vm_page_size());
} }
@ -185,21 +185,21 @@ void CodeCache::initialize_heaps() {
FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, NonProfiledCodeHeapSize + ProfiledCodeHeapSize); FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, NonProfiledCodeHeapSize + ProfiledCodeHeapSize);
FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, 0); FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, 0);
} }
// We do not need the non-profiled CodeHeap, use all space for the non-method CodeHeap // We do not need the non-profiled CodeHeap, use all space for the non-nmethod CodeHeap
if(!heap_available(CodeBlobType::MethodNonProfiled)) { if(!heap_available(CodeBlobType::MethodNonProfiled)) {
FLAG_SET_ERGO(uintx, NonMethodCodeHeapSize, NonMethodCodeHeapSize + NonProfiledCodeHeapSize); FLAG_SET_ERGO(uintx, NonNMethodCodeHeapSize, NonNMethodCodeHeapSize + NonProfiledCodeHeapSize);
FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, 0); FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, 0);
} }
// Make sure we have enough space for VM internal code // Make sure we have enough space for VM internal code
uint min_code_cache_size = (CodeCacheMinimumUseSpace DEBUG_ONLY(* 3)) + CodeCacheMinimumFreeSpace; uint min_code_cache_size = (CodeCacheMinimumUseSpace DEBUG_ONLY(* 3)) + CodeCacheMinimumFreeSpace;
if (NonMethodCodeHeapSize < (min_code_cache_size + code_buffers_size)) { if (NonNMethodCodeHeapSize < (min_code_cache_size + code_buffers_size)) {
vm_exit_during_initialization("Not enough space in non-method code heap to run VM."); vm_exit_during_initialization("Not enough space in non-nmethod code heap to run VM.");
} }
guarantee(NonProfiledCodeHeapSize + ProfiledCodeHeapSize + NonMethodCodeHeapSize <= ReservedCodeCacheSize, "Size check"); guarantee(NonProfiledCodeHeapSize + ProfiledCodeHeapSize + NonNMethodCodeHeapSize <= ReservedCodeCacheSize, "Size check");
// Align reserved sizes of CodeHeaps // Align reserved sizes of CodeHeaps
size_t non_method_size = ReservedCodeSpace::allocation_align_size_up(NonMethodCodeHeapSize); size_t non_method_size = ReservedCodeSpace::allocation_align_size_up(NonNMethodCodeHeapSize);
size_t profiled_size = ReservedCodeSpace::allocation_align_size_up(ProfiledCodeHeapSize); size_t profiled_size = ReservedCodeSpace::allocation_align_size_up(ProfiledCodeHeapSize);
size_t non_profiled_size = ReservedCodeSpace::allocation_align_size_up(NonProfiledCodeHeapSize); size_t non_profiled_size = ReservedCodeSpace::allocation_align_size_up(NonProfiledCodeHeapSize);
@ -213,7 +213,7 @@ void CodeCache::initialize_heaps() {
// ---------- high ----------- // ---------- high -----------
// Non-profiled nmethods // Non-profiled nmethods
// Profiled nmethods // Profiled nmethods
// Non-methods // Non-nmethods
// ---------- low ------------ // ---------- low ------------
ReservedCodeSpace rs = reserve_heap_memory(non_profiled_size + profiled_size + non_method_size); ReservedCodeSpace rs = reserve_heap_memory(non_profiled_size + profiled_size + non_method_size);
ReservedSpace non_method_space = rs.first_part(non_method_size); ReservedSpace non_method_space = rs.first_part(non_method_size);
@ -221,12 +221,12 @@ void CodeCache::initialize_heaps() {
ReservedSpace profiled_space = rest.first_part(profiled_size); ReservedSpace profiled_space = rest.first_part(profiled_size);
ReservedSpace non_profiled_space = rest.last_part(profiled_size); ReservedSpace non_profiled_space = rest.last_part(profiled_size);
// Non-methods (stubs, adapters, ...) // Non-nmethods (stubs, adapters, ...)
add_heap(non_method_space, "Code Heap 'non-methods'", init_non_method_size, CodeBlobType::NonMethod); add_heap(non_method_space, "CodeHeap 'non-nmethods'", init_non_method_size, CodeBlobType::NonNMethod);
// Tier 2 and tier 3 (profiled) methods // Tier 2 and tier 3 (profiled) methods
add_heap(profiled_space, "Code Heap 'profiled nmethods'", init_profiled_size, CodeBlobType::MethodProfiled); add_heap(profiled_space, "CodeHeap 'profiled nmethods'", init_profiled_size, CodeBlobType::MethodProfiled);
// Tier 1 and tier 4 (non-profiled) methods and native methods // 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); add_heap(non_profiled_space, "CodeHeap 'non-profiled nmethods'", init_non_profiled_size, CodeBlobType::MethodNonProfiled);
} }
ReservedCodeSpace CodeCache::reserve_heap_memory(size_t size) { ReservedCodeSpace CodeCache::reserve_heap_memory(size_t size) {
@ -257,13 +257,13 @@ bool CodeCache::heap_available(int code_blob_type) {
} else if ((Arguments::mode() == Arguments::_int) || } else if ((Arguments::mode() == Arguments::_int) ||
(TieredStopAtLevel == CompLevel_none)) { (TieredStopAtLevel == CompLevel_none)) {
// Interpreter only: we don't need any method code heaps // Interpreter only: we don't need any method code heaps
return (code_blob_type == CodeBlobType::NonMethod); return (code_blob_type == CodeBlobType::NonNMethod);
} else if (TieredCompilation && (TieredStopAtLevel > CompLevel_simple)) { } else if (TieredCompilation && (TieredStopAtLevel > CompLevel_simple)) {
// Tiered compilation: use all code heaps // Tiered compilation: use all code heaps
return (code_blob_type < CodeBlobType::All); return (code_blob_type < CodeBlobType::All);
} else { } else {
// No TieredCompilation: we only need the non-method and non-profiled code heap // No TieredCompilation: we only need the non-nmethod and non-profiled code heap
return (code_blob_type == CodeBlobType::NonMethod) || return (code_blob_type == CodeBlobType::NonNMethod) ||
(code_blob_type == CodeBlobType::MethodNonProfiled); (code_blob_type == CodeBlobType::MethodNonProfiled);
} }
} }
@ -355,8 +355,8 @@ CodeBlob* CodeCache::allocate(int size, int code_blob_type, bool is_critical) {
if (cb != NULL) break; if (cb != NULL) break;
if (!heap->expand_by(CodeCacheExpansionSize)) { if (!heap->expand_by(CodeCacheExpansionSize)) {
// Expansion failed // Expansion failed
if (SegmentedCodeCache && (code_blob_type == CodeBlobType::NonMethod)) { if (SegmentedCodeCache && (code_blob_type == CodeBlobType::NonNMethod)) {
// Fallback solution: Store non-method code in the non-profiled code heap // Fallback solution: Store non-nmethod code in the non-profiled code heap
return allocate(size, CodeBlobType::MethodNonProfiled, is_critical); return allocate(size, CodeBlobType::MethodNonProfiled, is_critical);
} }
return NULL; return NULL;
@ -366,7 +366,7 @@ CodeBlob* CodeCache::allocate(int size, int code_blob_type, bool is_critical) {
if (SegmentedCodeCache) { if (SegmentedCodeCache) {
tty->print("%s", heap->name()); tty->print("%s", heap->name());
} else { } else {
tty->print("Code Cache"); tty->print("CodeCache");
} }
tty->print_cr(" extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)", tty->print_cr(" extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)",
(intptr_t)heap->low_boundary(), (intptr_t)heap->high(), (intptr_t)heap->low_boundary(), (intptr_t)heap->high(),
@ -820,7 +820,7 @@ void CodeCache::initialize() {
} else { } else {
// Use a single code heap // Use a single code heap
ReservedCodeSpace rs = reserve_heap_memory(ReservedCodeCacheSize); ReservedCodeSpace rs = reserve_heap_memory(ReservedCodeCacheSize);
add_heap(rs, "Code Cache", InitialCodeCacheSize, CodeBlobType::All); add_heap(rs, "CodeCache", InitialCodeCacheSize, CodeBlobType::All);
} }
// Initialize ICache flush mechanism // Initialize ICache flush mechanism
@ -1241,7 +1241,7 @@ void CodeCache::print_summary(outputStream* st, bool detailed) {
if (SegmentedCodeCache) { if (SegmentedCodeCache) {
st->print("%s:", heap->name()); st->print("%s:", heap->name());
} else { } else {
st->print("Code Cache:"); st->print("CodeCache:");
} }
st->print_cr(" size=" SIZE_FORMAT "Kb used=" SIZE_FORMAT st->print_cr(" size=" SIZE_FORMAT "Kb used=" SIZE_FORMAT
"Kb max_used=" SIZE_FORMAT "Kb free=" SIZE_FORMAT "Kb", "Kb max_used=" SIZE_FORMAT "Kb free=" SIZE_FORMAT "Kb",

View File

@ -41,14 +41,14 @@
// The CodeCache consists of one or more CodeHeaps, each of which contains // The CodeCache consists of one or more CodeHeaps, each of which contains
// CodeBlobs of a specific CodeBlobType. Currently heaps for the following // CodeBlobs of a specific CodeBlobType. Currently heaps for the following
// types are available: // types are available:
// - Non-methods: Non-methods like Buffers, Adapters and Runtime Stubs // - Non-nmethods: Non-nmethods like Buffers, Adapters and Runtime Stubs
// - Profiled nmethods: nmethods that are profiled, i.e., those // - Profiled nmethods: nmethods that are profiled, i.e., those
// executed at level 2 or 3 // executed at level 2 or 3
// - Non-Profiled nmethods: nmethods that are not profiled, i.e., those // - Non-Profiled nmethods: nmethods that are not profiled, i.e., those
// executed at level 1 or 4 and native methods // executed at level 1 or 4 and native methods
// - All: Used for code of all types if code cache segmentation is disabled. // - All: Used for code of all types if code cache segmentation is disabled.
// //
// In the rare case of the non-method code heap getting full, non-method code // In the rare case of the non-nmethod code heap getting full, non-nmethod code
// will be stored in the non-profiled code heap as a fallback solution. // will be stored in the non-profiled code heap as a fallback solution.
// //
// Depending on the availability of compilers and TieredCompilation there // Depending on the availability of compilers and TieredCompilation there

View File

@ -63,7 +63,7 @@ void* VtableStub::operator new(size_t size, int code_size) throw() {
// If changing the name, update the other file accordingly. // If changing the name, update the other file accordingly.
BufferBlob* blob = BufferBlob::create("vtable chunks", bytes); BufferBlob* blob = BufferBlob::create("vtable chunks", bytes);
if (blob == NULL) { if (blob == NULL) {
CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod); CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
return NULL; return NULL;
} }
_chunk = blob->content_begin(); _chunk = blob->content_begin();

View File

@ -1077,7 +1077,7 @@ IRT_END
address SignatureHandlerLibrary::set_handler_blob() { address SignatureHandlerLibrary::set_handler_blob() {
BufferBlob* handler_blob = BufferBlob::create("native signature handlers", blob_size); BufferBlob* handler_blob = BufferBlob::create("native signature handlers", blob_size);
if (handler_blob == NULL) { if (handler_blob == NULL) {
CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod); CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
return NULL; return NULL;
} }
address handler = handler_blob->code_begin(); address handler = handler_blob->code_begin();

View File

@ -535,7 +535,7 @@ void Compile::init_scratch_buffer_blob(int const_size) {
if (scratch_buffer_blob() == NULL) { if (scratch_buffer_blob() == NULL) {
// Let CompilerBroker disable further compilations. // Let CompilerBroker disable further compilations.
record_failure("Not enough space for scratch buffer in CodeCache"); record_failure("Not enough space for scratch buffer in CodeCache");
CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod); CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
return; return;
} }
} }

View File

@ -1166,7 +1166,7 @@ CodeBuffer* Compile::init_buffer(uint* blk_starts) {
// Have we run out of code space? // Have we run out of code space?
if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) {
C->record_failure("CodeCache is full"); C->record_failure("CodeCache is full");
CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod); CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
return NULL; return NULL;
} }
// Configure the code buffer. // Configure the code buffer.
@ -1491,7 +1491,7 @@ void Compile::fill_buffer(CodeBuffer* cb, uint* blk_starts) {
cb->insts()->maybe_expand_to_ensure_remaining(MAX_inst_size); cb->insts()->maybe_expand_to_ensure_remaining(MAX_inst_size);
if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) {
C->record_failure("CodeCache is full"); C->record_failure("CodeCache is full");
CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod); CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
return; return;
} }
@ -1648,7 +1648,7 @@ void Compile::fill_buffer(CodeBuffer* cb, uint* blk_starts) {
// One last check for failed CodeBuffer::expand: // One last check for failed CodeBuffer::expand:
if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) {
C->record_failure("CodeCache is full"); C->record_failure("CodeCache is full");
CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod); CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
return; return;
} }

View File

@ -1152,19 +1152,19 @@ void Arguments::set_tiered_flags() {
if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M) { if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M) {
FLAG_SET_ERGO(bool, SegmentedCodeCache, true); FLAG_SET_ERGO(bool, SegmentedCodeCache, true);
// Multiply sizes by 5 but fix NonMethodCodeHeapSize (distribute among non-profiled and profiled code heap) // Multiply sizes by 5 but fix NonNMethodCodeHeapSize (distribute among non-profiled and profiled code heap)
if (FLAG_IS_DEFAULT(ProfiledCodeHeapSize)) { if (FLAG_IS_DEFAULT(ProfiledCodeHeapSize)) {
FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, ProfiledCodeHeapSize * 5 + NonMethodCodeHeapSize * 2); FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, ProfiledCodeHeapSize * 5 + NonNMethodCodeHeapSize * 2);
} }
if (FLAG_IS_DEFAULT(NonProfiledCodeHeapSize)) { if (FLAG_IS_DEFAULT(NonProfiledCodeHeapSize)) {
FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, NonProfiledCodeHeapSize * 5 + NonMethodCodeHeapSize * 2); FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, NonProfiledCodeHeapSize * 5 + NonNMethodCodeHeapSize * 2);
} }
// Check consistency of code heap sizes // Check consistency of code heap sizes
if ((NonMethodCodeHeapSize + NonProfiledCodeHeapSize + ProfiledCodeHeapSize) != ReservedCodeCacheSize) { if ((NonNMethodCodeHeapSize + NonProfiledCodeHeapSize + ProfiledCodeHeapSize) != ReservedCodeCacheSize) {
jio_fprintf(defaultStream::error_stream(), jio_fprintf(defaultStream::error_stream(),
"Invalid code heap sizes: NonMethodCodeHeapSize(%dK) + ProfiledCodeHeapSize(%dK) + NonProfiledCodeHeapSize(%dK) = %dK. Must be equal to ReservedCodeCacheSize = %uK.\n", "Invalid code heap sizes: NonNMethodCodeHeapSize(%dK) + ProfiledCodeHeapSize(%dK) + NonProfiledCodeHeapSize(%dK) = %dK. Must be equal to ReservedCodeCacheSize = %uK.\n",
NonMethodCodeHeapSize/K, ProfiledCodeHeapSize/K, NonProfiledCodeHeapSize/K, NonNMethodCodeHeapSize/K, ProfiledCodeHeapSize/K, NonProfiledCodeHeapSize/K,
(NonMethodCodeHeapSize + ProfiledCodeHeapSize + NonProfiledCodeHeapSize)/K, ReservedCodeCacheSize/K); (NonNMethodCodeHeapSize + ProfiledCodeHeapSize + NonProfiledCodeHeapSize)/K, ReservedCodeCacheSize/K);
vm_exit(1); vm_exit(1);
} }
} }
@ -2502,17 +2502,17 @@ bool Arguments::check_vm_args_consistency() {
"Invalid ReservedCodeCacheSize=%dM. Must be at most %uM.\n", ReservedCodeCacheSize/M, "Invalid ReservedCodeCacheSize=%dM. Must be at most %uM.\n", ReservedCodeCacheSize/M,
(2*G)/M); (2*G)/M);
status = false; status = false;
} else if (NonMethodCodeHeapSize < min_code_cache_size){ } else if (NonNMethodCodeHeapSize < min_code_cache_size){
jio_fprintf(defaultStream::error_stream(), jio_fprintf(defaultStream::error_stream(),
"Invalid NonMethodCodeHeapSize=%dK. Must be at least %uK.\n", NonMethodCodeHeapSize/K, "Invalid NonNMethodCodeHeapSize=%dK. Must be at least %uK.\n", NonNMethodCodeHeapSize/K,
min_code_cache_size/K); min_code_cache_size/K);
status = false; status = false;
} else if ((!FLAG_IS_DEFAULT(NonMethodCodeHeapSize) || !FLAG_IS_DEFAULT(ProfiledCodeHeapSize) || !FLAG_IS_DEFAULT(NonProfiledCodeHeapSize)) } else if ((!FLAG_IS_DEFAULT(NonNMethodCodeHeapSize) || !FLAG_IS_DEFAULT(ProfiledCodeHeapSize) || !FLAG_IS_DEFAULT(NonProfiledCodeHeapSize))
&& (NonMethodCodeHeapSize + NonProfiledCodeHeapSize + ProfiledCodeHeapSize) != ReservedCodeCacheSize) { && (NonNMethodCodeHeapSize + NonProfiledCodeHeapSize + ProfiledCodeHeapSize) != ReservedCodeCacheSize) {
jio_fprintf(defaultStream::error_stream(), jio_fprintf(defaultStream::error_stream(),
"Invalid code heap sizes: NonMethodCodeHeapSize(%dK) + ProfiledCodeHeapSize(%dK) + NonProfiledCodeHeapSize(%dK) = %dK. Must be equal to ReservedCodeCacheSize = %uK.\n", "Invalid code heap sizes: NonNMethodCodeHeapSize(%dK) + ProfiledCodeHeapSize(%dK) + NonProfiledCodeHeapSize(%dK) = %dK. Must be equal to ReservedCodeCacheSize = %uK.\n",
NonMethodCodeHeapSize/K, ProfiledCodeHeapSize/K, NonProfiledCodeHeapSize/K, NonNMethodCodeHeapSize/K, ProfiledCodeHeapSize/K, NonProfiledCodeHeapSize/K,
(NonMethodCodeHeapSize + ProfiledCodeHeapSize + NonProfiledCodeHeapSize)/K, ReservedCodeCacheSize/K); (NonNMethodCodeHeapSize + ProfiledCodeHeapSize + NonProfiledCodeHeapSize)/K, ReservedCodeCacheSize/K);
status = false; status = false;
} }
@ -2938,17 +2938,17 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
return JNI_EINVAL; return JNI_EINVAL;
} }
FLAG_SET_CMDLINE(uintx, ReservedCodeCacheSize, (uintx)long_ReservedCodeCacheSize); FLAG_SET_CMDLINE(uintx, ReservedCodeCacheSize, (uintx)long_ReservedCodeCacheSize);
// -XX:NonMethodCodeHeapSize= // -XX:NonNMethodCodeHeapSize=
} else if (match_option(option, "-XX:NonMethodCodeHeapSize=", &tail)) { } else if (match_option(option, "-XX:NonNMethodCodeHeapSize=", &tail)) {
julong long_NonMethodCodeHeapSize = 0; julong long_NonNMethodCodeHeapSize = 0;
ArgsRange errcode = parse_memory_size(tail, &long_NonMethodCodeHeapSize, 1); ArgsRange errcode = parse_memory_size(tail, &long_NonNMethodCodeHeapSize, 1);
if (errcode != arg_in_range) { if (errcode != arg_in_range) {
jio_fprintf(defaultStream::error_stream(), jio_fprintf(defaultStream::error_stream(),
"Invalid maximum non-method code heap size: %s.\n", option->optionString); "Invalid maximum non-nmethod code heap size: %s.\n", option->optionString);
return JNI_EINVAL; return JNI_EINVAL;
} }
FLAG_SET_CMDLINE(uintx, NonMethodCodeHeapSize, (uintx)long_NonMethodCodeHeapSize); FLAG_SET_CMDLINE(uintx, NonNMethodCodeHeapSize, (uintx)long_NonNMethodCodeHeapSize);
// -XX:ProfiledCodeHeapSize= // -XX:ProfiledCodeHeapSize=
} else if (match_option(option, "-XX:ProfiledCodeHeapSize=", &tail)) { } else if (match_option(option, "-XX:ProfiledCodeHeapSize=", &tail)) {
julong long_ProfiledCodeHeapSize = 0; julong long_ProfiledCodeHeapSize = 0;

View File

@ -188,7 +188,7 @@ define_pd_global(intx, InitialCodeCacheSize, 160*K);
define_pd_global(intx, ReservedCodeCacheSize, 32*M); define_pd_global(intx, ReservedCodeCacheSize, 32*M);
define_pd_global(intx, NonProfiledCodeHeapSize, 0); define_pd_global(intx, NonProfiledCodeHeapSize, 0);
define_pd_global(intx, ProfiledCodeHeapSize, 0); define_pd_global(intx, ProfiledCodeHeapSize, 0);
define_pd_global(intx, NonMethodCodeHeapSize, 32*M); define_pd_global(intx, NonNMethodCodeHeapSize, 32*M);
define_pd_global(intx, CodeCacheExpansionSize, 32*K); define_pd_global(intx, CodeCacheExpansionSize, 32*K);
define_pd_global(intx, CodeCacheMinBlockLength, 1); define_pd_global(intx, CodeCacheMinBlockLength, 1);
@ -3370,8 +3370,8 @@ class CommandLineFlags {
product_pd(uintx, ProfiledCodeHeapSize, \ product_pd(uintx, ProfiledCodeHeapSize, \
"Size of code heap with profiled methods (in bytes)") \ "Size of code heap with profiled methods (in bytes)") \
\ \
product_pd(uintx, NonMethodCodeHeapSize, \ product_pd(uintx, NonNMethodCodeHeapSize, \
"Size of code heap with non-methods (in bytes)") \ "Size of code heap with non-nmethods (in bytes)") \
\ \
product(uintx, CodeCacheMinimumFreeSpace, 500*K, \ product(uintx, CodeCacheMinimumFreeSpace, 500*K, \
"When less than X space left, we stop compiling") \ "When less than X space left, we stop compiling") \

View File

@ -2422,7 +2422,7 @@ AdapterHandlerEntry* AdapterHandlerLibrary::get_adapter(methodHandle method) {
// Ought to log this but compile log is only per compile thread // Ought to log this but compile log is only per compile thread
// and we're some non descript Java thread. // and we're some non descript Java thread.
MutexUnlocker mu(AdapterHandlerLibrary_lock); MutexUnlocker mu(AdapterHandlerLibrary_lock);
CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod); CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
return NULL; // Out of CodeCache space return NULL; // Out of CodeCache space
} }
entry->relocate(new_adapter->content_begin()); entry->relocate(new_adapter->content_begin());

View File

@ -32,7 +32,7 @@ import com.oracle.java.testlibrary.*;
*/ */
public class CheckSegmentedCodeCache { public class CheckSegmentedCodeCache {
// Code heap names // Code heap names
private static final String NON_METHOD = "CodeHeap 'non-methods'"; private static final String NON_METHOD = "CodeHeap 'non-nmethods'";
private static final String PROFILED = "CodeHeap 'profiled nmethods'"; private static final String PROFILED = "CodeHeap 'profiled nmethods'";
private static final String NON_PROFILED = "CodeHeap 'non-profiled nmethods'"; private static final String NON_PROFILED = "CodeHeap 'non-profiled nmethods'";
@ -40,7 +40,7 @@ public class CheckSegmentedCodeCache {
OutputAnalyzer out = new OutputAnalyzer(pb.start()); OutputAnalyzer out = new OutputAnalyzer(pb.start());
if (enabled) { if (enabled) {
try { try {
// Non-method code heap should be always available with the segmented code cache // Non-nmethod code heap should be always available with the segmented code cache
out.shouldContain(NON_METHOD); out.shouldContain(NON_METHOD);
} catch (RuntimeException e) { } catch (RuntimeException e) {
// TieredCompilation is disabled in a client VM // TieredCompilation is disabled in a client VM
@ -111,14 +111,14 @@ public class CheckSegmentedCodeCache {
"-XX:+PrintCodeCache", "-version"); "-XX:+PrintCodeCache", "-version");
verifyCodeHeapNotExists(pb, PROFILED); verifyCodeHeapNotExists(pb, PROFILED);
// Fails with too small non-method code heap size // Fails with too small non-nmethod code heap size
pb = ProcessTools.createJavaProcessBuilder("-XX:NonMethodCodeHeapSize=100K"); pb = ProcessTools.createJavaProcessBuilder("-XX:NonNMethodCodeHeapSize=100K");
failsWith(pb, "Invalid NonMethodCodeHeapSize"); failsWith(pb, "Invalid NonNMethodCodeHeapSize");
// Fails if code heap sizes do not add up // Fails if code heap sizes do not add up
pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache", pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
"-XX:ReservedCodeCacheSize=10M", "-XX:ReservedCodeCacheSize=10M",
"-XX:NonMethodCodeHeapSize=5M", "-XX:NonNMethodCodeHeapSize=5M",
"-XX:ProfiledCodeHeapSize=5M", "-XX:ProfiledCodeHeapSize=5M",
"-XX:NonProfiledCodeHeapSize=5M"); "-XX:NonProfiledCodeHeapSize=5M");
failsWith(pb, "Invalid code heap sizes"); failsWith(pb, "Invalid code heap sizes");
@ -127,6 +127,6 @@ public class CheckSegmentedCodeCache {
pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache", pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
"-XX:ReservedCodeCacheSize=1700K", "-XX:ReservedCodeCacheSize=1700K",
"-XX:InitialCodeCacheSize=100K"); "-XX:InitialCodeCacheSize=100K");
failsWith(pb, "Not enough space in non-method code heap to run VM"); failsWith(pb, "Not enough space in non-nmethod code heap to run VM");
} }
} }

View File

@ -52,7 +52,7 @@ public class CodeCacheTest {
* *
* Expected output with code cache segmentation (number of segments may change): * Expected output with code cache segmentation (number of segments may change):
* *
* CodeHeap 'non-methods': size=5696Kb used=2236Kb max_used=2238Kb free=3459Kb * CodeHeap 'non-nmethods': size=5696Kb used=2236Kb max_used=2238Kb free=3459Kb
* bounds [0x00007fa0f0ffe000, 0x00007fa0f126e000, 0x00007fa0f158e000] * bounds [0x00007fa0f0ffe000, 0x00007fa0f126e000, 0x00007fa0f158e000]
* CodeHeap 'profiled nmethods': size=120036Kb used=8Kb max_used=8Kb free=120027Kb * CodeHeap 'profiled nmethods': size=120036Kb used=8Kb max_used=8Kb free=120027Kb
* bounds [0x00007fa0f158e000, 0x00007fa0f17fe000, 0x00007fa0f8ac7000] * bounds [0x00007fa0f158e000, 0x00007fa0f17fe000, 0x00007fa0f8ac7000]
@ -95,7 +95,7 @@ public class CodeCacheTest {
// Tiered compilation: use all segments // Tiered compilation: use all segments
segmentsCount = 3; segmentsCount = 3;
} else { } else {
// No TieredCompilation: only non-method and non-profiled segment // No TieredCompilation: only non-nmethod and non-profiled segment
segmentsCount = 2; segmentsCount = 2;
} }