vm->start();
if (TRACE_msg_vm_is_enabled()) {
container_t vm_container = simgrid::instr::Container::byName(vm->getName());
- simgrid::instr::Type* state = vm_container->type_->byName("MSG_VM_STATE");
+ simgrid::instr::StateType* state =
+ static_cast<simgrid::instr::StateType*>(vm_container->type_->byName("MSG_VM_STATE"));
state->addEntityValue("start", "0 0 1"); // start is blue
- new simgrid::instr::PushStateEvent(MSG_get_clock(), vm_container, state, state->getEntityValue("start"));
+ state->pushEvent(MSG_get_clock(), vm_container, "start");
}
}
// start link
container_t msg = simgrid::instr::Container::byName(vm->getName());
simgrid::instr::Type* type = simgrid::instr::Type::getRootType()->byName("MSG_VM_LINK");
- new simgrid::instr::StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
+ new simgrid::instr::StartLinkEvent(MSG_get_clock(), simgrid::instr::Container::getRootContainer(), type, msg, "M",
+ key);
// destroy existing container of this vm
container_t existing_container = simgrid::instr::Container::byName(vm->getName());
// end link
msg = simgrid::instr::Container::byName(vm->getName());
type = simgrid::instr::Type::getRootType()->byName("MSG_VM_LINK");
- new simgrid::instr::EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
+ new simgrid::instr::EndLinkEvent(MSG_get_clock(), simgrid::instr::Container::getRootContainer(), type, msg, "M",
+ key);
}
// Inform the SRC that the migration has been correctly performed
if (TRACE_msg_vm_is_enabled()) {
container_t vm_container = simgrid::instr::Container::byName(vm->getName());
- simgrid::instr::Type* state = vm_container->type_->byName("MSG_VM_STATE");
+ simgrid::instr::StateType* state =
+ static_cast<simgrid::instr::StateType*>(vm_container->type_->byName("MSG_VM_STATE"));
state->addEntityValue("suspend", "1 0 0"); // suspend is red
- new simgrid::instr::PushStateEvent(MSG_get_clock(), vm_container, state, state->getEntityValue("suspend"));
+ state->pushEvent(MSG_get_clock(), vm_container, "suspend");
}
}
if (TRACE_msg_vm_is_enabled()) {
container_t vm_container = simgrid::instr::Container::byName(vm->getName());
- simgrid::instr::Type* type = vm_container->type_->byName("MSG_VM_STATE");
- new simgrid::instr::PopStateEvent(MSG_get_clock(), vm_container, type);
+ simgrid::instr::StateType* state =
+ static_cast<simgrid::instr::StateType*>(vm_container->type_->byName("MSG_VM_STATE"));
+ state->popEvent(MSG_get_clock(), vm_container);
}
}