- simgrid::instr::Type* type = PJ_type_get_root()->getChildOrNull(#cat); \
- if (not type) { \
- type = simgrid::instr::Type::eventNew(#cat, PJ_type_get_root()); \
- } \
- char cont_name[25]; \
- snprintf(cont_name, 25, "rank-%d", smpi_process()->index()); \
- simgrid::instr::Value* val = \
- simgrid::instr::Value::byNameOrCreate(Colls::mpi_coll_##cat##_description[i].name, "1.0 1.0 1.0", type); \
- new simgrid::instr::NewEvent(SIMIX_get_clock(), simgrid::instr::Container::byName(cont_name), type, val); \
+ simgrid::instr::EventType* type = \
+ simgrid::instr::Container::get_root()->type_->by_name_or_create<simgrid::instr::EventType>(#cat); \
+ \
+ std::string cont_name = std::string("rank-" + std::to_string(simgrid::s4u::this_actor::get_pid())); \
+ type->add_entity_value(Colls::mpi_coll_##cat##_description[i].name, "1.0 1.0 1.0"); \
+ new simgrid::instr::NewEvent(SIMIX_get_clock(), simgrid::instr::Container::by_name(cont_name), type, \
+ type->get_entity_value(Colls::mpi_coll_##cat##_description[i].name)); \