hotspot/test/gc/8000311/Test8000311.java
author tschatzl
Wed, 11 Sep 2013 10:19:16 +0200
changeset 19982 f1adc8069935
parent 15749 fb9693b302a3
permissions -rw-r--r--
8021823: G1: Concurrent marking crashes with -XX:ObjectAlignmentInBytes>=32 in 64bit VMs Summary: Correctly calculate the initialization value for the shift between object start and bitmap bit in the G1 mark bitmaps. Reviewed-by: tonyp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15749
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
     1
/*
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
     2
 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
     4
 *
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
     7
 * published by the Free Software Foundation.
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
     8
 *
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    13
 * accompanied this code).
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    14
 *
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    18
 *
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    21
 * questions.
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    22
 */
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    23
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    24
/**
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    25
 * @test Test8000311
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    26
 * @key gc
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    27
 * @bug 8000311
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    28
 * @summary G1: ParallelGCThreads==0 broken
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    29
 * @run main/othervm -XX:+UseG1GC -XX:ParallelGCThreads=0 -XX:+ResizePLAB -XX:+ExplicitGCInvokesConcurrent Test8000311
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    30
 * @author filipp.zhinkin@oracle.com
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    31
 */
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    32
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    33
import java.util.*;
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    34
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    35
public class Test8000311 {
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    36
  public static void main(String args[]) {
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    37
    for(int i = 0; i<100; i++) {
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    38
      byte[] garbage = new byte[1000];
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    39
      System.gc();
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    40
    }
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    41
  }
fb9693b302a3 8006628: NEED_TEST for JDK-8002870
johnc
parents:
diff changeset
    42
}