From 9196297faf94ce2f2bc7249b027dec0d6e15903b Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 16 Dec 2024 09:59:01 +0100 Subject: [PATCH] Always pass -o to perf --- src/lib.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index c2ffa65..588fc32 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -80,6 +80,15 @@ mod arch { } } + let perf_output = match perf_output { + Some(path) => path, + None => { + command.arg("-o"); + command.arg("perf.data"); + PathBuf::from("perf.data") + } + }; + match workload { Workload::Command(c) => { command.args(&c); @@ -92,7 +101,7 @@ mod arch { } run(command, verbose, ignore_status); - perf_output + Some(perf_output) } pub fn output(