OSDN Git Service

Make run test 572-checker-array-get-regression gcstress friendly.
authorRoland Levillain <rpl@google.com>
Thu, 11 Feb 2016 12:50:41 +0000 (12:50 +0000)
committerRoland Levillain <rpl@google.com>
Thu, 11 Feb 2016 12:50:41 +0000 (12:50 +0000)
The large array allocated in
test/572-checker-array-get-regression/src/Main.java used to
be too big for the small heap used in gcstress mode.  Use a
smaller array size that however still exercises the initial
issue checked by this regression test.

Bug: 26817006
Bug: 12687968
Change-Id: Id7080a18007cad9b5d4ac31b45f7df46213a908e

test/572-checker-array-get-regression/expected.txt
test/572-checker-array-get-regression/info.txt
test/572-checker-array-get-regression/src/Main.java

index 023d5b0..d06feee 100644 (file)
@@ -1,3 +1,3 @@
 Regression test for the ARM64 Baker's read barrier fast path compiler
-instrumentatin of array loads with a large constant index, where we
+instrumentation of array loads with a large constant index, where we
 used to require too many scratch (temporary) registers.
index 1392215..a9bf326 100644 (file)
@@ -22,9 +22,9 @@ public class Main {
 
   /// CHECK-START: java.lang.Integer Main.test() ssa_builder (after)
   /// CHECK-DAG:     <<Method:[ij]\d+>>    CurrentMethod
-  /// CHECK-DAG:     <<Const2P20:i\d+>>    IntConstant 1048576
+  /// CHECK-DAG:     <<Const2P19:i\d+>>    IntConstant 524288
   /// CHECK-DAG:     <<ConstM1:i\d+>>      IntConstant -1
-  /// CHECK-DAG:     <<Array:l\d+>>        NewArray [<<Const2P20>>,<<Method>>]
+  /// CHECK-DAG:     <<Array:l\d+>>        NewArray [<<Const2P19>>,<<Method>>]
   /// CHECK-DAG:     <<NullCheck1:l\d+>>   NullCheck [<<Array>>]
   /// CHECK-DAG:     <<Length1:i\d+>>      ArrayLength [<<NullCheck1>>]
   /// CHECK-DAG:     <<Index:i\d+>>        Add [<<Length1>>,<<ConstM1>>]
@@ -34,16 +34,17 @@ public class Main {
   /// CHECK-DAG:     <<LastElement:l\d+>>  ArrayGet [<<NullCheck2>>,<<BoundsCheck>>]
   /// CHECK-DAG:                           Return [<<LastElement>>]
 
+
   /// CHECK-START: java.lang.Integer Main.test() register (before)
   /// CHECK-DAG:     <<Method:[ij]\d+>>    CurrentMethod
-  /// CHECK-DAG:     <<Const2P20:i\d+>>    IntConstant 1048576
-  /// CHECK-DAG:     <<Const2P20M1:i\d+>>  IntConstant 1048575
-  /// CHECK-DAG:     <<Array:l\d+>>        NewArray [<<Const2P20>>,<<Method>>]
-  /// CHECK-DAG:     <<LastElement:l\d+>>  ArrayGet [<<Array>>,<<Const2P20M1>>]
+  /// CHECK-DAG:     <<Const2P19:i\d+>>    IntConstant 524288
+  /// CHECK-DAG:     <<Const2P19M1:i\d+>>  IntConstant 524287
+  /// CHECK-DAG:     <<Array:l\d+>>        NewArray [<<Const2P19>>,<<Method>>]
+  /// CHECK-DAG:     <<LastElement:l\d+>>  ArrayGet [<<Array>>,<<Const2P19M1>>]
   /// CHECK-DAG:                           Return [<<LastElement>>]
 
   public static Integer test() {
-    Integer[] integers = new Integer[1024 * 1024];
+    Integer[] integers = new Integer[1 << 19];
     initIntegerArray(integers);
     // Array load with a large constant index (after constant folding
     // and bounds check elimination).