test/gc/g1/TestHumongousCodeCacheRoots.java

Print this page
rev 7249 : 8062537: [TESTBUG] Conflicting GC combinations in hotspot tests


  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  * @key regression
  27  * @key gc
  28  * @bug 8027756
  29  * @library /testlibrary /testlibrary/whitebox
  30  * @build TestHumongousCodeCacheRoots

  31  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  32  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  33  * @summary Humongous objects may have references from the code cache
  34  * @run main TestHumongousCodeCacheRoots
  35 */
  36 
  37 import com.oracle.java.testlibrary.*;
  38 import sun.hotspot.WhiteBox;
  39 
  40 import java.util.ArrayList;
  41 import java.util.Arrays;
  42 
  43 class TestHumongousCodeCacheRootsHelper {
  44 
  45     static final int n = 1000000;
  46     static final int[] AA = new int[n];
  47     static final int[] BB = new int[n];
  48 
  49     public static void main(String args[]) throws Exception {
  50         // do some work so that the compiler compiles this method, inlining the




  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  * @key regression
  27  * @key gc
  28  * @bug 8027756
  29  * @library /testlibrary /testlibrary/whitebox
  30  * @build TestHumongousCodeCacheRoots
  31  * @requires vm.gc=="G1" | vm.gc=="null"
  32  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  33  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  34  * @summary Humongous objects may have references from the code cache
  35  * @run main TestHumongousCodeCacheRoots
  36 */
  37 
  38 import com.oracle.java.testlibrary.*;
  39 import sun.hotspot.WhiteBox;
  40 
  41 import java.util.ArrayList;
  42 import java.util.Arrays;
  43 
  44 class TestHumongousCodeCacheRootsHelper {
  45 
  46     static final int n = 1000000;
  47     static final int[] AA = new int[n];
  48     static final int[] BB = new int[n];
  49 
  50     public static void main(String args[]) throws Exception {
  51         // do some work so that the compiler compiles this method, inlining the