Skip to content

Commit 937a7e3

Browse files
jbachorikclaude
andcommitted
Fix baseline library path resolution
Use absolute path for PROFILER_LIB_OVERRIDE to avoid relative path issues when script changes directories. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 2ce57a7 commit 937a7e3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

ddprof-lib/benchmarks/branch-prediction/compare_branch_prediction.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,17 @@ main() {
160160
# Run tests from optimized worktree but with baseline library
161161
cd "${OPTIMIZED_WORKTREE}/ddprof-lib/benchmarks/branch-prediction"
162162

163+
# Use absolute path for baseline library
164+
local baseline_lib
165+
baseline_lib="$(cd "${BASELINE_WORKTREE}" && pwd)/ddprof-lib/build/lib/main/release/linux/x64/libjavaProfiler.so"
166+
167+
if [ ! -f "${baseline_lib}" ]; then
168+
log_error "Baseline profiler library not found at ${baseline_lib}"
169+
exit 1
170+
fi
171+
163172
# Temporarily override PROFILER_LIB for baseline test
164-
PROFILER_LIB_OVERRIDE="${BASELINE_WORKTREE}/ddprof-lib/build/lib/main/release/linux/x64/libjavaProfiler.so" \
173+
PROFILER_LIB_OVERRIDE="${baseline_lib}" \
165174
"${baseline_test_script}" "${benchmark}" "baseline"
166175

167176
# Test optimized

0 commit comments

Comments
 (0)