diff --git a/crates/runner-shared/src/unwind_data.rs b/crates/runner-shared/src/unwind_data.rs index 80c1660a..8946cd24 100644 --- a/crates/runner-shared/src/unwind_data.rs +++ b/crates/runner-shared/src/unwind_data.rs @@ -3,6 +3,7 @@ use core::{ hash::{Hash, Hasher}, }; use serde::{Deserialize, Serialize}; +use std::io::BufWriter; use std::{hash::DefaultHasher, ops::Range}; pub const UNWIND_FILE_EXT: &str = "unwind_data"; @@ -41,9 +42,13 @@ impl UnwindData { log::warn!("{} {:x?}", self.path, self.avma_range); } - let mut writer = std::fs::File::create(path.as_ref())?; let compat = UnwindDataCompat::V2(self.clone()); - bincode::serialize_into(&mut writer, &compat)?; + let file = std::fs::File::create(path.as_ref())?; + const BUFFER_SIZE: usize = 256 * 1024 /* 256 KB */; + + let writer = BufWriter::with_capacity(BUFFER_SIZE, file); + bincode::serialize_into(writer, &compat)?; + Ok(()) } } diff --git a/src/executor/shared/fifo.rs b/src/executor/shared/fifo.rs index 2f23a0d4..60b5825b 100644 --- a/src/executor/shared/fifo.rs +++ b/src/executor/shared/fifo.rs @@ -147,7 +147,7 @@ impl RunnerFifo { break; } - let result = tokio::time::timeout(Duration::from_secs(5), self.recv_cmd()).await; + let result = tokio::time::timeout(Duration::from_secs(1), self.recv_cmd()).await; let cmd = match result { Ok(Ok(cmd)) => cmd, Ok(Err(e)) => { diff --git a/src/executor/wall_time/perf/debug_info.rs b/src/executor/wall_time/perf/debug_info.rs index ec59ffff..eed6290f 100644 --- a/src/executor/wall_time/perf/debug_info.rs +++ b/src/executor/wall_time/perf/debug_info.rs @@ -101,7 +101,7 @@ impl ProcessDebugInfo { modules.push(module_debug_info); } Err(error) => { - debug!("Failed to load debug info for module {path:?}: {error}"); + trace!("Failed to load debug info for module {path:?}: {error}"); } } } diff --git a/src/executor/wall_time/perf/parse_perf_file.rs b/src/executor/wall_time/perf/parse_perf_file.rs index 20f47587..05b930c6 100644 --- a/src/executor/wall_time/perf/parse_perf_file.rs +++ b/src/executor/wall_time/perf/parse_perf_file.rs @@ -82,7 +82,7 @@ pub(super) fn parse_for_memmap2>(perf_file_path: P) -> Result>(perf_file_path: P) -> Result>(perf_file_path: P) -> Result>(&self, path: P) -> anyhow::Result<()> { - let mut file = std::fs::OpenOptions::new() + let file = std::fs::OpenOptions::new() .create(true) .append(true) .open(path)?; + const BUFFER_SIZE: usize = 256 * 1024 /* 256 KB */; + let mut writer = BufWriter::with_capacity(BUFFER_SIZE, file); for symbol in &self.symbols { writeln!( - file, + writer, "{:x} {:x} {}", symbol.addr.wrapping_add(self.load_bias), symbol.size,