test/hotspot/jtreg/runtime/logging/DefaultMethodsTest.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/test/hotspot/jtreg/runtime/logging/DefaultMethodsTest.java Wed May 30 20:44:37 2018
--- new/test/hotspot/jtreg/runtime/logging/DefaultMethodsTest.java Wed May 30 20:44:37 2018
*** 1,7 ****
--- 1,7 ----
/*
! * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 21,31 ****
--- 21,31 ----
* questions.
*/
/*
* @test
! * @bug 8139564 8203960
* @summary defaultmethods=debug should have logging from each of the statements in the code
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
* @run driver DefaultMethodsTest
*** 35,44 ****
--- 35,45 ----
import jdk.test.lib.process.ProcessTools;
public class DefaultMethodsTest {
public static void main(String[] args) throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:defaultmethods=debug",
+ "--add-modules", "jdk.hotspot.agent",
InnerClass.class.getName());
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldContain("Slots that need filling:");
output.shouldContain("requires default method processing");
output.shouldContain("Looking for default methods for slot ");
*** 50,59 ****
--- 51,66 ----
output.shouldHaveExitValue(0);
}
public static class InnerClass {
public static void main(String[] args) throws Exception {
+ // Load a class from the jdk.hotspot.agent module. This would require
+ // default method processing. If this test is run with CDS enabled
+ // all system classes in the modules defined by default will be
+ // in the CDS archive and loading classes from the archive will
+ // bypass default method processing.
+ Class cls = Class.forName("sun.jvm.hotspot.utilities.RBNode");
System.out.println("Inner Class");
}
}
}
test/hotspot/jtreg/runtime/logging/DefaultMethodsTest.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File