changeset 26919:361b4b4c92c0

8059468: Fix PrintCodeCache output changed by JDK-8059137 Summary: 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
author thartmann
date Tue, 30 Sep 2014 15:44:43 +0200
parents 4e1761669426
children f5d04f448585 96aa76b27b9c fa5ea7ff078d
files hotspot/src/cpu/ppc/vm/c2_globals_ppc.hpp hotspot/src/cpu/sparc/vm/c1_globals_sparc.hpp hotspot/src/cpu/sparc/vm/c2_globals_sparc.hpp hotspot/src/cpu/x86/vm/c1_globals_x86.hpp hotspot/src/cpu/x86/vm/c2_globals_x86.hpp hotspot/src/cpu/zero/vm/shark_globals_zero.hpp hotspot/src/share/vm/code/codeBlob.cpp hotspot/src/share/vm/code/codeBlob.hpp hotspot/src/share/vm/code/codeCache.cpp hotspot/src/share/vm/code/codeCache.hpp hotspot/src/share/vm/code/vtableStubs.cpp hotspot/src/share/vm/interpreter/interpreterRuntime.cpp hotspot/src/share/vm/opto/compile.cpp hotspot/src/share/vm/opto/output.cpp hotspot/src/share/vm/runtime/arguments.cpp hotspot/src/share/vm/runtime/globals.hpp hotspot/src/share/vm/runtime/sharedRuntime.cpp hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java hotspot/test/serviceability/dcmd/CodeCacheTest.java
diffstat 19 files changed, 81 insertions(+), 81 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/cpu/ppc/vm/c2_globals_ppc.hpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/cpu/ppc/vm/c2_globals_ppc.hpp	Tue Sep 30 15:44:43 2014 +0200
@@ -81,7 +81,7 @@
 define_pd_global(intx, ReservedCodeCacheSize,        256*M);
 define_pd_global(intx, NonProfiledCodeHeapSize,      125*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);
 
 // Ergonomics related flags
--- a/hotspot/src/cpu/sparc/vm/c1_globals_sparc.hpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/cpu/sparc/vm/c1_globals_sparc.hpp	Tue Sep 30 15:44:43 2014 +0200
@@ -49,7 +49,7 @@
 define_pd_global(intx, ReservedCodeCacheSize,        32*M );
 define_pd_global(intx, NonProfiledCodeHeapSize,      13*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(uintx, CodeCacheMinBlockLength,     1);
 define_pd_global(uintx, CodeCacheMinimumUseSpace,    400*K);
--- a/hotspot/src/cpu/sparc/vm/c2_globals_sparc.hpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/cpu/sparc/vm/c2_globals_sparc.hpp	Tue Sep 30 15:44:43 2014 +0200
@@ -76,7 +76,7 @@
 define_pd_global(intx, ReservedCodeCacheSize,        48*M);
 define_pd_global(intx, NonProfiledCodeHeapSize,      21*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);
 
 // Ergonomics related flags
@@ -87,7 +87,7 @@
 define_pd_global(intx, ReservedCodeCacheSize,        32*M);
 define_pd_global(intx, NonProfiledCodeHeapSize,      13*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);
 // Ergonomics related flags
 define_pd_global(uint64_t,MaxRAM,                    4ULL*G);
--- a/hotspot/src/cpu/x86/vm/c1_globals_x86.hpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/cpu/x86/vm/c1_globals_x86.hpp	Tue Sep 30 15:44:43 2014 +0200
@@ -49,7 +49,7 @@
 define_pd_global(intx, ReservedCodeCacheSize,        32*M );
 define_pd_global(intx, NonProfiledCodeHeapSize,      13*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(intx, CodeCacheExpansionSize,       32*K );
 define_pd_global(uintx, CodeCacheMinBlockLength,     1);
--- a/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp	Tue Sep 30 15:44:43 2014 +0200
@@ -86,7 +86,7 @@
 define_pd_global(intx, ReservedCodeCacheSize,        48*M);
 define_pd_global(intx, NonProfiledCodeHeapSize,      21*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, CodeCacheMinimumUseSpace,    400*K);
 
--- a/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp	Tue Sep 30 15:44:43 2014 +0200
@@ -55,7 +55,7 @@
 define_pd_global(intx,     ReservedCodeCacheSize,        32*M );
 define_pd_global(intx,     NonProfiledCodeHeapSize,      13*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(intx,     CodeCacheExpansionSize,       32*K );
 define_pd_global(uintx,    CodeCacheMinBlockLength,      1    );
--- a/hotspot/src/share/vm/code/codeBlob.cpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/share/vm/code/codeBlob.cpp	Tue Sep 30 15:44:43 2014 +0200
@@ -230,7 +230,7 @@
 }
 
 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) {
@@ -336,14 +336,14 @@
 
 
 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");
   return p;
 }
 
 // operator new shared by all singletons:
 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");
   return p;
 }
