changeset 1289:cf5006ea7247

7901512: xperfasm profiler should not always override _NT_SYMBOL_PATH env Contributed-by: Andrei Pangin <andrei@art.su>
author shade
date Mon, 21 Sep 2015 14:14:51 +0300
parents f2d57d49d36b
children 52133d3a512c
files jmh-core/src/main/java/org/openjdk/jmh/profile/WinPerfAsmProfiler.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/WinPerfAsmProfiler.java	Fri Sep 11 19:03:00 2015 +0300
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/WinPerfAsmProfiler.java	Mon Sep 21 14:14:51 2015 +0300
@@ -109,7 +109,7 @@
                 .withRequiredArg().ofType(String.class).describedAs("string").defaultsTo("loader+proc_thread+profile");
         optSymbolDir = parser.accepts("symbol.dir",
                 "Path to a directory with jvm.dll symbols (optional).")
-                .withRequiredArg().ofType(String.class).describedAs("string").defaultsTo("");
+                .withRequiredArg().ofType(String.class).describedAs("string");
     }
 
     @Override
@@ -154,7 +154,9 @@
         // 2. Convert binary data to text form.
         try {
             ProcessBuilder pb = new ProcessBuilder(path, "-i", perfBinData, "-symbols", "-a", "dumper");
-            pb.environment().put("_NT_SYMBOL_PATH", symbolDir);
+            if (symbolDir != null) {
+                pb.environment().put("_NT_SYMBOL_PATH", symbolDir);
+            }
 
             Process p = pb.start();