changeset 378:c0050f0615ed

Print VM invoker path as well as the VM options.
author shade
date Tue, 28 Jan 2014 17:17:24 +0400
parents 4659c9e09268
children f0b81d581219
files jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Tue Jan 28 12:52:58 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Tue Jan 28 17:17:24 2014 +0400
@@ -317,6 +317,8 @@
                 opts = "<none>";
             }
 
+            String jvm = options.getJvm().orElse(getDefaultJvm());
+
             BenchmarkParams params = new BenchmarkParams(options, benchmark, ActionMode.UNDEF);
 
             int forkCount = params.getForks();
@@ -325,8 +327,9 @@
                 out.verbosePrintln("Warmup forking " + warmupForkCount + " times using command: " + Arrays.toString(commandString));
                 for (int i = 0; i < warmupForkCount; i++) {
                     beforeBenchmark();
+                    out.println("# VM invoker: " + jvm);
+                    out.println("# VM options: " + opts);
                     out.println("# Warmup Fork: " + (i + 1) + " of " + forkCount);
-                    out.println("# VM options: " + opts);
                     doFork(server, commandString);
                     afterBenchmark(benchmark);
                 }
@@ -335,8 +338,9 @@
             out.verbosePrintln("Forking " + forkCount + " times using command: " + Arrays.toString(commandString));
             for (int i = 0; i < forkCount; i++) {
                 beforeBenchmark();
+                out.println("# VM invoker: " + jvm);
+                out.println("# VM options: " + opts);
                 out.println("# Fork: " + (i + 1) + " of " + forkCount);
-                out.println("# VM options: " + opts);
                 Multimap<BenchmarkRecord, BenchResult> result = doFork(server, commandString);
                 results.merge(result);
                 afterBenchmark(benchmark);