--- a/hotspot/src/share/vm/code/codeBlob.hpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/share/vm/code/codeBlob.hpp	Tue Sep 30 15:44:43 2014 +0200
@@ -36,7 +36,7 @@
   enum {
     MethodNonProfiled   = 0,    // Execution level 1 and 4 (non-profiled) nmethods (including native 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)
     NumTypes            = 4     // Number of CodeBlobTypes
   };
--- a/hotspot/src/share/vm/code/codeCache.cpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/share/vm/code/codeCache.cpp	Tue Sep 30 15:44:43 2014 +0200
@@ -158,23 +158,23 @@
 #endif
 
   // 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)) {
-    // Increase default NonMethodCodeHeapSize to account for compiler buffers
-    FLAG_SET_ERGO(uintx, NonMethodCodeHeapSize, NonMethodCodeHeapSize + code_buffers_size);
+    // Increase default NonNMethodCodeHeapSize to account for compiler buffers
+    FLAG_SET_ERGO(uintx, NonNMethodCodeHeapSize, NonNMethodCodeHeapSize + code_buffers_size);
 
-    // Check if we have enough space for the non-method code heap
-    if (ReservedCodeCacheSize > NonMethodCodeHeapSize) {
-      // Use the default value for NonMethodCodeHeapSize and one half of the
+    // Check if we have enough space for the non-nmethod code heap
+    if (ReservedCodeCacheSize > NonNMethodCodeHeapSize) {
+      // Use the default value for NonNMethodCodeHeapSize and one half of the
       // 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 non_profiled_size = remaining_size - profiled_size;
       FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, profiled_size);
       FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, non_profiled_size);
     } else {
-      // Use all space for the non-method heap and set other heaps to minimal size
-      FLAG_SET_ERGO(uintx, NonMethodCodeHeapSize, ReservedCodeCacheSize - os::vm_page_size() * 2);
+      // Use all space for the non-nmethod heap and set other heaps to minimal size
+      FLAG_SET_ERGO(uintx, NonNMethodCodeHeapSize, ReservedCodeCacheSize - os::vm_page_size() * 2);
       FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, os::vm_page_size());
       FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, os::vm_page_size());
     }
@@ -185,21 +185,21 @@
     FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, NonProfiledCodeHeapSize + ProfiledCodeHeapSize);
     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)) {
-    FLAG_SET_ERGO(uintx, NonMethodCodeHeapSize, NonMethodCodeHeapSize + NonProfiledCodeHeapSize);
+    FLAG_SET_ERGO(uintx, NonNMethodCodeHeapSize, NonNMethodCodeHeapSize + NonProfiledCodeHeapSize);
     FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, 0);
   }
 
   // Make sure we have enough space for VM internal code
   uint min_code_cache_size = (CodeCacheMinimumUseSpace DEBUG_ONLY(* 3)) + CodeCacheMinimumFreeSpace;
