branch | datagramsocketimpl-branch |
changeset 58678 | 9cf78a70fa4f |
parent 54084 | 84f10bbf993f |
child 58679 | 9c3209ff7550 |
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugOptions.java Thu Oct 17 20:27:44 2019 +0100 +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugOptions.java Thu Oct 17 20:53:35 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,11 +28,14 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.text.SimpleDateFormat; +import java.util.Date; import jdk.internal.vm.compiler.collections.EconomicMap; import org.graalvm.compiler.options.EnumOptionKey; import org.graalvm.compiler.options.Option; import org.graalvm.compiler.options.OptionKey; +import org.graalvm.compiler.options.OptionStability; import org.graalvm.compiler.options.OptionType; import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.serviceprovider.GraalServices; @@ -92,12 +95,12 @@ @Option(help = "Pattern for specifying scopes in which logging is enabled. " + "See the Dump option for the pattern syntax.", type = OptionType.Debug) public static final OptionKey<String> Verify = new OptionKey<>(null); - @Option(help = "file:doc-files/DumpHelp.txt", type = OptionType.Debug) + @Option(help = "file:doc-files/DumpHelp.txt", type = OptionType.Debug, stability = OptionStability.STABLE) public static final OptionKey<String> Dump = new OptionKey<>(null); @Option(help = "Pattern for specifying scopes in which logging is enabled. " + "See the Dump option for the pattern syntax.", type = OptionType.Debug) public static final OptionKey<String> Log = new OptionKey<>(null); - @Option(help = "file:doc-files/MethodFilterHelp.txt") + @Option(help = "file:doc-files/MethodFilterHelp.txt", stability = OptionStability.STABLE) public static final OptionKey<String> MethodFilter = new OptionKey<>(null); @Option(help = "Only check MethodFilter against the root method in the context if true, otherwise check all methods", type = OptionType.Debug) public static final OptionKey<Boolean> MethodFilterRootOnly = new OptionKey<>(false); @@ -119,7 +122,7 @@ public static final OptionKey<String> MetricsThreadFilter = new OptionKey<>(null); @Option(help = "Enable debug output for stub code generation and snippet preparation.", type = OptionType.Debug) public static final OptionKey<Boolean> DebugStubsAndSnippets = new OptionKey<>(false); - @Option(help = "Send Graal compiler IR to dump handlers on error.", type = OptionType.Debug) + @Option(help = "Send compiler IR to dump handlers on error.", type = OptionType.Debug) public static final OptionKey<Boolean> DumpOnError = new OptionKey<>(false); @Option(help = "Intercept also bailout exceptions", type = OptionType.Debug) public static final OptionKey<Boolean> InterceptBailout = new OptionKey<>(false); @@ -203,7 +206,9 @@ if (DumpPath.hasBeenSet(options)) { dumpDir = Paths.get(DumpPath.getValue(options)); } else { - dumpDir = Paths.get(DumpPath.getValue(options), String.valueOf(GraalServices.getGlobalTimeStamp())); + Date date = new Date(GraalServices.getGlobalTimeStamp()); + SimpleDateFormat formatter = new SimpleDateFormat( "YYYY.MM.dd.HH.mm.ss.SSS" ); + dumpDir = Paths.get(DumpPath.getValue(options), formatter.format(date)); } dumpDir = dumpDir.toAbsolutePath(); if (!Files.exists(dumpDir)) {