< prev index next >

test/hotspot/jtreg/runtime/cds/javaldr/AnonVmClassesDuringDump.java

Print this page




  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 
  25 /*
  26  * @test
  27  * @summary When dumping the CDS archive, try to load VM anonymous classes to make sure they
  28  *          are handled properly. Note: these are not "anonymous inner classes" in the Java source code,
  29  *          but rather classes that are not recorded in any ClassLoaderData::dictionary(),
  30  *          such as classes that are generated for Lambda expressions.
  31  *          See https://blogs.oracle.com/jrose/anonymous-classes-in-the-vm.
  32  * @library /test/lib /test/hotspot/jtreg/runtime/appcds /test/hotspot/jtreg/runtime/appcds/test-classes
  33  * @requires vm.cds
  34  * @requires vm.flavor != "minimal"
  35  * @modules java.base/jdk.internal.misc
  36  *          jdk.jartool/sun.tools.jar
  37  *          java.management
  38  * @build AnonVmClassesDuringDumpTransformer Hello
  39  * @run main/othervm AnonVmClassesDuringDump
  40  */
  41 
  42 public class AnonVmClassesDuringDump {
  43     public static String appClasses[] = {
  44         "Hello",
  45     };
  46     public static String agentClasses[] = {
  47         "AnonVmClassesDuringDumpTransformer",
  48     };
  49 
  50     public static String cdsDiagnosticOption = "-XX:+AllowArchivingWithJavaAgent";
  51 
  52     public static void main(String[] args) throws Throwable {




  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 
  25 /*
  26  * @test
  27  * @summary When dumping the CDS archive, try to load VM anonymous classes to make sure they
  28  *          are handled properly. Note: these are not "anonymous inner classes" in the Java source code,
  29  *          but rather classes that are not recorded in any ClassLoaderData::dictionary(),
  30  *          such as classes that are generated for Lambda expressions.
  31  *          See https://blogs.oracle.com/jrose/anonymous-classes-in-the-vm.
  32  * @library /test/lib /test/hotspot/jtreg/runtime/cds /test/hotspot/jtreg/runtime/cds/test-classes
  33  * @requires vm.cds
  34  * @requires vm.flavor != "minimal"
  35  * @modules java.base/jdk.internal.misc
  36  *          jdk.jartool/sun.tools.jar
  37  *          java.management
  38  * @build AnonVmClassesDuringDumpTransformer Hello
  39  * @run main/othervm AnonVmClassesDuringDump
  40  */
  41 
  42 public class AnonVmClassesDuringDump {
  43     public static String appClasses[] = {
  44         "Hello",
  45     };
  46     public static String agentClasses[] = {
  47         "AnonVmClassesDuringDumpTransformer",
  48     };
  49 
  50     public static String cdsDiagnosticOption = "-XX:+AllowArchivingWithJavaAgent";
  51 
  52     public static void main(String[] args) throws Throwable {


< prev index next >