< prev index next >

src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java

Print this page

        

@@ -23,10 +23,11 @@
  * questions.
  */
 package jdk.jfr.internal.dcmd;
 
 import java.time.Duration;
+import java.time.ZoneId;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;

@@ -37,10 +38,12 @@
 import jdk.jfr.Recording;
 import jdk.jfr.SettingDescriptor;
 import jdk.jfr.internal.LogLevel;
 import jdk.jfr.internal.LogTag;
 import jdk.jfr.internal.Logger;
+import jdk.jfr.internal.OldObjectSample;
+import jdk.jfr.internal.PrivateAccess;
 
 /**
  * JFR.check - invoked from native
  *
  */

@@ -104,29 +107,59 @@
             printSetttings(recording);
         }
     }
 
     private void printGeneral(Recording recording) {
+        var platformRecording = PrivateAccess.getInstance().getPlatformRecording(recording);
         print("Recording " + recording.getId() + ": name=" + recording.getName());
 
+        print(" settings=" + platformRecording.getConfigNames());
+
+        var delay = platformRecording.getDelay();
+        print(" delay=");
+        if (delay == null) {
+            print("<N/A>");
+        } else {
+            printTimespan(delay, "");
+            print(" (" + recording.getStartTime().atZone(ZoneId.systemDefault()) + ")");
+        }
+
         Duration duration = recording.getDuration();
-        if (duration != null) {
             print(" duration=");
+        if (duration == null) {
+            print("<N/A>");
+        } else {
             printTimespan(duration, "");
         }
 
-        long maxSize = recording.getMaxSize();
-        if (maxSize != 0) {
-            print(" maxsize=");
-            printBytes(maxSize, "");
+        print(" disk=" + recording.isToDisk());
+
+        print(" filename=");
+        var path = recording.getDestination();
+        if (path == null) {
+            var dir = platformRecording.getDumpOnExitDirectory();
+            if (dir != null) {
+                path = dir.toPath();
+            }
         }
+        print(path == null ? "<N/A>" : path.toString());
+
         Duration maxAge = recording.getMaxAge();
-        if (maxAge != null) {
             print(" maxage=");
+        if (maxAge == null) {
+            print("<N/A>");
+        } else {
             printTimespan(maxAge, "");
         }
 
+        print(" maxsize=");
+        printBytes(recording.getMaxSize(), "");
+
+        print(" dumponexit=" + recording.getDumpOnExit());
+
+        print(" path-to-gc-roots=" + OldObjectSample.isPathToGcRootsEnabled(recording));
+
         print(" (" + recording.getState().toString().toLowerCase() + ")");
         println();
     }
 
     private void printSetttings(Recording recording) {
< prev index next >