# HG changeset patch # User Doug Simon # Date 1358784571 -3600 # Node ID f7ca24d268c4bd5d498adae4502ff6def87ff109 # Parent 442668d41bc21629b5cd6f807c13d0f980cabbdb changed format of files generated by CompilationStatistics to avoid spaces diff -r 442668d41bc2 -r f7ca24d268c4 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationStatistics.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationStatistics.java Mon Jan 21 12:23:55 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationStatistics.java Mon Jan 21 17:09:31 2013 +0100 @@ -36,9 +36,9 @@ public final class CompilationStatistics { private static final long RESOLUTION = 100000000; - private static final boolean TIMELINE_ENABLED = System.getProperty("stats.timeline.file") != null; + private static final String TIMELINE_FILE = System.getProperty("stats.timeline.file"); private static final boolean COMPILATIONSTATS_ENABLED = System.getProperty("stats.compilations.file") != null; - private static final boolean ENABLED = TIMELINE_ENABLED || COMPILATIONSTATS_ENABLED; + private static final boolean ENABLED = TIMELINE_FILE != null || COMPILATIONSTATS_ENABLED; private static final CompilationStatistics DUMMY = new CompilationStatistics(null); @@ -133,8 +133,8 @@ zeroTime = System.nanoTime(); Date now = new Date(); - String dateString = (now.getYear() + 1900) + "_" + (now.getMonth() + 1) + "_" + now.getDate() + " " + now.getHours() + "_" + now.getMinutes() + "_" + now.getSeconds(); - try (PrintStream out = new PrintStream("compilations " + dateString + " " + dumpName + ".csv")) { + String dateString = (now.getYear() + 1900) + "-" + (now.getMonth() + 1) + "-" + now.getDate() + "-" + now.getHours() + "" + now.getMinutes(); + try (PrintStream out = new PrintStream("compilations_" + dateString + "_" + dumpName + ".csv")) { // output the list of all compilations Field[] declaredFields = CompilationStatistics.class.getDeclaredFields(); @@ -164,11 +164,11 @@ } } - String timelineFile = System.getProperty("stats.timeline.file"); + String timelineFile = TIMELINE_FILE; if (timelineFile == null || timelineFile.isEmpty()) { - timelineFile = "timeline " + dateString; + timelineFile = "timeline_" + dateString; } - try (FileOutputStream fos = new FileOutputStream(timelineFile + " " + dumpName + ".csv", true); PrintStream out = new PrintStream(fos)) { + try (FileOutputStream fos = new FileOutputStream(timelineFile + "_" + dumpName + ".csv", true); PrintStream out = new PrintStream(fos)) { long[] timeSpent = new long[10000]; int maxTick = 0;