-  if (NonMethodCodeHeapSize < (min_code_cache_size + code_buffers_size)) {
-    vm_exit_during_initialization("Not enough space in non-method code heap to run VM.");
+  if (NonNMethodCodeHeapSize < (min_code_cache_size + code_buffers_size)) {
+    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
-  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 non_profiled_size  = ReservedCodeSpace::allocation_align_size_up(NonProfiledCodeHeapSize);
 
@@ -213,7 +213,7 @@
   // ---------- high -----------
   //    Non-profiled nmethods
   //      Profiled nmethods
-  //         Non-methods
+  //         Non-nmethods
   // ---------- low ------------
   ReservedCodeSpace rs = reserve_heap_memory(non_profiled_size + profiled_size + non_method_size);
   ReservedSpace non_method_space    = rs.first_part(non_method_size);
@@ -221,12 +221,12 @@
   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);
+  // Non-nmethods (stubs, adapters, ...)
+  add_heap(non_method_space, "CodeHeap 'non-nmethods'", init_non_method_size, CodeBlobType::NonNMethod);
   // 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
-  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) {
@@ -257,13 +257,13 @@
   } else if ((Arguments::mode() == Arguments::_int) ||
              (TieredStopAtLevel == CompLevel_none)) {
     // 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)) {
     // Tiered compilation: use all code heaps
     return (code_blob_type < CodeBlobType::All);
   } else {
-    // No TieredCompilation: we only need the non-method and non-profiled code heap
-    return (code_blob_type == CodeBlobType::NonMethod) ||
+    // No TieredCompilation: we only need the non-nmethod and non-profiled code heap
+    return (code_blob_type == CodeBlobType::NonNMethod) ||
            (code_blob_type == CodeBlobType::MethodNonProfiled);
   }
 }
@@ -355,8 +355,8 @@
     if (cb != NULL) break;
     if (!heap->expand_by(CodeCacheExpansionSize)) {
       // Expansion failed
-      if (SegmentedCodeCache && (code_blob_type == CodeBlobType::NonMethod)) {
-        // Fallback solution: Store non-method code in the non-profiled code heap
+      if (SegmentedCodeCache && (code_blob_type == CodeBlobType::NonNMethod)) {
+        // Fallback solution: Store non-nmethod code in the non-profiled code heap
         return allocate(size, CodeBlobType::MethodNonProfiled, is_critical);
       }
       return NULL;
@@ -366,7 +366,7 @@
       if (SegmentedCodeCache) {
         tty->print("%s", heap->name());
       } else {
-        tty->print("Code Cache");
+        tty->print("CodeCache");
       }
       tty->print_cr(" extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)",
                     (intptr_t)heap->low_boundary(), (intptr_t)heap->high(),
@@ -820,7 +820,7 @@
   } else {
     // Use a single code heap
     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
@@ -1241,7 +1241,7 @@
     if (SegmentedCodeCache) {
       st->print("%s:", heap->name());
     } else {
-      st->print("Code Cache:");
+      st->print("CodeCache:");
     }
     st->print_cr(" size=" SIZE_FORMAT "Kb used=" SIZE_FORMAT
                  "Kb max_used=" SIZE_FORMAT "Kb free=" SIZE_FORMAT "Kb",
--- a/hotspot/src/share/vm/code/codeCache.hpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/share/vm/code/codeCache.hpp	Tue Sep 30 15:44:43 2014 +0200
@@ -41,14 +41,14 @@
 // The CodeCache consists of one or more CodeHeaps, each of which contains
 // CodeBlobs of a specific CodeBlobType. Currently heaps for the following
 // 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
 //    executed at level 2 or 3
 //  - Non-Profiled nmethods: nmethods that are not profiled, i.e., those
 //    executed at level 1 or 4 and native methods
 //  - 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.
 //
 // Depending on the availability of compilers and TieredCompilation there
--- a/hotspot/src/share/vm/code/vtableStubs.cpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/share/vm/code/vtableStubs.cpp	Tue Sep 30 15:44:43 2014 +0200
@@ -63,7 +63,7 @@
    // If changing the name, update the other file accordingly.
     BufferBlob* blob = BufferBlob::create("vtable chunks", bytes);
     if (blob == NULL) {
-      CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod);
+      CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
       return NULL;
     }
     _chunk = blob->content_begin();
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Tue Sep 30 15:44:43 2014 +0200
@@ -1077,7 +1077,7 @@
 address SignatureHandlerLibrary::set_handler_blob() {
   BufferBlob* handler_blob = BufferBlob::create("native signature handlers", blob_size);
   if (handler_blob == NULL) {
-    CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod);
+    CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
     return NULL;
   }
   address handler = handler_blob->code_begin();
--- a/hotspot/src/share/vm/opto/compile.cpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/share/vm/opto/compile.cpp	Tue Sep 30 15:44:43 2014 +0200
@@ -535,7 +535,7 @@
     if (scratch_buffer_blob() == NULL) {
       // Let CompilerBroker disable further compilations.
       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;
     }
   }
--- a/hotspot/src/share/vm/opto/output.cpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/share/vm/opto/output.cpp	Tue Sep 30 15:44:43 2014 +0200
@@ -1166,7 +1166,7 @@
   // Have we run out of code space?
   if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) {
     C->record_failure("CodeCache is full");
-    CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod);
+    CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
     return NULL;
   }
   // Configure the code buffer.
