equal
deleted
inserted
replaced
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package jdk.jfr.cmd; |
26 package jdk.jfr.cmd; |
27 |
27 |
28 import java.nio.file.Files; |
|
29 import java.nio.file.Path; |
28 import java.nio.file.Path; |
30 import java.util.Arrays; |
29 import java.util.Arrays; |
31 import java.util.regex.Matcher; |
30 import java.util.regex.Matcher; |
32 import java.util.regex.Pattern; |
31 import java.util.regex.Pattern; |
33 |
32 |
34 import jdk.jfr.Configuration; |
33 import jdk.jfr.Configuration; |
35 import jdk.jfr.Event; |
34 import jdk.jfr.Event; |
36 import jdk.jfr.Recording; |
35 import jdk.jfr.Recording; |
|
36 import jdk.test.lib.Utils; |
37 import jdk.test.lib.process.OutputAnalyzer; |
37 import jdk.test.lib.process.OutputAnalyzer; |
38 import jdk.test.lib.process.ProcessTools;; |
38 import jdk.test.lib.process.ProcessTools;; |
39 |
39 |
40 final class ExecuteHelper { |
40 final class ExecuteHelper { |
41 |
41 |
97 event2.charValue = 0; |
97 event2.charValue = 0; |
98 event2.commit(); |
98 event2.commit(); |
99 } |
99 } |
100 |
100 |
101 public static Path createProfilingRecording() throws Exception { |
101 public static Path createProfilingRecording() throws Exception { |
102 Path file = Files.createTempFile("recording", ".jfr"); |
102 Path file = Utils.createTempFile("profiling-recording", ".jfr"); |
103 // Create a recording with some data |
103 // Create a recording with some data |
104 try (Recording r = new Recording(Configuration.getConfiguration("profile"))) { |
104 try (Recording r = new Recording(Configuration.getConfiguration("profile"))) { |
105 r.start(); |
105 r.start(); |
106 |
106 |
107 // Allocation event |
107 // Allocation event |