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.startupargs;
27
28 import java.util.ArrayList;
29 import java.util.List;
30 import java.util.function.Consumer;
31
32 import jdk.test.lib.jfr.EventNames;
33 import jdk.test.lib.jfr.SimpleEvent;
34 import jdk.test.lib.process.OutputAnalyzer;
35 import jdk.test.lib.process.ProcessTools;
36
37 /*
38 * @test
39 * @key jfr
40 * @library /test/lib
41 * @run main/othervm jdk.jfr.startupargs.TestRetransformUsingLog
42 */
43 public class TestRetransformUsingLog {
44
45 private static final String FILE_READ_FORCED_CLASS_LOAD = "Adding forced instrumentation for event type " + EventNames.FileRead + " during initial class load";
46 private static final String SIMPLE_EVENT_FORCED_CLASS_LOAD = "Adding forced instrumentation for event type jdk.test.lib.jfr.SimpleEvent during initial class load";
47 private static final String SIMPLE_EVENT_UNFORCED_CLASS_LOAD = "Adding instrumentation for event type jdk.test.lib.jfr.SimpleEvent during initial class load";
48
49 public static class TestApp {
50 public static void main(String[] args) throws Exception {
51 SimpleEvent event = new SimpleEvent();
52 event.commit();
53 }
54 }
55
56 public static void main(String[] args) throws Exception {
57 testRecordingRetransFormFalse();
58 testRecordingRetransFormTrue();
59 testNoRecordingRetransFormFalse();
|
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.startupargs;
27
28 import java.util.ArrayList;
29 import java.util.List;
30 import java.util.function.Consumer;
31
32 import jdk.test.lib.jfr.EventNames;
33 import jdk.test.lib.jfr.SimpleEvent;
34 import jdk.test.lib.process.OutputAnalyzer;
35 import jdk.test.lib.process.ProcessTools;
36
37 /**
38 * @test
39 * @key jfr
40 * @requires vm.hasJFR
41 * @library /test/lib
42 * @run main/othervm jdk.jfr.startupargs.TestRetransformUsingLog
43 */
44 public class TestRetransformUsingLog {
45
46 private static final String FILE_READ_FORCED_CLASS_LOAD = "Adding forced instrumentation for event type " + EventNames.FileRead + " during initial class load";
47 private static final String SIMPLE_EVENT_FORCED_CLASS_LOAD = "Adding forced instrumentation for event type jdk.test.lib.jfr.SimpleEvent during initial class load";
48 private static final String SIMPLE_EVENT_UNFORCED_CLASS_LOAD = "Adding instrumentation for event type jdk.test.lib.jfr.SimpleEvent during initial class load";
49
50 public static class TestApp {
51 public static void main(String[] args) throws Exception {
52 SimpleEvent event = new SimpleEvent();
53 event.commit();
54 }
55 }
56
57 public static void main(String[] args) throws Exception {
58 testRecordingRetransFormFalse();
59 testRecordingRetransFormTrue();
60 testNoRecordingRetransFormFalse();
|