author | lana |
Thu, 12 May 2016 15:15:02 +0000 | |
changeset 37915 | be4ff50b6cb6 |
parent 37192 | 427945788462 |
permissions | -rw-r--r-- |
37192
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
1 |
/* |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
2 |
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
4 |
* |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
8 |
* |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
13 |
* accompanied this code). |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
14 |
* |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
18 |
* |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
21 |
* questions. |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
22 |
*/ |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
23 |
|
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
24 |
/** |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
25 |
* @test |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
26 |
* @bug 8060463 |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
27 |
* @summary Verify that objects promoted from eden space to survivor space |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
28 |
* with large values for SurvivorAlignmentInBytes succeed. |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
29 |
* @requires vm.opt.ExplicitGCInvokesConcurrent != true |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
30 |
* @run main/othervm -Xmx128m |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
31 |
* -XX:+UnlockExperimentalVMOptions |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
32 |
* -XX:SurvivorAlignmentInBytes=8 -XX:SurvivorRatio=1 |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
33 |
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
34 |
* TestPromotionLABLargeSurvivorAlignment |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
35 |
* @run main/othervm -Xmx128m |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
36 |
* -XX:+UnlockExperimentalVMOptions |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
37 |
* -XX:SurvivorAlignmentInBytes=16 -XX:SurvivorRatio=1 |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
38 |
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
39 |
* TestPromotionLABLargeSurvivorAlignment |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
40 |
* @run main/othervm -Xmx128m |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
41 |
* -XX:+UnlockExperimentalVMOptions |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
42 |
* -XX:SurvivorAlignmentInBytes=512 -XX:SurvivorRatio=1 |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
43 |
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
44 |
* TestPromotionLABLargeSurvivorAlignment |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
45 |
* @run main/othervm -Xmx128m |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
46 |
* -XX:+UnlockExperimentalVMOptions |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
47 |
* -XX:SurvivorAlignmentInBytes=1k -XX:SurvivorRatio=1 |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
48 |
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
49 |
* TestPromotionLABLargeSurvivorAlignment |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
50 |
* @run main/othervm -Xmx128m |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
51 |
* -XX:+UnlockExperimentalVMOptions |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
52 |
* -XX:SurvivorAlignmentInBytes=4k -XX:SurvivorRatio=1 |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
53 |
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
54 |
* TestPromotionLABLargeSurvivorAlignment |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
55 |
* @run main/othervm -Xmx128m |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
56 |
* -XX:+UnlockExperimentalVMOptions |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
57 |
* -XX:SurvivorAlignmentInBytes=16k -XX:SurvivorRatio=1 |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
58 |
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
59 |
* TestPromotionLABLargeSurvivorAlignment |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
60 |
*/ |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
61 |
public class TestPromotionLABLargeSurvivorAlignment { |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
62 |
public static void main(String args[]) { |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
63 |
Object garbage[] = new Object[1000000]; |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
64 |
for (int i = 0; i < garbage.length; i++) { |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
65 |
garbage[i] = new byte[0]; |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
66 |
} |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
67 |
for (int i = 0; i < 2; i++) { |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
68 |
System.gc(); |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
69 |
} |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
70 |
} |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
71 |
} |
427945788462
8060463: ParNew: SurvivorAlignmentInBytes greater then YoungPLABSize cause assert(obj != NULL || plab->words_remaining() < word_sz) failed: Else should have been able to allocate
jmasa
parents:
diff
changeset
|
72 |