17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.jfr.event.oldobject;
27
28 import java.util.ArrayList;
29 import java.util.List;
30
31 import jdk.jfr.Recording;
32 import jdk.jfr.consumer.RecordedEvent;
33 import jdk.jfr.internal.test.WhiteBox;
34 import jdk.test.lib.jfr.EventNames;
35 import jdk.test.lib.jfr.Events;
36
37 /*
38 * @test
39 * @key jfr
40 * @requires vm.gc == "null"
41 * @library /test/lib /test/jdk
42 * @modules jdk.jfr/jdk.jfr.internal.test
43 * @run main/othervm -XX:TLABSize=2k jdk.jfr.event.oldobject.TestListenerLeak
44 */
45 public class TestListenerLeak {
46
47 private interface TestListener {
48 void onListen();
49 }
50
51 static class Stuff {
52 }
53
54 static class ListenerThread extends Thread {
55
56 private List<Stuff[]> stuff;
57
58 public ListenerThread(List<Stuff[]> stuff) {
59 this.stuff = stuff;
|
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.jfr.event.oldobject;
27
28 import java.util.ArrayList;
29 import java.util.List;
30
31 import jdk.jfr.Recording;
32 import jdk.jfr.consumer.RecordedEvent;
33 import jdk.jfr.internal.test.WhiteBox;
34 import jdk.test.lib.jfr.EventNames;
35 import jdk.test.lib.jfr.Events;
36
37 /**
38 * @test
39 * @key jfr
40 * @requires vm.hasJFR
41 * @requires vm.gc == "null"
42 * @library /test/lib /test/jdk
43 * @modules jdk.jfr/jdk.jfr.internal.test
44 * @run main/othervm -XX:TLABSize=2k jdk.jfr.event.oldobject.TestListenerLeak
45 */
46 public class TestListenerLeak {
47
48 private interface TestListener {
49 void onListen();
50 }
51
52 static class Stuff {
53 }
54
55 static class ListenerThread extends Thread {
56
57 private List<Stuff[]> stuff;
58
59 public ListenerThread(List<Stuff[]> stuff) {
60 this.stuff = stuff;
|