equal
deleted
inserted
replaced
25 |
25 |
26 package jdk.jfr.jcmd; |
26 package jdk.jfr.jcmd; |
27 |
27 |
28 import java.io.File; |
28 import java.io.File; |
29 import java.io.IOException; |
29 import java.io.IOException; |
30 import java.nio.file.Files; |
|
31 import java.nio.file.Path; |
30 import java.nio.file.Path; |
32 |
31 |
33 import jdk.jfr.Recording; |
32 import jdk.jfr.Recording; |
34 import jdk.jfr.consumer.RecordedEvent; |
33 import jdk.jfr.consumer.RecordedEvent; |
35 import jdk.jfr.consumer.RecordingFile; |
34 import jdk.jfr.consumer.RecordingFile; |
|
35 import jdk.test.lib.Utils; |
36 import jdk.test.lib.jfr.EventNames; |
36 import jdk.test.lib.jfr.EventNames; |
37 import jdk.test.lib.jfr.FileHelper; |
37 import jdk.test.lib.jfr.FileHelper; |
38 import jdk.test.lib.process.OutputAnalyzer; |
38 import jdk.test.lib.process.OutputAnalyzer; |
39 |
39 |
40 /* |
40 /* |
66 FileHelper.verifyRecording(p); |
66 FileHelper.verifyRecording(p); |
67 verify(p.toPath()); |
67 verify(p.toPath()); |
68 } |
68 } |
69 |
69 |
70 private static void testAPI() throws IOException, Exception { |
70 private static void testAPI() throws IOException, Exception { |
71 Path p = Files.createTempFile("recording", ".jfr"); |
71 Path p = Utils.createTempFile("enable-legacy-event", ".jfr"); |
72 |
72 |
73 try (Recording r = new Recording()) { |
73 try (Recording r = new Recording()) { |
74 r.enable(LEGACY_EVENT); |
74 r.enable(LEGACY_EVENT); |
75 r.start(); |
75 r.start(); |
76 r.stop(); |
76 r.stop(); |