Mercurial > hg > graal-compiler
annotate test/runtime/NMT/NMTWithCDS.java @ 21642:57912478d94d
fixed pylint issue
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 01 Jun 2015 18:13:48 +0200 |
parents | be71c49ae55a |
children |
rev | line source |
---|---|
20365
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
1 /* |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
4 * |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
8 * |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
13 * accompanied this code). |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
14 * |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
18 * |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
21 * questions. |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
22 */ |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
23 |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
24 /* |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
25 * @test |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
26 * @bug 8055061 |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
27 * @key nmt |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
28 * @library /testlibrary |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
29 * @run main NMTWithCDS |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
30 */ |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
31 import com.oracle.java.testlibrary.*; |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
32 |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
33 public class NMTWithCDS { |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
34 |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
35 public static void main(String[] args) throws Exception { |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
36 ProcessBuilder pb; |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
37 pb = ProcessTools.createJavaProcessBuilder("-XX:SharedArchiveFile=./sample.jsa", "-Xshare:dump"); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
38 OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
39 try { |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
40 output.shouldContain("Loading classes to share"); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
41 output.shouldHaveExitValue(0); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
42 |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
43 pb = ProcessTools.createJavaProcessBuilder( |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
44 "-XX:NativeMemoryTracking=detail", "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:on", "-version"); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
45 output = new OutputAnalyzer(pb.start()); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
46 output.shouldContain("sharing"); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
47 output.shouldHaveExitValue(0); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
48 |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
49 } catch (RuntimeException e) { |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
50 // Report 'passed' if CDS was turned off. |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
51 output.shouldContain("Unable to use shared archive"); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
52 output.shouldHaveExitValue(1); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
53 } |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
54 } |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
55 } |