Mercurial > hg > truffle
annotate test/runtime/NMT/NMTWithCDS.java @ 20390:b23a19cd0536
8056175: Change "8048150: Allow easy configurations for large CDS archives" triggers conversion warning with older GCC
Summary: cast the result of the conversion to uintx
Reviewed-by: ccheung, coleenp
Contributed-by: volker.simonis@gmail.com
author | ccheung |
---|---|
date | Wed, 27 Aug 2014 10:42:28 -0700 |
parents | 357af5b6d80a |
children | be71c49ae55a |
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 |
20368
357af5b6d80a
8056256: [TESTBUG] Disable NMTWithCDS.java test as launcher change has yet promoted
zgu
parents:
20365
diff
changeset
|
29 * @ignore |
20365
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
30 * @run main NMTWithCDS |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
31 */ |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
32 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
|
33 |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
34 public class NMTWithCDS { |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
35 |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
36 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
|
37 ProcessBuilder pb; |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
38 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
|
39 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
|
40 try { |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
41 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
|
42 output.shouldHaveExitValue(0); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
43 |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
44 pb = ProcessTools.createJavaProcessBuilder( |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
45 "-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
|
46 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
|
47 output.shouldContain("sharing"); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
48 output.shouldHaveExitValue(0); |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
49 |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
50 } catch (RuntimeException e) { |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
51 // 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
|
52 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
|
53 output.shouldHaveExitValue(1); |
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 } |
3adc0e278f49
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
zgu
parents:
diff
changeset
|
56 } |