Mercurial > hg > truffle
annotate test/compiler/codecache/CheckUpperLimit.java @ 18267:fa6c97ede679
added Remote interface and applied it to API types that will be proxied for the purpose of replay/remote compilation
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 05 Nov 2014 22:18:55 +0100 |
parents | 446cb5d25d03 |
children |
rev | line source |
---|---|
11109
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
1 /* |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
4 * |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
8 * |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
13 * accompanied this code). |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
14 * |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
18 * |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
21 * questions. |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
22 */ |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
23 |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
24 /* |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
25 * @test |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
26 * @bug 8015635 |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
27 * @summary Test ensures that the ReservedCodeCacheSize is at most MAXINT |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
28 * @library /testlibrary |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
29 * |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
30 */ |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
31 import com.oracle.java.testlibrary.*; |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
32 |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
33 public class CheckUpperLimit { |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
34 public static void main(String[] args) throws Exception { |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
35 ProcessBuilder pb; |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
36 OutputAnalyzer out; |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
37 |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
38 pb = ProcessTools.createJavaProcessBuilder("-XX:ReservedCodeCacheSize=2049m", "-version"); |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
39 out = new OutputAnalyzer(pb.start()); |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
40 out.shouldContain("Invalid ReservedCodeCacheSize="); |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
41 out.shouldHaveExitValue(1); |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
42 } |
7ac80525ece9
8015635: Crash when specifying very large code cache size
anoll
parents:
diff
changeset
|
43 } |