8059137: MemoryPoolMXBeans for different code heaps should contain 'Code heap' in their names
authorthartmann
Tue, 30 Sep 2014 09:06:39 +0200
changeset 26918 4e1761669426
parent 26917 c3574c0b2da0
child 26919 361b4b4c92c0
8059137: MemoryPoolMXBeans for different code heaps should contain 'Code heap' in their names Summary: The segmented code cache implementation registers a memory pool for each code heap. To be consistent with the "non-segmented" output, the names of these pools should contain the word "code heap". Reviewed-by: kvn, sla, fzhinkin
hotspot/src/share/vm/code/codeCache.cpp
--- a/hotspot/src/share/vm/code/codeCache.cpp	Mon Sep 29 11:46:05 2014 -0700
+++ b/hotspot/src/share/vm/code/codeCache.cpp	Tue Sep 30 09:06:39 2014 +0200
@@ -222,11 +222,11 @@
   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);
+  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, "profiled nmethods", init_profiled_size, CodeBlobType::MethodProfiled);
+  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, "non-profiled nmethods", init_non_profiled_size, CodeBlobType::MethodNonProfiled);
+  add_heap(non_profiled_space, "Code Heap 'non-profiled nmethods'", init_non_profiled_size, CodeBlobType::MethodNonProfiled);
 }
 
 ReservedCodeSpace CodeCache::reserve_heap_memory(size_t size) {
@@ -364,9 +364,9 @@
     if (PrintCodeCacheExtension) {
       ResourceMark rm;
       if (SegmentedCodeCache) {
-        tty->print("Code heap '%s'", heap->name());
+        tty->print("%s", heap->name());
       } else {
-        tty->print("Code cache");
+        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(),
@@ -820,7 +820,7 @@
   } else {
     // Use a single code heap
     ReservedCodeSpace rs = reserve_heap_memory(ReservedCodeCacheSize);
-    add_heap(rs, "Code heap", InitialCodeCacheSize, CodeBlobType::All);
+    add_heap(rs, "Code Cache", InitialCodeCacheSize, CodeBlobType::All);
   }
 
   // Initialize ICache flush mechanism
@@ -1006,7 +1006,7 @@
     // 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("%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 {
@@ -1090,7 +1090,7 @@
   int i = 0;
   FOR_ALL_HEAPS(heap) {
     if (SegmentedCodeCache && Verbose) {
-      tty->print_cr("-- Code heap '%s' --", (*heap)->name());
+      tty->print_cr("-- %s --", (*heap)->name());
     }
     FOR_ALL_BLOBS(cb, *heap) {
       total++;
@@ -1239,9 +1239,9 @@
     CodeHeap* heap = (*heap_iterator);
     size_t total = (heap->high_boundary() - heap->low_boundary());
     if (SegmentedCodeCache) {
-      st->print("CodeHeap '%s':", heap->name());
+      st->print("%s:", heap->name());
     } else {
-      st->print("CodeCache:");
+      st->print("Code Cache:");
     }
     st->print_cr(" size=" SIZE_FORMAT "Kb used=" SIZE_FORMAT
                  "Kb max_used=" SIZE_FORMAT "Kb free=" SIZE_FORMAT "Kb",