Merge
authorehelin
Mon, 18 Jan 2016 15:11:47 +0100
changeset 35522 b0d68a5fc22b
parent 35520 0efb779f41a5 (current diff)
parent 35521 3cb32806ed1d (diff)
child 35525 4ec07c154898
child 35526 b0a52e3dd474
Merge
--- a/hotspot/src/share/vm/gc/shared/collectorPolicy.cpp	Mon Jan 18 09:14:58 2016 +0100
+++ b/hotspot/src/share/vm/gc/shared/collectorPolicy.cpp	Mon Jan 18 15:11:47 2016 +0100
@@ -303,7 +303,7 @@
 
   // Make sure NewSize allows an old generation to fit even if set on the command line
   if (FLAG_IS_CMDLINE(NewSize) && NewSize >= _initial_heap_byte_size) {
-    warning("NewSize was set larger than initial heap size, will use initial heap size.");
+    log_warning(gc, ergo)("NewSize was set larger than initial heap size, will use initial heap size.");
     NewSize = bound_minus_alignment(NewSize, _initial_heap_byte_size);
   }
 
@@ -325,9 +325,9 @@
       // Make sure there is room for an old generation
       size_t smaller_max_new_size = MaxHeapSize - _gen_alignment;
       if (FLAG_IS_CMDLINE(MaxNewSize)) {
-        warning("MaxNewSize (" SIZE_FORMAT "k) is equal to or greater than the entire "
-                "heap (" SIZE_FORMAT "k).  A new max generation size of " SIZE_FORMAT "k will be used.",
-                MaxNewSize/K, MaxHeapSize/K, smaller_max_new_size/K);
+        log_warning(gc, ergo)("MaxNewSize (" SIZE_FORMAT "k) is equal to or greater than the entire "
+                              "heap (" SIZE_FORMAT "k).  A new max generation size of " SIZE_FORMAT "k will be used.",
+                              MaxNewSize/K, MaxHeapSize/K, smaller_max_new_size/K);
       }
       FLAG_SET_ERGO(size_t, MaxNewSize, smaller_max_new_size);
       if (NewSize > MaxNewSize) {
@@ -346,9 +346,9 @@
     // At this point this should only happen if the user specifies a large NewSize and/or
     // a small (but not too small) MaxNewSize.
     if (FLAG_IS_CMDLINE(MaxNewSize)) {
-      warning("NewSize (" SIZE_FORMAT "k) is greater than the MaxNewSize (" SIZE_FORMAT "k). "
-              "A new max generation size of " SIZE_FORMAT "k will be used.",
-              NewSize/K, MaxNewSize/K, NewSize/K);
+      log_warning(gc, ergo)("NewSize (" SIZE_FORMAT "k) is greater than the MaxNewSize (" SIZE_FORMAT "k). "
+                            "A new max generation size of " SIZE_FORMAT "k will be used.",
+                            NewSize/K, MaxNewSize/K, NewSize/K);
     }
     FLAG_SET_ERGO(size_t, MaxNewSize, NewSize);
     _max_young_size = MaxNewSize;
@@ -516,10 +516,10 @@
     // The generation minimums and the overall heap minimum should
     // be within one generation alignment.
     if (_initial_old_size > _max_old_size) {
-      warning("Inconsistency between maximum heap size and maximum "
-          "generation sizes: using maximum heap = " SIZE_FORMAT
-          " -XX:OldSize flag is being ignored",
-          _max_heap_byte_size);
+      log_warning(gc, ergo)("Inconsistency between maximum heap size and maximum "
+                            "generation sizes: using maximum heap = " SIZE_FORMAT
+                            ", -XX:OldSize flag is being ignored",
+                            _max_heap_byte_size);
       _initial_old_size = _max_old_size;
     }
 
@@ -531,8 +531,8 @@
   // differs from JDK8 where the generation sizes have higher priority
   // than the initial heap size.
   if ((_initial_old_size + _initial_young_size) != _initial_heap_byte_size) {
-    warning("Inconsistency between generation sizes and heap size, resizing "
-            "the generations to fit the heap.");
+    log_warning(gc, ergo)("Inconsistency between generation sizes and heap size, resizing "
+                          "the generations to fit the heap.");
 
     size_t desired_young_size = _initial_heap_byte_size - _initial_old_size;
     if (_initial_heap_byte_size < _initial_old_size) {
@@ -697,8 +697,8 @@
     // Give a warning if we seem to be looping forever.
     if ((QueuedAllocationWarningCount > 0) &&
         (try_count % QueuedAllocationWarningCount == 0)) {
-          warning("GenCollectorPolicy::mem_allocate_work retries %d times \n\t"
-                  " size=" SIZE_FORMAT " %s", try_count, size, is_tlab ? "(TLAB)" : "");
+          log_warning(gc, ergo)("GenCollectorPolicy::mem_allocate_work retries %d times,"
+                                " size=" SIZE_FORMAT " %s", try_count, size, is_tlab ? "(TLAB)" : "");
     }
   }
 }
@@ -870,8 +870,8 @@
     loop_count++;
     if ((QueuedAllocationWarningCount > 0) &&
         (loop_count % QueuedAllocationWarningCount == 0)) {
-      warning("satisfy_failed_metadata_allocation() retries %d times \n\t"
-              " size=" SIZE_FORMAT, loop_count, word_size);
+      log_warning(gc, ergo)("satisfy_failed_metadata_allocation() retries %d times,"
+                            " size=" SIZE_FORMAT, loop_count, word_size);
     }
   } while (true);  // Until a GC is done
 }