26 * @test
27 * @summary Redefine shared class. GC should not cause crash with cached resolved_references.
28 * @library /test/lib /test/hotspot/jtreg/runtime/appcds /test/hotspot/jtreg/runtime/appcds/test-classes /test/hotspot/jtreg/runtime/appcds/jvmti
29 * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
30 * @requires vm.gc.G1
31 * @requires vm.flavor != "minimal"
32 * @requires (sun.arch.data.model != "32") & (os.family != "windows")
33 * @modules java.base/jdk.internal.misc
34 * jdk.jartool/sun.tools.jar
35 * java.management
36 * @build sun.hotspot.WhiteBox
37 * RedefineClassApp
38 * InstrumentationClassFileTransformer
39 * InstrumentationRegisterClassFileTransformer
40 * @run main/othervm RedefineClassTest
41 */
42
43 import com.sun.tools.attach.VirtualMachine;
44 import com.sun.tools.attach.VirtualMachineDescriptor;
45 import java.io.File;
46 import java.io.FileOutputStream;
47 import java.util.List;
48 import jdk.test.lib.Asserts;
49 import jdk.test.lib.cds.CDSOptions;
50 import jdk.test.lib.process.OutputAnalyzer;
51 import jdk.test.lib.process.ProcessTools;
52
53 public class RedefineClassTest {
54 public static String bootClasses[] = {
55 "RedefineClassApp$Intf",
56 "RedefineClassApp$Bar",
57 "sun.hotspot.WhiteBox",
58 };
59 public static String appClasses[] = {
60 "RedefineClassApp",
61 "RedefineClassApp$Foo",
62 };
63 public static String sharedClasses[] = TestCommon.concat(bootClasses, appClasses);
64
65 public static String agentClasses[] = {
66 "InstrumentationClassFileTransformer",
|
26 * @test
27 * @summary Redefine shared class. GC should not cause crash with cached resolved_references.
28 * @library /test/lib /test/hotspot/jtreg/runtime/appcds /test/hotspot/jtreg/runtime/appcds/test-classes /test/hotspot/jtreg/runtime/appcds/jvmti
29 * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
30 * @requires vm.gc.G1
31 * @requires vm.flavor != "minimal"
32 * @requires (sun.arch.data.model != "32") & (os.family != "windows")
33 * @modules java.base/jdk.internal.misc
34 * jdk.jartool/sun.tools.jar
35 * java.management
36 * @build sun.hotspot.WhiteBox
37 * RedefineClassApp
38 * InstrumentationClassFileTransformer
39 * InstrumentationRegisterClassFileTransformer
40 * @run main/othervm RedefineClassTest
41 */
42
43 import com.sun.tools.attach.VirtualMachine;
44 import com.sun.tools.attach.VirtualMachineDescriptor;
45 import java.io.File;
46 import java.util.List;
47 import jdk.test.lib.Asserts;
48 import jdk.test.lib.cds.CDSOptions;
49 import jdk.test.lib.process.OutputAnalyzer;
50 import jdk.test.lib.process.ProcessTools;
51
52 public class RedefineClassTest {
53 public static String bootClasses[] = {
54 "RedefineClassApp$Intf",
55 "RedefineClassApp$Bar",
56 "sun.hotspot.WhiteBox",
57 };
58 public static String appClasses[] = {
59 "RedefineClassApp",
60 "RedefineClassApp$Foo",
61 };
62 public static String sharedClasses[] = TestCommon.concat(bootClasses, appClasses);
63
64 public static String agentClasses[] = {
65 "InstrumentationClassFileTransformer",
|