46 // dump class list
47 CDSTestUtils.dumpClassList(classList, "-cp", appJar, appClass);
48
49 // create archive with the class list
50 CDSOptions opts = (new CDSOptions())
51 .addPrefix("-XX:ExtraSharedClassListFile=" + classList,
52 "-cp", appJar,
53 "-Xlog:class+load,cds")
54 .setArchiveName(archiveName);
55 CDSTestUtils.createArchiveAndCheck(opts)
56 .shouldContain("Skipping java/lang/invoke/BoundMethodHandle$Species_LLLL because it is dynamically generated");
57
58 // run with archive
59 CDSOptions runOpts = (new CDSOptions())
60 .addPrefix("-cp", appJar, "-Xlog:class+load,cds=debug")
61 .setArchiveName(archiveName)
62 .setUseVersion(false)
63 .addSuffix(appClass);
64 OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
65 output.shouldContain("LambHello source: shared objects file")
66 .shouldMatch("class.load.*LambHello[$][$]Lambda.*0x.*source:.shared.objects.file")
67 .shouldHaveExitValue(0);
68 }
69 }
|
46 // dump class list
47 CDSTestUtils.dumpClassList(classList, "-cp", appJar, appClass);
48
49 // create archive with the class list
50 CDSOptions opts = (new CDSOptions())
51 .addPrefix("-XX:ExtraSharedClassListFile=" + classList,
52 "-cp", appJar,
53 "-Xlog:class+load,cds")
54 .setArchiveName(archiveName);
55 CDSTestUtils.createArchiveAndCheck(opts)
56 .shouldContain("Skipping java/lang/invoke/BoundMethodHandle$Species_LLLL because it is dynamically generated");
57
58 // run with archive
59 CDSOptions runOpts = (new CDSOptions())
60 .addPrefix("-cp", appJar, "-Xlog:class+load,cds=debug")
61 .setArchiveName(archiveName)
62 .setUseVersion(false)
63 .addSuffix(appClass);
64 OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
65 output.shouldContain("LambHello source: shared objects file")
66 // FIXME:leyden-premain : we disabled archived Lambda proxy classes due to JDK-8307468
67 // .shouldMatch("class.load.*LambHello[$][$]Lambda.*0x.*source:.shared.objects.file")
68 .shouldHaveExitValue(0);
69 }
70 }
|