@@ -1491,7 +1491,7 @@
       cb->insts()->maybe_expand_to_ensure_remaining(MAX_inst_size);
       if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) {
         C->record_failure("CodeCache is full");
-        CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod);
+        CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
         return;
       }
 
@@ -1648,7 +1648,7 @@
   // One last check for failed CodeBuffer::expand:
   if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) {
     C->record_failure("CodeCache is full");
-    CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod);
+    CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
     return;
   }
 
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Tue Sep 30 15:44:43 2014 +0200
@@ -1152,19 +1152,19 @@
   if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M) {
     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)) {
-      FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, ProfiledCodeHeapSize * 5 + NonMethodCodeHeapSize * 2);
+      FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, ProfiledCodeHeapSize * 5 + NonNMethodCodeHeapSize * 2);
     }
     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
-    if ((NonMethodCodeHeapSize + NonProfiledCodeHeapSize + ProfiledCodeHeapSize) != ReservedCodeCacheSize) {
+    if ((NonNMethodCodeHeapSize + NonProfiledCodeHeapSize + ProfiledCodeHeapSize) != ReservedCodeCacheSize) {
       jio_fprintf(defaultStream::error_stream(),
-                  "Invalid code heap sizes: NonMethodCodeHeapSize(%dK) + ProfiledCodeHeapSize(%dK) + NonProfiledCodeHeapSize(%dK) = %dK. Must be equal to ReservedCodeCacheSize = %uK.\n",
-                  NonMethodCodeHeapSize/K, ProfiledCodeHeapSize/K, NonProfiledCodeHeapSize/K,
-                  (NonMethodCodeHeapSize + ProfiledCodeHeapSize + NonProfiledCodeHeapSize)/K, ReservedCodeCacheSize/K);
+                  "Invalid code heap sizes: NonNMethodCodeHeapSize(%dK) + ProfiledCodeHeapSize(%dK) + NonProfiledCodeHeapSize(%dK) = %dK. Must be equal to ReservedCodeCacheSize = %uK.\n",
+                  NonNMethodCodeHeapSize/K, ProfiledCodeHeapSize/K, NonProfiledCodeHeapSize/K,
+                  (NonNMethodCodeHeapSize + ProfiledCodeHeapSize + NonProfiledCodeHeapSize)/K, ReservedCodeCacheSize/K);
       vm_exit(1);
     }
   }
