From: Arnaud Giersch Date: Fri, 30 Mar 2012 11:07:03 +0000 (+0200) Subject: Take tracing API changes into account. X-Git-Tag: v0.3~14 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/commitdiff_plain/e47900c5182c4b1c34a1670babcce033748cc473?ds=inline;hp=5f6e6cd0b35a54b63928307bed66047235500ad6 Take tracing API changes into account. --- diff --git a/communicator.cpp b/communicator.cpp index 2ddea5d..e841116 100644 --- a/communicator.cpp +++ b/communicator.cpp @@ -54,9 +54,9 @@ msg_comm_t communicator::real_send(const char* dest, message* msg) { XBT_DEBUG("send %s to %s", msg->to_string().c_str(), dest); m_task_t task = MSG_task_create("message", 0.0, msg->get_size(), msg); - TRACE_msg_set_task_category(task, - msg->get_type() == message::DATA ? - TRACE_CAT_DATA : TRACE_CAT_CTRL); + MSG_task_set_category(task, + msg->get_type() == message::DATA ? + TRACE_CAT_DATA : TRACE_CAT_CTRL); return MSG_task_isend(task, dest); } diff --git a/process.cpp b/process.cpp index b5531b0..722013f 100644 --- a/process.cpp +++ b/process.cpp @@ -257,7 +257,7 @@ void process::compute_loop() ++comp_iter; double flops = opt::comp_cost(real_load); m_task_t task = MSG_task_create("computation", flops, 0.0, NULL); - TRACE_msg_set_task_category(task, TRACE_CAT_COMP); + MSG_task_set_category(task, TRACE_CAT_COMP); XBT_DEBUG("compute %g flop%s", flops, ESSE(flops)); MSG_task_execute(task); add_comp_amount(flops); diff --git a/simgrid_features.h b/simgrid_features.h index 5780d0a..f407ffd 100644 --- a/simgrid_features.h +++ b/simgrid_features.h @@ -7,6 +7,12 @@ # error "Unsupported SimGrid version. Need version > 3.5" #endif // ============================================================= // +#if SIMGRID_VERSION < MAKE_SIMGRID_VERSION(3, 7, 0) + +#define MSG_task_set_category(task, cat) TRACE_msg_set_task_category(task, cat) + +#endif + #endif // !SIMGRID_FEATURES_H // Local variables: