From 439653b02a5625c8c886de4e44e4173537ea9591 Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Tue, 20 Dec 2022 17:47:02 +0800 Subject: [PATCH] Do not acquire channel name on the core1 Signed-off-by: Egor Savkin --- src/runtime/src/comms.rs | 15 ++++++++++++--- src/runtime/src/kernel/dma.rs | 9 ++++----- src/runtime/src/rtio_mgt.rs | 6 +++--- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/runtime/src/comms.rs b/src/runtime/src/comms.rs index e6aaa74..fcc21e1 100644 --- a/src/runtime/src/comms.rs +++ b/src/runtime/src/comms.rs @@ -1,4 +1,4 @@ -use core::fmt; +use core::{fmt, slice, str}; use core::cell::RefCell; use alloc::{vec, vec::Vec, string::String, collections::BTreeMap, rc::Rc}; use log::{info, warn, error}; @@ -31,7 +31,7 @@ use crate::rpc; use crate::moninj; use crate::mgmt; use crate::analyzer; -use crate::rtio_mgt; +use crate::rtio_mgt::{self, resolve_channel_name}; #[cfg(has_drtio)] use crate::pl; @@ -246,7 +246,16 @@ async fn handle_run_kernel(stream: Option<&TcpStream>, control: &Rc (), Ok(Packet::DestinationSequenceErrorReply { channel }) =>{ - error!("[DEST#{}] RTIO sequence error involving channel 0x{:04x}", destination, channel); + error!("[DEST#{}] RTIO sequence error involving channel {} 0x{:04x}", destination, resolve_channel_name(channel), channel); unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_SEQUENCE_ERROR }; } Ok(Packet::DestinationCollisionReply { channel }) =>{ - error!("[DEST#{}] RTIO collision involving channel 0x{:04x}", destination, channel); + error!("[DEST#{}] RTIO collision involving channel {} 0x{:04x}", destination, resolve_channel_name(channel), channel); unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_COLLISION }; } Ok(Packet::DestinationBusyReply { channel }) =>{ - error!("[DEST#{}] RTIO busy error involving channel 0x{:04x}", destination, channel); + error!("[DEST#{}] RTIO busy error involving channel {} 0x{:04x}", destination, resolve_channel_name(channel), channel); unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_BUSY }; } Ok(packet) => error!("[DEST#{}] received unexpected aux packet: {:?}", destination, packet),