- char str[INSTR_DEFAULT_STR_SIZE];
- smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- Type* type = PJ_type_get ("MPI_STATE", container->type);
- const char *color = instr_find_color (operation);
- value* val = value::get_or_new(operation, color, type);
- new PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
+ container_t container = simgrid::instr::Container::byName(smpi_container(rank));
+ simgrid::instr::Type* state = container->type_->byName("MPI_STATE");
+ state->addEntityValue(operation, instr_find_color(operation));
+ new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, state, state->getEntityValue(operation),
+ static_cast<void*>(extra));