Skip to content

Commit

Permalink
Change deafult JFR File name for openj9
Browse files Browse the repository at this point in the history
Signed-off-by: Ravali Yatham <rayatha1@in.ibm.com>
  • Loading branch information
yathamravali committed Nov 6, 2024
1 parent 3c8fe4a commit 497966b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/jdk.jfr/share/classes/jdk/jfr/internal/JVMSupport.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved
* ===========================================================================
*/
package jdk.jfr.internal;

import java.io.IOException;
Expand Down Expand Up @@ -155,7 +161,7 @@ public static String makeFilename(Recording recording) {
String pid = JVM.getPid();
String date = ValueFormatter.formatDateTime(LocalDateTime.now());
String idText = recording == null ? "" : "-id-" + Long.toString(recording.getId());
return "hotspot-" + "pid-" + pid + idText + "-" + date + ".jfr";
return "openj9-" + "pid-" + pid + idText + "-" + date + ".jfr";
}

public static boolean createFailedNativeJFR() throws IllegalStateException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved
* ===========================================================================
*/
package jdk.jfr.internal.dcmd;

import java.io.IOException;
Expand Down Expand Up @@ -289,7 +295,7 @@ public Argument[] getArgumentInfos() {
"Maximum duration to dump, in (s)econds, (m)inutes, (h)ours, or (d)ays, e.g. 60m, or 0 for no limit",
"NANOTIME", false, true, null, false),
new Argument("maxsize", "Maximum amount of bytes to dump, in (M)B or (G)B, e.g. 500M, or 0 for no limit",
"MEMORY SIZE", false, true, "hotspot-pid-xxxxx-id-y-YYYY_MM_dd_HH_mm_ss.jfr", false),
"MEMORY SIZE", false, true, "openj9-pid-xxxxx-id-y-YYYY_MM_dd_HH_mm_ss.jfr", false),
new Argument("begin",
"Point in time to dump data from, e.g. 09:00, 21:35:00, 2018-06-03T18:12:56.827Z, 2018-06-03T20:13:46.832, -10m, -3h, or -1d",
"STRING", false, true, null, false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved
* ===========================================================================
*/
package jdk.jfr.internal.dcmd;

import java.io.IOException;
Expand Down Expand Up @@ -501,7 +507,7 @@ public Argument[] getArgumentInfos() {
"BOOLEAN", false, true, "true", false),
new Argument("filename",
"Resulting recording filename, e.g. \\\"" + exampleFilename() + "\\\"",
"FILE", false, true, "hotspot-pid-xxxxx-id-y-YYYY_MM_dd_HH_mm_ss.jfr", false),
"FILE", false, true, "openj9-pid-xxxxx-id-y-YYYY_MM_dd_HH_mm_ss.jfr", false),
new Argument("maxage",
"Maximum time to keep recorded data (on disk) in (s)econds, (m)inutes, (h)ours, or (d)ays, e.g. 60m, or 0 for no limit",
"NANOTIME", false, true, "0", false),
Expand Down

0 comments on commit 497966b

Please sign in to comment.