Mercurial > hg > truffle
annotate test/gc/concurrentMarkSweep/DisableResizePLAB.java @ 21746:372fd062bb85
improved names of arraycopy snippet counters
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 05 Jun 2015 17:07:45 +0200 |
parents | a28b7832203a |
children |
rev | line source |
---|---|
20631
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
1 /* |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
4 * |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
8 * |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
13 * accompanied this code). |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
14 * |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
18 * |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
21 * questions. |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
22 */ |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
23 |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
24 /* |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
25 * @test DisableResizePLAB |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
26 * @key gc |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
27 * @bug 8060467 |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
28 * @author filipp.zhinkin@oracle.com, john.coomes@oracle.com |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
29 * @summary Run CMS with PLAB resizing disabled and a small OldPLABSize |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
30 * @run main/othervm -XX:+UseConcMarkSweepGC -XX:-ResizePLAB -XX:OldPLABSize=1k -Xmx256m -XX:+PrintGCDetails DisableResizePLAB |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
31 */ |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
32 |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
33 public class DisableResizePLAB { |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
34 public static void main(String args[]) throws Exception { |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
35 Object garbage[] = new Object[1_000]; |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
36 for (int i = 0; i < garbage.length; i++) { |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
37 garbage[i] = new byte[0]; |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
38 } |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
39 long startTime = System.currentTimeMillis(); |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
40 while (System.currentTimeMillis() - startTime < 10_000) { |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
41 Object o = new byte[1024]; |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
42 } |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
43 } |
a28b7832203a
8060467: CMS: small OldPLABSize and -XX:-ResizePLAB cause assert(ResizePLAB || n_blks == OldPLABSize) failed: Error
jcoomes
parents:
diff
changeset
|
44 } |