hotspot/src/share/vm/c1/c1_LinearScan.cpp
changeset 38658 34f9c45625d8
parent 38177 b0c9cb06506b
child 39219 1b33aa56ed18
--- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Mon May 09 23:49:22 2016 -0700
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Tue May 03 12:23:06 2016 +0200
@@ -5521,7 +5521,8 @@
     }
   }
 
-  if (_block_pos[max_reg] <= interval_to || _block_pos[max_reg + 1] <= interval_to) {
+  if (max_reg != any_reg &&
+      (_block_pos[max_reg] <= interval_to || _block_pos[max_reg + 1] <= interval_to)) {
     *need_split = true;
   }
 
@@ -6497,8 +6498,9 @@
       if (_counters_sum[i] > 0 || _counters_max[i] >= 0) {
         tty->print("%25s: %8d", counter_name(i), _counters_sum[i]);
 
-        if (base_counter(i) != invalid_counter) {
-          tty->print("  (%5.1f%%) ", _counters_sum[i] * 100.0 / _counters_sum[base_counter(i)]);
+        LinearScanStatistic::Counter cntr = base_counter(i);
+        if (cntr != invalid_counter) {
+          tty->print("  (%5.1f%%) ", _counters_sum[i] * 100.0 / _counters_sum[cntr]);
         } else {
           tty->print("           ");
         }