diff --git a/src/profiler.rs b/src/profiler.rs index 9a27897..5293b3a 100644 --- a/src/profiler.rs +++ b/src/profiler.rs @@ -1230,10 +1230,9 @@ impl Profiler<'_> { pub fn setup_perf_events(&mut self) { let mut prog_fds = Vec::new(); for i in 0..num_cpus::get() { - let perf_fd = unsafe { - setup_perf_event(i.try_into().unwrap(), self.sample_freq.try_into().unwrap()) - } - .expect("setup perf event"); + let perf_fd = + unsafe { setup_perf_event(i.try_into().unwrap(), self.sample_freq as u64) } + .expect("setup perf event"); prog_fds.push(perf_fd); }