author | vtewari |
Tue, 13 Sep 2016 17:00:06 +0530 | |
changeset 40937 | f72e61ec734b |
parent 40059 | c2304140ed64 |
permissions | -rw-r--r-- |
28047
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
1 |
/* |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
2 |
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
4 |
* |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
8 |
* |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
13 |
* accompanied this code). |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
14 |
* |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
18 |
* |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
21 |
* questions. |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
22 |
*/ |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
23 |
|
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
24 |
/* |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
25 |
* @test |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
26 |
* @bug 8067144 |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
27 |
* @summary -XX:+TraceDeoptimization tries to print realloc'ed objects even when there are none |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
28 |
* |
40059 | 29 |
* @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement |
30 |
* -XX:+IgnoreUnrecognizedVMOptions -XX:+TraceDeoptimization |
|
31 |
* compiler.uncommontrap.TraceDeoptimizationNoRealloc |
|
28047
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
32 |
*/ |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
33 |
|
40059 | 34 |
package compiler.uncommontrap; |
35 |
||
28047
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
36 |
public class TraceDeoptimizationNoRealloc { |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
37 |
|
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
38 |
static void m(boolean some_condition) { |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
39 |
if (some_condition) { |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
40 |
return; |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
41 |
} |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
42 |
} |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
43 |
|
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
44 |
|
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
45 |
static public void main(String[] args) { |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
46 |
for (int i = 0; i < 20000; i++) { |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
47 |
m(false); |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
48 |
} |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
49 |
m(true); |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
50 |
} |
c0e7a15c458f
8067144: SIGSEGV with +TraceDeoptimization in Deoptimization::print_objects
roland
parents:
diff
changeset
|
51 |
} |