< prev index next > test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineLeakThrowable.java
Print this page
/*
! * Copyright (c) 2023, 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.
/*
! * Copyright (c) 2023, 2024, 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.
/*
* @test
* @bug 8308762
* @library /test/lib
* @summary Test that redefinition of class containing Throwable refs does not leak constant pool
- * @requires os.family == "aix"
* @requires vm.jvmti
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @modules java.instrument
* java.compiler
* @run main RedefineClassHelper
* @run main/othervm/timeout=6000 -javaagent:redefineagent.jar -XX:MetaspaceSize=23m -XX:MaxMetaspaceSize=23m RedefineLeakThrowable
*/
! /*
! * @test
- * @bug 8308762
- * @library /test/lib
- * @summary Test that redefinition of class containing Throwable refs does not leak constant pool
- * @requires os.family != "aix"
- * @requires vm.jvmti
- * @requires vm.flagless
- * @modules java.base/jdk.internal.misc
- * @modules java.instrument
- * java.compiler
- * @run main RedefineClassHelper
- * @run main/othervm/timeout=6000 -javaagent:redefineagent.jar -XX:MetaspaceSize=17m -XX:MaxMetaspaceSize=17m RedefineLeakThrowable
- */
class Tester {
void test() {
try {
int i = 42;
/*
* @test
* @bug 8308762
* @library /test/lib
* @summary Test that redefinition of class containing Throwable refs does not leak constant pool
* @requires vm.jvmti
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @modules java.instrument
* java.compiler
* @run main RedefineClassHelper
* @run main/othervm/timeout=6000 -javaagent:redefineagent.jar -XX:MetaspaceSize=23m -XX:MaxMetaspaceSize=23m RedefineLeakThrowable
*/
!
! // MaxMetaspaceSize=23m allows InMemoryJavaCompiler to load even if CDS is off.
class Tester {
void test() {
try {
int i = 42;
< prev index next >