Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
12 changes: 0 additions & 12 deletions jmh-fork/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down
Loading