Mercurial > hg > truffle
annotate test/compiler/8010927/Test8010927.java @ 21400:33d3be2548d6
removed cache for intermediate graphs in ReplacementsImpl since graph building inlining is now used
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 15 May 2015 13:45:06 +0200 |
parents | 3f281b313240 |
children |
rev | line source |
---|---|
10324
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
1 /* |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
4 * |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
8 * |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
13 * accompanied this code). |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
14 * |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
18 * |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
21 * questions. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
22 */ |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
23 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
24 /* |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
25 * @test |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
26 * @bug 8010927 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
27 * @summary Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
28 * @library /testlibrary/whitebox /testlibrary |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
29 * @build Test8010927 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
30 * @run main ClassFileInstaller sun.hotspot.WhiteBox |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
31 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -Xmx64m -XX:NewSize=20971520 -XX:MaxNewSize=32m -XX:-UseTLAB -XX:-UseParNewGC -XX:-UseAdaptiveSizePolicy Test8010927 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
32 */ |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
33 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
34 import sun.hotspot.WhiteBox; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
35 import java.lang.reflect.Field; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
36 import sun.misc.Unsafe; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
37 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
38 /** |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
39 * The test creates uncommitted space between oldgen and young gen |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
40 * by specifying MaxNewSize bigger than NewSize. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
41 * NewSize = 20971520 = (512*4K) * 10 for 4k pages |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
42 * Then it tries to execute arraycopy() with elements type check |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
43 * to the array at the end of survive space near unused space. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
44 */ |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
45 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
46 public class Test8010927 { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
47 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
48 private static final Unsafe U; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
49 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
50 static { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
51 try { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
52 Field unsafe = Unsafe.class.getDeclaredField("theUnsafe"); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
53 unsafe.setAccessible(true); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
54 U = (Unsafe) unsafe.get(null); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
55 } catch (Exception e) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
56 throw new Error(e); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
57 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
58 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
59 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
60 public static Object[] o; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
61 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
62 public static final boolean debug = Boolean.getBoolean("debug"); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
63 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
64 // 2 different obect arrays but same element types |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
65 static Test8010927[] masterA; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
66 static Object[] masterB; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
67 static final Test8010927 elem = new Test8010927(); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
68 static final WhiteBox wb = WhiteBox.getWhiteBox(); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
69 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
70 static final int obj_header_size = U.ARRAY_OBJECT_BASE_OFFSET; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
71 static final int heap_oop_size = wb.getHeapOopSize(); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
72 static final int card_size = 512; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
73 static final int one_card = (card_size - obj_header_size)/heap_oop_size; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
74 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
75 static final int surv_size = 2112 * 1024; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
76 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
77 // The size is big to not fit into survive space. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
78 static final Object[] cache = new Object[(surv_size / card_size)]; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
79 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
80 public static void main(String[] args) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
81 masterA = new Test8010927[one_card]; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
82 masterB = new Object[one_card]; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
83 for (int i = 0; i < one_card; ++i) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
84 masterA[i] = elem; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
85 masterB[i] = elem; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
86 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
87 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
88 // Move cache[] to the old gen. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
89 long low_limit = wb.getObjectAddress(cache); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
90 System.gc(); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
91 // Move 'cache' to oldgen. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
92 long upper_limit = wb.getObjectAddress(cache); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
93 if ((low_limit - upper_limit) > 0) { // substaction works with unsigned values |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
94 // OldGen is placed before youngger for ParallelOldGC. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
95 upper_limit = low_limit + 21000000l; // +20971520 |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
96 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
97 // Each A[one_card] size is 512 bytes, |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
98 // it will take about 40000 allocations to trigger GC. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
99 // cache[] has 8192 elements so GC should happen |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
100 // each 5th iteration. |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
101 for(long l = 0; l < 20; l++) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
102 fill_heap(); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
103 if (debug) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
104 System.out.println("test oop_disjoint_arraycopy"); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
105 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
106 testA_arraycopy(); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
107 if (debug) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
108 System.out.println("test checkcast_arraycopy"); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
109 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
110 testB_arraycopy(); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
111 // Execute arraycopy to the topmost array in young gen |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
112 if (debug) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
113 int top_index = get_top_address(low_limit, upper_limit); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
114 if (top_index >= 0) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
115 long addr = wb.getObjectAddress(cache[top_index]); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
116 System.out.println("top_addr: 0x" + Long.toHexString(addr) + ", 0x" + Long.toHexString(addr + 512)); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
117 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
118 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
119 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
120 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
121 static void fill_heap() { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
122 for (int i = 0; i < cache.length; ++i) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
123 o = new Test8010927[one_card]; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
124 System.arraycopy(masterA, 0, o, 0, masterA.length); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
125 cache[i] = o; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
126 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
127 for (long j = 0; j < 256; ++j) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
128 o = new Long[10000]; // to trigger GC |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
129 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
130 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
131 static void testA_arraycopy() { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
132 for (int i = 0; i < cache.length; ++i) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
133 System.arraycopy(masterA, 0, cache[i], 0, masterA.length); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
134 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
135 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
136 static void testB_arraycopy() { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
137 for (int i = 0; i < cache.length; ++i) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
138 System.arraycopy(masterB, 0, cache[i], 0, masterB.length); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
139 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
140 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
141 static int get_top_address(long min, long max) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
142 int index = -1; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
143 long addr = min; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
144 for (int i = 0; i < cache.length; ++i) { |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
145 long test = wb.getObjectAddress(cache[i]); |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
146 if (((test - addr) > 0) && ((max - test) > 0)) { // substaction works with unsigned values |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
147 addr = test; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
148 index = i; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
149 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
150 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
151 return index; |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
152 } |
3f281b313240
8010927: Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
kvn
parents:
diff
changeset
|
153 } |