From 9c1ec260c0061405198cd44bcfcbd4a687dc5e63 Mon Sep 17 00:00:00 2001 From: Victor Dumitrescu Date: Tue, 9 Dec 2025 14:42:12 +0100 Subject: [PATCH] Etherlink/kernel: more detailed durable storage traces --- etherlink/kernel_latest/runtime/src/runtime.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/etherlink/kernel_latest/runtime/src/runtime.rs b/etherlink/kernel_latest/runtime/src/runtime.rs index f1351d83cc2f..9a7c2451336e 100644 --- a/etherlink/kernel_latest/runtime/src/runtime.rs +++ b/etherlink/kernel_latest/runtime/src/runtime.rs @@ -115,7 +115,7 @@ impl + Borrow, Internal: InternalRuntime> S self.host.borrow().store_read(path, from_offset, max_bytes) } - #[instrument(skip(self, buffer, from_offset))] + #[instrument(skip(self, buffer, from_offset), fields(size))] #[inline(always)] fn store_read_slice( &self, @@ -123,6 +123,9 @@ impl + Borrow, Internal: InternalRuntime> S from_offset: usize, buffer: &mut [u8], ) -> Result { + #[cfg(feature = "tracing")] + tracing::Span::current().record("size", buffer.len()); + self.host .borrow() .store_read_slice(path, from_offset, buffer) @@ -139,7 +142,7 @@ impl + Borrow, Internal: InternalRuntime> S Ok(res) } - #[instrument(skip(self, src))] + #[instrument(skip(self, src), fields(size))] #[inline(always)] fn store_write( &mut self, @@ -147,6 +150,9 @@ impl + Borrow, Internal: InternalRuntime> S src: &[u8], at_offset: usize, ) -> Result<(), RuntimeError> { + #[cfg(feature = "tracing")] + tracing::Span::current().record("size", src.len()); + self.host.borrow_mut().store_write(path, src, at_offset) } @@ -284,6 +290,7 @@ impl + Borrow, Internal: InternalRuntime> S impl + BorrowMut, Internal: InternalRuntime> InternalRuntime for KernelHost { + #[instrument(skip(self))] #[inline(always)] fn __internal_store_get_hash( &mut self, -- GitLab