< prev index next >

test/hotspot/jtreg/compiler/gcbarriers/UnsafeIntrinsicsTest.java

Print this page




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8059022
  27  * @modules java.base/jdk.internal.misc:+open
  28  * @summary Validate barriers after Unsafe getReference, CAS and swap (GetAndSet)
  29  * @requires vm.gc.Z & !vm.graal.enabled
  30  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+UnlockDiagnosticVMOptions -XX:+ZUnmapBadViews -XX:ZCollectionInterval=1 -XX:-CreateCoredumpOnCrash -XX:CompileCommand=dontinline,*::mergeImpl* compiler.gcbarriers.UnsafeIntrinsicsTest
  31  */
  32 
  33 package compiler.gcbarriers;
  34 
  35 import java.lang.reflect.Field;
  36 import java.util.ArrayList;
  37 import java.util.Random;
  38 import sun.misc.Unsafe;
  39 
  40 public class UnsafeIntrinsicsTest {
  41 
  42     /*
  43      * This test triggers the loadbarriers by allocating a lot, keeping the objects alive and then
  44      * letting them die in a way that maximizes fragmentation.
  45      *
  46      * All subtests (OperationType's) could run in parallel.
  47      */
  48 
  49     static int node_count = 133700;
  50     static int thread_count = 4;




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8059022
  27  * @modules java.base/jdk.internal.misc:+open
  28  * @summary Validate barriers after Unsafe getReference, CAS and swap (GetAndSet)
  29  * @requires vm.gc.Z & !vm.graal.enabled
  30  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+UnlockDiagnosticVMOptions -XX:+ZVerifyViews -XX:ZCollectionInterval=1 -XX:-CreateCoredumpOnCrash -XX:CompileCommand=dontinline,*::mergeImpl* compiler.gcbarriers.UnsafeIntrinsicsTest
  31  */
  32 
  33 package compiler.gcbarriers;
  34 
  35 import java.lang.reflect.Field;
  36 import java.util.ArrayList;
  37 import java.util.Random;
  38 import sun.misc.Unsafe;
  39 
  40 public class UnsafeIntrinsicsTest {
  41 
  42     /*
  43      * This test triggers the loadbarriers by allocating a lot, keeping the objects alive and then
  44      * letting them die in a way that maximizes fragmentation.
  45      *
  46      * All subtests (OperationType's) could run in parallel.
  47      */
  48 
  49     static int node_count = 133700;
  50     static int thread_count = 4;


< prev index next >