Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Display the mailbox name when showing a deadlocking situation
[simgrid.git] / src / kernel / actor / CommObserver.cpp
index 98e0af8..983ba94 100644 (file)
@@ -115,7 +115,8 @@ static std::string to_string_activity_wait(const activity::ActivityImpl* act)
     return std::string("CommWait(comm_id:") + ptr_to_id<activity::CommImpl const>(comm) +
            " src:" + std::to_string(comm->src_actor_ != nullptr ? comm->src_actor_->get_pid() : -1) +
            " dst:" + std::to_string(comm->dst_actor_ != nullptr ? comm->dst_actor_->get_pid() : -1) +
-           " mbox:" + std::to_string(comm->get_mailbox_id()) + " srcbuf:" + ptr_to_id<unsigned char>(comm->src_buff_) +
+           " mbox:" + std::string(comm->get_mailbox() == nullptr ? xbt::string("-") : comm->get_mailbox()->get_name()) +
+           "(id:" + std::to_string(comm->get_mailbox_id()) + ") srcbuf:" + ptr_to_id<unsigned char>(comm->src_buff_) +
            " dstbuf:" + ptr_to_id<unsigned char>(comm->dst_buff_) + " bufsize:" + std::to_string(comm->src_buff_size_) +
            ")";
   } else {