--- old/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java 2018-10-24 21:43:29.931303935 +0900 +++ new/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java 2018-10-24 21:43:29.618303557 +0900 @@ -25,6 +25,7 @@ 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; @@ -39,6 +40,8 @@ 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 @@ -106,25 +109,55 @@ } 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(""); + } else { + printTimespan(delay, ""); + print(" (" + recording.getStartTime().atZone(ZoneId.systemDefault()) + ")"); + } + Duration duration = recording.getDuration(); - if (duration != null) { - print(" duration="); + print(" duration="); + if (duration == null) { + print(""); + } 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 ? "" : path.toString()); + Duration maxAge = recording.getMaxAge(); - if (maxAge != null) { - print(" maxage="); + print(" maxage="); + if (maxAge == null) { + print(""); + } 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(); }