diff --git a/jmh-fork/jmh-core/src/main/java/io/codspeed/BenchmarkUri.java b/jmh-fork/jmh-core/src/main/java/io/codspeed/BenchmarkUri.java index 869c783..e1cd307 100644 --- a/jmh-fork/jmh-core/src/main/java/io/codspeed/BenchmarkUri.java +++ b/jmh-fork/jmh-core/src/main/java/io/codspeed/BenchmarkUri.java @@ -98,7 +98,7 @@ static Path findGitRoot() { Path current = Paths.get(System.getProperty("user.dir")).toAbsolutePath().normalize(); while (current != null) { - if (Files.isDirectory(current.resolve(".git"))) { + if (Files.exists(current.resolve(".git"))) { cachedGitRoot = current; return current; } diff --git a/jmh-fork/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java b/jmh-fork/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java index 4a11281..59e6ab0 100644 --- a/jmh-fork/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java +++ b/jmh-fork/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java @@ -69,7 +69,6 @@ public class Runner extends BaseRunner { private static final int TAIL_LINES_ON_ERROR = Integer.getInteger("jmh.tailLines", 20); private static final String JMH_LOCK_FILE = System.getProperty("java.io.tmpdir") + "/jmh.lock"; private static final Boolean JMH_LOCK_IGNORE = Boolean.getBoolean("jmh.ignoreLock"); - private static boolean codspeedForksWarningShown = false; private final BenchmarkList list; private int cpuCount; @@ -478,17 +477,6 @@ private BenchmarkParams newBenchmarkParams(BenchmarkListEntry benchmark, ActionM benchmark.getWarmupForks().orElse( Defaults.WARMUP_FORKS)); - // TODO(COD-1788): Remove this after process filtering is supported - if (InstrumentHooks.getInstance().isInstrumented() && !"1".equals(System.getenv("CODSPEED_JVM_ALLOW_FORKS"))) { - if ((forks > 0 || warmupForks > 0) && !codspeedForksWarningShown) { - out.println("# CodSpeed: forcing forks=0 to enable flamegraph support."); - out.println("# Set CODSPEED_JVM_ALLOW_FORKS=1 to disable this override."); - codspeedForksWarningShown = true; - } - forks = 0; - warmupForks = 0; - } - TimeUnit timeUnit = options.getTimeUnit().orElse( benchmark.getTimeUnit().orElse( Defaults.OUTPUT_TIMEUNIT));