A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git]
/
src
/
kernel
/
actor
/
CommObserver.cpp
diff --git
a/src/kernel/actor/CommObserver.cpp
b/src/kernel/actor/CommObserver.cpp
index
6b87562
..
bb2d4bf
100644
(file)
--- a/
src/kernel/actor/CommObserver.cpp
+++ b/
src/kernel/actor/CommObserver.cpp
@@
-43,7
+43,7
@@
static void serialize_activity_test(const activity::ActivityImpl* act, std::stri
{
if (const auto* comm = dynamic_cast<activity::CommImpl const*>(act)) {
stream << " " << (short)mc::Transition::Type::COMM_TEST;
- stream << ' ' <<
(uintptr_t)comm
;
+ stream << ' ' <<
comm->get_id()
;
stream << ' ' << (comm->src_actor_ != nullptr ? comm->src_actor_->get_pid() : -1);
stream << ' ' << (comm->dst_actor_ != nullptr ? comm->dst_actor_->get_pid() : -1);
stream << ' ' << comm->get_mailbox_id();
@@
-57,7
+57,7
@@
static std::string to_string_activity_test(const activity::ActivityImpl* act)
if (const auto* comm = dynamic_cast<activity::CommImpl const*>(act)) {
const std::string src_buff_id = ptr_to_id<unsigned char>(comm->src_buff_);
const std::string dst_buff_id = ptr_to_id<unsigned char>(comm->dst_buff_);
- return "CommTest(comm_id:" +
ptr_to_id<activity::CommImpl const>(comm
) +
+ return "CommTest(comm_id:" +
std::to_string(comm->get_id()
) +
" 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:" + src_buff_id + " dstbuf:" + dst_buff_id +
@@
-97,7
+97,7
@@
static void serialize_activity_wait(const activity::ActivityImpl* act, bool time
{
if (const auto* comm = dynamic_cast<activity::CommImpl const*>(act)) {
stream << (short)mc::Transition::Type::COMM_WAIT << ' ';
- stream << timeout << ' ' <<
(uintptr_t)comm
;
+ stream << timeout << ' ' <<
comm->get_id()
;
stream << ' ' << (comm->src_actor_ != nullptr ? comm->src_actor_->get_pid() : -1);
stream << ' ' << (comm->dst_actor_ != nullptr ? comm->dst_actor_->get_pid() : -1);
@@
-112,7
+112,7
@@
static std::string to_string_activity_wait(const activity::ActivityImpl* act)
if (const auto* comm = dynamic_cast<activity::CommImpl const*>(act)) {
const std::string src_buff_id = ptr_to_id<unsigned char>(comm->src_buff_);
const std::string dst_buff_id = ptr_to_id<unsigned char>(comm->dst_buff_);
- return "CommWait(comm_id:" +
ptr_to_id<activity::CommImpl const>(comm
) +
+ return "CommWait(comm_id:" +
std::to_string(comm->get_id()
) +
" 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:" + (comm->get_mailbox() == nullptr ? "-" : comm->get_mailbox()->get_name()) +
@@
-204,15
+204,15
@@
void CommIsendSimcall::serialize(std::stringstream& stream) const
{
/* Note that the comm_ is 0 until after the execution of the simcall */
stream << (short)mc::Transition::Type::COMM_ASYNC_SEND << ' ';
- stream << (
uintptr_t)comm_ << ' ' << mbox_->get_id() << ' ' << (uintptr_t)src_buff_ << ' ' << src_buff_size
_ << ' '
- << tag_;
+ stream << (
comm_ ? comm_->get_id() : 0) << ' ' << mbox_->get_id() << ' ' << (uintptr_t)src_buff
_ << ' '
+ <<
src_buff_size_ << ' ' <<
tag_;
XBT_DEBUG("SendObserver comm:%p mbox:%u buff:%p size:%zu tag:%d", comm_, mbox_->get_id(), src_buff_, src_buff_size_,
tag_);
stream << ' ' << fun_call_;
}
std::string CommIsendSimcall::to_string() const
{
- return "CommAsyncSend(comm_id: " + std::to_string(
(uintptr_t)comm_
) + " mbox:" + std::to_string(mbox_->get_id()) +
+ return "CommAsyncSend(comm_id: " + std::to_string(
comm_->get_id()
) + " mbox:" + std::to_string(mbox_->get_id()) +
" srcbuf:" + ptr_to_id<unsigned char>(src_buff_) + " bufsize:" + std::to_string(src_buff_size_) +
" tag: " + std::to_string(tag_) + ")";
}
@@
-221,15
+221,14
@@
void CommIrecvSimcall::serialize(std::stringstream& stream) const
{
/* Note that the comm_ is 0 until after the execution of the simcall */
stream << (short)mc::Transition::Type::COMM_ASYNC_RECV << ' ';
- stream << (
uintptr_t)comm_
<< ' ' << mbox_->get_id() << ' ' << (uintptr_t)dst_buff_ << ' ' << tag_;
+ stream << (
comm_ ? comm_->get_id() : 0)
<< ' ' << mbox_->get_id() << ' ' << (uintptr_t)dst_buff_ << ' ' << tag_;
XBT_DEBUG("RecvObserver comm:%p mbox:%u buff:%p tag:%d", comm_, mbox_->get_id(), dst_buff_, tag_);
stream << ' ' << fun_call_;
}
std::string CommIrecvSimcall::to_string() const
{
- return "CommAsyncRecv(comm_id: " + ptr_to_id<activity::CommImpl const>(comm_) +
- " mbox:" + std::to_string(mbox_->get_id()) + " dstbuf:" + ptr_to_id<unsigned char>(dst_buff_) +
- " tag: " + std::to_string(tag_) + ")";
+ return "CommAsyncRecv(comm_id: " + std::to_string(comm_->get_id()) + " mbox:" + std::to_string(mbox_->get_id()) +
+ " dstbuf:" + ptr_to_id<unsigned char>(dst_buff_) + " tag: " + std::to_string(tag_) + ")";
}
} // namespace simgrid::kernel::actor