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 package jdk.jfr.event.oldobject;
25
26 import java.util.ArrayList;
27 import java.util.List;
28
29 import jdk.jfr.Recording;
30 import jdk.jfr.consumer.RecordedEvent;
31 import jdk.test.lib.jfr.EventNames;
32 import jdk.test.lib.jfr.Events;
33
34 /**
35 * @test
36 * @requires vm.hasJFR
37 * @requires vm.flagless
38 * @library /test/lib /test/jdk
39 * @summary Purpose of this test is to run leak profiler without command line tweaks or WhiteBox hacks until we succeed
40 * @run main/othervm -Xmx1G jdk.jfr.event.oldobject.TestSanityDefault
41 */
42 public class TestSanityDefault {
43
44 static private class FindMe {
45 }
46
47 public static List<FindMe> list = new ArrayList<>(OldObjects.MIN_SIZE);
48
49 public static void main(String[] args) throws Exception {
50 // Should not use WhiteBox API, we want to execute actual code paths
51
52 // Trigger c2 compilation, so we get sample
53 for (long i = 0; i < 100_000_000; i++) {
54 allocateFindMe(true);
55 }
56
57
|
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 package jdk.jfr.event.oldobject;
25
26 import java.util.ArrayList;
27 import java.util.List;
28
29 import jdk.jfr.Recording;
30 import jdk.jfr.consumer.RecordedEvent;
31 import jdk.test.lib.jfr.EventNames;
32 import jdk.test.lib.jfr.Events;
33
34 /**
35 * @test
36 * @requires vm.hasJFR
37 * @requires vm.flagless
38 * @requires !(vm.opt.final.UseCompactObjectHeaders == true | vm.opt.final.UseShenandoahGC == true)
39 * @library /test/lib /test/jdk
40 * @summary Purpose of this test is to run leak profiler without command line tweaks or WhiteBox hacks until we succeed
41 * @run main/othervm -Xmx1G jdk.jfr.event.oldobject.TestSanityDefault
42 */
43 public class TestSanityDefault {
44
45 static private class FindMe {
46 }
47
48 public static List<FindMe> list = new ArrayList<>(OldObjects.MIN_SIZE);
49
50 public static void main(String[] args) throws Exception {
51 // Should not use WhiteBox API, we want to execute actual code paths
52
53 // Trigger c2 compilation, so we get sample
54 for (long i = 0; i < 100_000_000; i++) {
55 allocateFindMe(true);
56 }
57
58
|