Skip to content

Commit 7e87e3c

Browse files
committed
feat: support pass valgrind args
1 parent d26117e commit 7e87e3c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/run/runner/valgrind/measure.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ pub async fn measure(
104104
cmd.current_dir(abs_cwd);
105105
}
106106
// Configure valgrind
107+
let valgrind_flags = env::var("VALGRIND_FLAGS").unwrap_or_default();
107108
let profile_path = profile_folder.join("%p.out");
108109
let log_path = profile_folder.join("valgrind.log");
109110
cmd.arg("valgrind")
@@ -114,7 +115,8 @@ pub async fn measure(
114115
.map(|x| format!("--obj-skip={}", x)),
115116
)
116117
.arg(format!("--callgrind-out-file={}", profile_path.to_str().unwrap()).as_str())
117-
.arg(format!("--log-file={}", log_path.to_str().unwrap()).as_str());
118+
.arg(format!("--log-file={}", log_path.to_str().unwrap()).as_str())
119+
.args(valgrind_flags.split_whitespace());
118120

119121
// Set the command to execute:
120122
let script_path = create_run_script()?;

0 commit comments

Comments
 (0)