}
XBT_DEBUG("MARK,declare %s", mark_type);
- simgrid::instr::Type::getRootType()->getOrCreateEventType(mark_type);
+ simgrid::instr::Container::getRootContainer()->type_->getOrCreateEventType(mark_type);
declared_marks.insert(mark_type);
}
THROWF (tracing_error, 1, "mark_value is nullptr");
simgrid::instr::EventType* type =
- static_cast<simgrid::instr::EventType*>(simgrid::instr::Type::getRootType()->byName(mark_type));
+ static_cast<simgrid::instr::EventType*>(simgrid::instr::Container::getRootContainer()->type_->byName(mark_type));
if (not type) {
THROWF (tracing_error, 1, "mark_type with name (%s) is not declared", mark_type);
} else {
//check if mark_type is already declared
simgrid::instr::EventType* type =
- static_cast<simgrid::instr::EventType*>(simgrid::instr::Type::getRootType()->byName(mark_type));
+ static_cast<simgrid::instr::EventType*>(simgrid::instr::Container::getRootContainer()->type_->byName(mark_type));
if (not type) {
THROWF (tracing_error, 1, "mark_type with name (%s) is not declared", mark_type);
} else {
}
}else{
if (created != filter->end()) { // declared, let's work
- char valuestr[100];
- snprintf(valuestr, 100, "%g", value);
- container_t container = simgrid::instr::Container::byName(resource);
- simgrid::instr::VariableType* variable =
- static_cast<simgrid::instr::VariableType*>(container->type_->byName(variable_name));
+ simgrid::instr::VariableType* variable = simgrid::instr::Container::byName(resource)->getVariable(variable_name);
switch (what){
case INSTR_US_SET:
- variable->setEvent(time, container, value);
+ variable->setEvent(time, value);
break;
case INSTR_US_ADD:
- variable->addEvent(time, container, value);
+ variable->addEvent(time, value);
break;
case INSTR_US_SUB:
- variable->subEvent(time, container, value);
+ variable->subEvent(time, value);
break;
default:
THROW_IMPOSSIBLE;