Skip to content

Commit d85eef4

Browse files
committed
Use shared SimpleDateFormat in GraphPrinterDumpHandler.openScope
1 parent 9a20bec commit d85eef4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/printer/GraphPrinterDumpHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import static jdk.graal.compiler.debug.DebugConfig.asJavaMethod;
2828
import static jdk.graal.compiler.debug.DebugOptions.PrintUnmodifiedGraphs;
29+
import static jdk.graal.compiler.debug.PathUtilities.getDateString;
2930

3031
import java.io.IOException;
3132
import java.nio.channels.ClosedByInterruptException;
@@ -346,7 +347,8 @@ private void openScope(DebugContext debug, String name, int inlineDepth, Map<Obj
346347
if (sunJavaCommand != null) {
347348
props.put("sun.java.command", sunJavaCommand);
348349
}
349-
props.put("date", new Date().toString());
350+
Date date = new Date(GraalServices.getGlobalTimeStamp());
351+
props.put("date", getDateString(date));
350352
}
351353
printer.beginGroup(debug, name, name, debug.contextLookup(ResolvedJavaMethod.class), -1, props);
352354
} catch (IOException e) {

0 commit comments

Comments
 (0)