< prev index next >

src/share/vm/c1/c1_LinearScan.cpp

Print this page
rev 10979 : 8140594: Various minor code improvements (compiler)

@@ -5519,11 +5519,12 @@
         max_reg = i;
       }
     }
   }
 
-  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;
   }
 
   return max_reg;
 }

@@ -6495,12 +6496,13 @@
 
     for (int i = 0; i < number_of_counters; i++) {
       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("           ");
         }
 
         if (_counters_max[i] >= 0) {
< prev index next >