Skip to content

Commit b6df390

Browse files
committed
fix: sysctl values can be negative
1 parent 16db8d4 commit b6df390

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/run/runner/wall_time/perf

src/run/runner/wall_time/perf/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub mod perf_map;
77
pub mod unwind_data;
88

99
pub fn setup_environment() -> anyhow::Result<()> {
10-
let sysctl_read = |name: &str| -> anyhow::Result<u64> {
10+
let sysctl_read = |name: &str| -> anyhow::Result<i64> {
1111
let output = std::process::Command::new("sysctl").arg(name).output()?;
1212
let output = String::from_utf8(output.stdout)?;
1313

@@ -16,7 +16,7 @@ pub fn setup_environment() -> anyhow::Result<()> {
1616
.last()
1717
.context("Couldn't find the value in sysctl output")?
1818
.trim()
19-
.parse::<u64>()?)
19+
.parse::<i64>()?)
2020
};
2121

2222
// Allow access to kernel symbols

0 commit comments

Comments
 (0)