Skip to content

Commit ea1ce56

Browse files
Prefix .jfr files with the image name.
1 parent b4c9a32 commit ea1ce56

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/JfrJdkCompatibility.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.graalvm.nativeimage.Platforms;
3434
import org.graalvm.nativeimage.ProcessProperties;
3535

36+
import com.oracle.svm.core.SubstrateOptions;
3637
import com.oracle.svm.core.SubstrateUtil;
3738
import com.oracle.svm.core.annotate.Alias;
3839
import com.oracle.svm.core.annotate.Substitute;
@@ -170,6 +171,7 @@ public static String makeFilename(Recording recording) {
170171
long pid = ProcessProperties.getProcessID();
171172
String date = Target_jdk_jfr_internal_util_ValueFormatter.formatDateTime(LocalDateTime.now());
172173
String idText = recording == null ? "" : "-id-" + recording.getId();
173-
return "graalvm-pid-" + pid + idText + "-" + date + ".jfr";
174+
String imageName = SubstrateOptions.Name.getValue();
175+
return imageName + "-pid-" + pid + idText + "-" + date + ".jfr";
174176
}
175177
}

substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jcmd/JCmdTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public void testJfr() throws IOException, InterruptedException {
120120
assertOutputContainsStrings(jcmd, "Recording ", "name=JCmdTest", "running");
121121

122122
jcmd = runJCmd("JFR.dump");
123-
assertOutputContainsStrings(jcmd, "Dumped recording", "graalvm-pid-");
123+
assertOutputContainsStrings(jcmd, "Dumped recording", "svmjunit-pid-");
124124

125125
jcmd = runJCmd("JFR.stop", "name=JCmdTest");
126126
assertOutputContainsLines(jcmd, "Stopped recording \"JCmdTest\".");

0 commit comments

Comments
 (0)