10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import jdk.test.lib.*;
25 import sun.hotspot.WhiteBox;
26
27 /*
28 * @test CheckSegmentedCodeCache
29 * @bug 8015774
30 * @library /testlibrary /../../test/lib
31 * @summary "Checks VM options related to the segmented code cache"
32 * @modules java.base/sun.misc
33 * java.management
34 * @build CheckSegmentedCodeCache
35 * @run main ClassFileInstaller sun.hotspot.WhiteBox
36 * sun.hotspot.WhiteBox$WhiteBoxPermission
37 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI CheckSegmentedCodeCache
38 */
39 public class CheckSegmentedCodeCache {
40 private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
41 // Code heap names
42 private static final String NON_METHOD = "CodeHeap 'non-nmethods'";
43 private static final String PROFILED = "CodeHeap 'profiled nmethods'";
44 private static final String NON_PROFILED = "CodeHeap 'non-profiled nmethods'";
45
46 private static void verifySegmentedCodeCache(ProcessBuilder pb, boolean enabled) throws Exception {
47 OutputAnalyzer out = new OutputAnalyzer(pb.start());
48 out.shouldHaveExitValue(0);
49 if (enabled) {
50 try {
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import jdk.test.lib.*;
25 import sun.hotspot.WhiteBox;
26
27 /*
28 * @test CheckSegmentedCodeCache
29 * @bug 8015774
30 * @library /testlibrary /test/lib
31 * @summary "Checks VM options related to the segmented code cache"
32 * @modules java.base/sun.misc
33 * java.management
34 * @build CheckSegmentedCodeCache
35 * @run main ClassFileInstaller sun.hotspot.WhiteBox
36 * sun.hotspot.WhiteBox$WhiteBoxPermission
37 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI CheckSegmentedCodeCache
38 */
39 public class CheckSegmentedCodeCache {
40 private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
41 // Code heap names
42 private static final String NON_METHOD = "CodeHeap 'non-nmethods'";
43 private static final String PROFILED = "CodeHeap 'profiled nmethods'";
44 private static final String NON_PROFILED = "CodeHeap 'non-profiled nmethods'";
45
46 private static void verifySegmentedCodeCache(ProcessBuilder pb, boolean enabled) throws Exception {
47 OutputAnalyzer out = new OutputAnalyzer(pb.start());
48 out.shouldHaveExitValue(0);
49 if (enabled) {
50 try {
|