@@ -2502,17 +2502,17 @@
                 "Invalid ReservedCodeCacheSize=%dM. Must be at most %uM.\n", ReservedCodeCacheSize/M,
                 (2*G)/M);
     status = false;
-  } else if (NonMethodCodeHeapSize < min_code_cache_size){
+  } else if (NonNMethodCodeHeapSize < min_code_cache_size){
     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);
     status = false;
-  } else if ((!FLAG_IS_DEFAULT(NonMethodCodeHeapSize) || !FLAG_IS_DEFAULT(ProfiledCodeHeapSize) || !FLAG_IS_DEFAULT(NonProfiledCodeHeapSize))
-             && (NonMethodCodeHeapSize + NonProfiledCodeHeapSize + ProfiledCodeHeapSize) != ReservedCodeCacheSize) {
+  } else if ((!FLAG_IS_DEFAULT(NonNMethodCodeHeapSize) || !FLAG_IS_DEFAULT(ProfiledCodeHeapSize) || !FLAG_IS_DEFAULT(NonProfiledCodeHeapSize))
+             && (NonNMethodCodeHeapSize + NonProfiledCodeHeapSize + ProfiledCodeHeapSize) != ReservedCodeCacheSize) {
     jio_fprintf(defaultStream::error_stream(),
-                "Invalid code heap sizes: NonMethodCodeHeapSize(%dK) + ProfiledCodeHeapSize(%dK) + NonProfiledCodeHeapSize(%dK) = %dK. Must be equal to ReservedCodeCacheSize = %uK.\n",
-                NonMethodCodeHeapSize/K, ProfiledCodeHeapSize/K, NonProfiledCodeHeapSize/K,
-                (NonMethodCodeHeapSize + ProfiledCodeHeapSize + NonProfiledCodeHeapSize)/K, ReservedCodeCacheSize/K);
+                "Invalid code heap sizes: NonNMethodCodeHeapSize(%dK) + ProfiledCodeHeapSize(%dK) + NonProfiledCodeHeapSize(%dK) = %dK. Must be equal to ReservedCodeCacheSize = %uK.\n",
+                NonNMethodCodeHeapSize/K, ProfiledCodeHeapSize/K, NonProfiledCodeHeapSize/K,
+                (NonNMethodCodeHeapSize + ProfiledCodeHeapSize + NonProfiledCodeHeapSize)/K, ReservedCodeCacheSize/K);
     status = false;
   }
 
@@ -2938,17 +2938,17 @@
         return JNI_EINVAL;
       }
       FLAG_SET_CMDLINE(uintx, ReservedCodeCacheSize, (uintx)long_ReservedCodeCacheSize);
-      // -XX:NonMethodCodeHeapSize=
-    } else if (match_option(option, "-XX:NonMethodCodeHeapSize=", &tail)) {
-      julong long_NonMethodCodeHeapSize = 0;
-
-      ArgsRange errcode = parse_memory_size(tail, &long_NonMethodCodeHeapSize, 1);
+      // -XX:NonNMethodCodeHeapSize=
+    } else if (match_option(option, "-XX:NonNMethodCodeHeapSize=", &tail)) {
+      julong long_NonNMethodCodeHeapSize = 0;
+
+      ArgsRange errcode = parse_memory_size(tail, &long_NonNMethodCodeHeapSize, 1);
       if (errcode != arg_in_range) {
         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;
       }
-      FLAG_SET_CMDLINE(uintx, NonMethodCodeHeapSize, (uintx)long_NonMethodCodeHeapSize);
+      FLAG_SET_CMDLINE(uintx, NonNMethodCodeHeapSize, (uintx)long_NonNMethodCodeHeapSize);
       // -XX:ProfiledCodeHeapSize=
     } else if (match_option(option, "-XX:ProfiledCodeHeapSize=", &tail)) {
       julong long_ProfiledCodeHeapSize = 0;
--- a/hotspot/src/share/vm/runtime/globals.hpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Tue Sep 30 15:44:43 2014 +0200
@@ -188,7 +188,7 @@
 define_pd_global(intx, ReservedCodeCacheSize,        32*M);
 define_pd_global(intx, NonProfiledCodeHeapSize,      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, CodeCacheMinBlockLength,      1);
@@ -3370,8 +3370,8 @@
   product_pd(uintx, ProfiledCodeHeapSize,                                   \
           "Size of code heap with profiled methods (in bytes)")             \
                                                                             \
-  product_pd(uintx, NonMethodCodeHeapSize,                                  \
-          "Size of code heap with non-methods (in bytes)")                  \
+  product_pd(uintx, NonNMethodCodeHeapSize,                                 \
+          "Size of code heap with non-nmethods (in bytes)")                 \
                                                                             \
   product(uintx, CodeCacheMinimumFreeSpace, 500*K,                          \
           "When less than X space left, we stop compiling")                 \
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Tue Sep 30 15:44:43 2014 +0200
@@ -2422,7 +2422,7 @@
       // Ought to log this but compile log is only per compile thread
       // and we're some non descript Java thread.
       MutexUnlocker mu(AdapterHandlerLibrary_lock);
-      CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod);
+      CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
       return NULL; // Out of CodeCache space
     }
     entry->relocate(new_adapter->content_begin());
