diff --git a/src/runtime2/component/component.rs b/src/runtime2/component/component.rs index 09528f8b6221097aba72eccbf3283e326cdf00cc..461fc510cb5480691d3578b2a811defe5880ef73 100644 --- a/src/runtime2/component/component.rs +++ b/src/runtime2/component/component.rs @@ -260,7 +260,7 @@ pub(crate) fn default_send_data_message( let peer_handle = comp_ctx.get_peer_handle(port_info.peer_comp_id); let peer_info = comp_ctx.get_peer(peer_handle); let annotated_message = consensus.annotate_data_message(comp_ctx, port_info, value); - peer_info.handle.send_message(&sched_ctx.runtime, Message::Data(annotated_message), true); + peer_info.handle.send_message_logged(sched_ctx, Message::Data(annotated_message), true); return Ok(CompScheduling::Immediate); } @@ -319,7 +319,7 @@ pub(crate) fn default_handle_incoming_data_message( let (peer_handle, message) = control.initiate_port_blocking(comp_ctx, port_handle); let peer = comp_ctx.get_peer(peer_handle); - peer.handle.send_message(&sched_ctx.runtime, Message::Control(message), true); + peer.handle.send_message_logged(sched_ctx, Message::Control(message), true); } return IncomingData::SlotFull(incoming_message) @@ -426,7 +426,7 @@ pub(crate) fn default_handle_received_data_message( comp_ctx.set_port_state(port_handle, PortState::Open); let (peer_handle, message) = control.cancel_port_blocking(comp_ctx, port_handle); let peer_info = comp_ctx.get_peer(peer_handle); - peer_info.handle.send_message(&sched_ctx.runtime, Message::Control(message), true); + peer_info.handle.send_message_logged(sched_ctx, Message::Control(message), true); } return Ok(()); @@ -559,7 +559,7 @@ pub(crate) fn default_handle_sync_start( exec_state: &mut CompExecState, inbox_main: &mut InboxMainRef, sched_ctx: &SchedulerCtx, comp_ctx: &mut CompCtx, consensus: &mut Consensus ) { - sched_ctx.log("Component starting sync mode"); + sched_ctx.info("Component starting sync mode"); // If any messages are present for this sync round, set the appropriate flag // and notify the consensus handler of the present messages @@ -585,7 +585,7 @@ pub(crate) fn default_handle_sync_end( exec_state: &mut CompExecState, sched_ctx: &SchedulerCtx, comp_ctx: &mut CompCtx, consensus: &mut Consensus ) { - sched_ctx.log("Component ending sync mode (but possibly waiting for a solution)"); + sched_ctx.info("Component ending sync mode (but possibly waiting for a solution)"); debug_assert_eq!(exec_state.mode, CompMode::Sync); let decision = consensus.notify_sync_end_success(sched_ctx, comp_ctx); exec_state.mode = CompMode::SyncEnd; @@ -601,7 +601,7 @@ pub(crate) fn default_handle_start_exit( sched_ctx: &SchedulerCtx, comp_ctx: &mut CompCtx, consensus: &mut Consensus ) -> CompScheduling { debug_assert_eq!(exec_state.mode, CompMode::StartExit); - sched_ctx.log(&format!("Component starting exit (reason: {:?})", exec_state.exit_reason)); + sched_ctx.info(&format!("Component starting exit (reason: {:?})", exec_state.exit_reason)); exec_state.mode = CompMode::BusyExit; let exit_inside_sync = exec_state.exit_reason.is_in_sync(); @@ -628,7 +628,7 @@ pub(crate) fn default_handle_start_exit( let port_handle = comp_ctx.get_port_handle(port_id); let (peer, message) = control.initiate_port_closing(port_handle, exit_inside_sync, comp_ctx); let peer_info = comp_ctx.get_peer(peer); - peer_info.handle.send_message(&sched_ctx.runtime, Message::Control(message), true); + peer_info.handle.send_message_logged(sched_ctx, Message::Control(message), true); } return CompScheduling::Immediate; // to check if we can shut down immediately @@ -643,10 +643,10 @@ pub(crate) fn default_handle_busy_exit( ) -> CompScheduling { debug_assert_eq!(exec_state.mode, CompMode::BusyExit); if control.has_acks_remaining() { - sched_ctx.log("Component busy exiting, still has `Ack`s remaining"); + sched_ctx.info("Component busy exiting, still has `Ack`s remaining"); return CompScheduling::Sleep; } else { - sched_ctx.log("Component busy exiting, now shutting down"); + sched_ctx.info("Component busy exiting, now shutting down"); exec_state.mode = CompMode::Exit; return CompScheduling::Exit; } @@ -679,7 +679,7 @@ pub(crate) fn default_handle_sync_decision( ) ); - sched_ctx.log(&format!("Handling decision {:?} (in mode: {:?})", decision, exec_state.mode)); + sched_ctx.info(&format!("Handling decision {:?} (in mode: {:?})", decision, exec_state.mode)); consensus.notify_sync_decision(decision); if success { // We cannot get a success message if the component has encountered an @@ -747,7 +747,7 @@ fn default_handle_ack( AckAction::SendMessage(target_comp, message) => { // FIX @NoDirectHandle let mut handle = sched_ctx.runtime.get_component_public(target_comp); - handle.send_message(&sched_ctx.runtime, Message::Control(message), true); + handle.send_message_logged(sched_ctx, Message::Control(message), true); let _should_remove = handle.decrement_users(); debug_assert!(_should_remove.is_none()); }, @@ -779,7 +779,7 @@ fn default_send_ack( sched_ctx: &SchedulerCtx, comp_ctx: &CompCtx ) { let peer_info = comp_ctx.get_peer(peer_handle); - peer_info.handle.send_message(&sched_ctx.runtime, Message::Control(ControlMessage{ + peer_info.handle.send_message_logged(sched_ctx, Message::Control(ControlMessage{ id: causer_of_ack_id, sender_comp_id: comp_ctx.id, target_port_id: None, @@ -808,7 +808,7 @@ fn default_handle_unblock_put( // Retrieve peer to send the message let peer_handle = comp_ctx.get_peer_handle(port_info.peer_comp_id); let peer_info = comp_ctx.get_peer(peer_handle); - peer_info.handle.send_message(&sched_ctx.runtime, Message::Data(to_send), true); + peer_info.handle.send_message_logged(sched_ctx, Message::Data(to_send), true); exec_state.mode = CompMode::Sync; // because we're blocked on a `put`, we must've started in the sync state. exec_state.mode_port = PortId::new_invalid();