26 package jdk.jfr.event.compiler;
27
28 import jdk.internal.org.objectweb.asm.*;
29 import jdk.jfr.Recording;
30 import jdk.jfr.consumer.RecordedEvent;
31 import jdk.jfr.consumer.RecordedMethod;
32 import jdk.jfr.consumer.RecordedObject;
33 import jdk.test.lib.Asserts;
34 import jdk.test.lib.Platform;
35 import jdk.test.lib.jfr.EventNames;
36 import jdk.test.lib.jfr.Events;
37 import sun.hotspot.WhiteBox;
38
39 import java.io.IOException;
40 import java.lang.reflect.Constructor;
41 import java.lang.reflect.Executable;
42 import java.lang.reflect.Method;
43 import java.util.*;
44 import java.util.stream.IntStream;
45
46 /*
47 * @test CompilerInliningTest
48 * @bug 8073607
49 * @key jfr
50 * @summary Verifies that corresponding JFR events are emitted in case of inlining.
51 *
52 * @requires vm.opt.Inline == true | vm.opt.Inline == null
53 * @library /test/lib
54 * @modules java.base/jdk.internal.org.objectweb.asm
55 * jdk.jfr
56 *
57 * @build sun.hotspot.WhiteBox
58 * @run main ClassFileInstaller sun.hotspot.WhiteBox
59 * sun.hotspot.WhiteBox$WhiteBoxPermission
60 * @run main/othervm -Xbootclasspath/a:.
61 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
62 * -Xbatch jdk.jfr.event.compiler.TestCompilerInlining
63 */
64 public class TestCompilerInlining {
65 private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
66 private static final int LEVEL_SIMPLE = 1;
67 private static final int LEVEL_FULL_OPTIMIZATION = 4;
68 private static final Executable ENTRY_POINT = getConstructor(TestCase.class);
69 private static final String TEST_CASE_CLASS_NAME = TestCase.class.getName().replace('.', '/');
70
|
26 package jdk.jfr.event.compiler;
27
28 import jdk.internal.org.objectweb.asm.*;
29 import jdk.jfr.Recording;
30 import jdk.jfr.consumer.RecordedEvent;
31 import jdk.jfr.consumer.RecordedMethod;
32 import jdk.jfr.consumer.RecordedObject;
33 import jdk.test.lib.Asserts;
34 import jdk.test.lib.Platform;
35 import jdk.test.lib.jfr.EventNames;
36 import jdk.test.lib.jfr.Events;
37 import sun.hotspot.WhiteBox;
38
39 import java.io.IOException;
40 import java.lang.reflect.Constructor;
41 import java.lang.reflect.Executable;
42 import java.lang.reflect.Method;
43 import java.util.*;
44 import java.util.stream.IntStream;
45
46 /**
47 * @test CompilerInliningTest
48 * @bug 8073607
49 * @key jfr
50 * @summary Verifies that corresponding JFR events are emitted in case of inlining.
51 * @requires vm.hasJFR
52 *
53 * @requires vm.opt.Inline == true | vm.opt.Inline == null
54 * @library /test/lib
55 * @modules java.base/jdk.internal.org.objectweb.asm
56 * jdk.jfr
57 *
58 * @build sun.hotspot.WhiteBox
59 * @run main ClassFileInstaller sun.hotspot.WhiteBox
60 * sun.hotspot.WhiteBox$WhiteBoxPermission
61 * @run main/othervm -Xbootclasspath/a:.
62 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
63 * -Xbatch jdk.jfr.event.compiler.TestCompilerInlining
64 */
65 public class TestCompilerInlining {
66 private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
67 private static final int LEVEL_SIMPLE = 1;
68 private static final int LEVEL_FULL_OPTIMIZATION = 4;
69 private static final Executable ENTRY_POINT = getConstructor(TestCase.class);
70 private static final String TEST_CASE_CLASS_NAME = TestCase.class.getName().replace('.', '/');
71
|