--- a/hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java	Tue Sep 30 15:44:43 2014 +0200
@@ -32,7 +32,7 @@
  */
 public class CheckSegmentedCodeCache {
   // 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 NON_PROFILED = "CodeHeap 'non-profiled nmethods'";
 
@@ -40,7 +40,7 @@
     OutputAnalyzer out = new OutputAnalyzer(pb.start());
     if (enabled) {
       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);
       } catch (RuntimeException e) {
         // TieredCompilation is disabled in a client VM
@@ -111,14 +111,14 @@
                                                "-XX:+PrintCodeCache", "-version");
     verifyCodeHeapNotExists(pb, PROFILED);
 
-    // Fails with too small non-method code heap size
-    pb = ProcessTools.createJavaProcessBuilder("-XX:NonMethodCodeHeapSize=100K");
-    failsWith(pb, "Invalid NonMethodCodeHeapSize");
+    // Fails with too small non-nmethod code heap size
+    pb = ProcessTools.createJavaProcessBuilder("-XX:NonNMethodCodeHeapSize=100K");
+    failsWith(pb, "Invalid NonNMethodCodeHeapSize");
 
     // Fails if code heap sizes do not add up
     pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
                                                "-XX:ReservedCodeCacheSize=10M",
-                                               "-XX:NonMethodCodeHeapSize=5M",
+                                               "-XX:NonNMethodCodeHeapSize=5M",
                                                "-XX:ProfiledCodeHeapSize=5M",
                                                "-XX:NonProfiledCodeHeapSize=5M");
     failsWith(pb, "Invalid code heap sizes");
@@ -127,6 +127,6 @@
     pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
                                                "-XX:ReservedCodeCacheSize=1700K",
                                                "-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");
   }
 }
--- a/hotspot/test/serviceability/dcmd/CodeCacheTest.java	Tue Sep 30 09:06:39 2014 +0200
+++ b/hotspot/test/serviceability/dcmd/CodeCacheTest.java	Tue Sep 30 15:44:43 2014 +0200
@@ -52,7 +52,7 @@
      *
      * 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]
      * CodeHeap 'profiled nmethods': size=120036Kb used=8Kb max_used=8Kb free=120027Kb
      *  bounds [0x00007fa0f158e000, 0x00007fa0f17fe000, 0x00007fa0f8ac7000]
@@ -95,7 +95,7 @@
           // Tiered compilation: use all segments
           segmentsCount = 3;
         } else {
-          // No TieredCompilation: only non-method and non-profiled segment
+          // No TieredCompilation: only non-nmethod and non-profiled segment
           segmentsCount = 2;
         }