diff --git a/src/run/runner/valgrind/measure.rs b/src/run/runner/valgrind/measure.rs index 8a7b85a4..f70ecfc1 100644 --- a/src/run/runner/valgrind/measure.rs +++ b/src/run/runner/valgrind/measure.rs @@ -104,6 +104,7 @@ pub async fn measure( cmd.current_dir(abs_cwd); } // Configure valgrind + let valgrind_flags = env::var("VALGRIND_FLAGS").unwrap_or_default(); let profile_path = profile_folder.join("%p.out"); let log_path = profile_folder.join("valgrind.log"); cmd.arg("valgrind") @@ -114,7 +115,8 @@ pub async fn measure( .map(|x| format!("--obj-skip={}", x)), ) .arg(format!("--callgrind-out-file={}", profile_path.to_str().unwrap()).as_str()) - .arg(format!("--log-file={}", log_path.to_str().unwrap()).as_str()); + .arg(format!("--log-file={}", log_path.to_str().unwrap()).as_str()) + .args(valgrind_flags.split_whitespace()); // Set the command to execute: let script_path = create_run_script()?;