static bool trace_configured = false;
static bool trace_active = false;
- static type_t rootType = nullptr; /* the root type */
+ static Type* rootType = nullptr; /* the root type */
instr_fmt_type_t instr_fmt_type = instr_fmt_paje;
{
unsigned int i = created_categories.size();
fprintf (file, " values = (");
- for (auto cat : created_categories) {
+ for (auto const& cat : created_categories) {
--i;
fprintf(file, "\"%s%s\"", name, cat.c_str());
if (i > 0) {
XBT_DEBUG ("Tracing is resumed.");
previous_trace_state = -1;
}
-
-#undef OPT_TRACING
-#undef OPT_TRACING_PLATFORM
-#undef OPT_TRACING_TOPOLOGY
-#undef OPT_TRACING_SMPI
-#undef OPT_TRACING_SMPI_GROUP
-#undef OPT_TRACING_CATEGORIZED
-#undef OPT_TRACING_UNCATEGORIZED
-#undef OPT_TRACING_MSG_PROCESS
-#undef OPT_TRACING_FILENAME
-#undef OPT_TRACING_BUFFER
-#undef OPT_TRACING_ONELINK_ONLY
-#undef OPT_TRACING_DISABLE_DESTROY
-#undef OPT_TRACING_BASIC
-#undef OPT_TRACING_COMMENT
-#undef OPT_TRACING_COMMENT_FILE
-#undef OPT_VIVA_UNCAT_CONF
-#undef OPT_VIVA_CAT_CONF
return nullptr;
xbt_dynar_t ret = xbt_dynar_new (sizeof(char*), &xbt_free_ref);
- for (auto name : *filter)
+ for (auto const& name : *filter)
xbt_dynar_push_as(ret, char*, xbt_strdup(name.c_str()));
return ret;
}
XBT_DEBUG("MARK,declare %s", mark_type);
- PJ_type_event_new(mark_type, PJ_type_get_root());
+ Type::eventNew(mark_type, PJ_type_get_root());
declared_marks.insert(mark_type);
}
if (not mark_value)
THROWF (tracing_error, 1, "mark_value is nullptr");
- type_t type = PJ_type_get (mark_type, PJ_type_get_root());
+ Type* type = PJ_type_get (mark_type, PJ_type_get_root());
if (not type) {
THROWF (tracing_error, 1, "mark_type with name (%s) is not declared", mark_type);
}
THROWF (tracing_error, 1, "mark_value is nullptr");
//check if mark_type is already declared
- type_t type = PJ_type_get (mark_type, PJ_type_get_root());
+ Type* type = PJ_type_get (mark_type, PJ_type_get_root());
if (not type) {
THROWF (tracing_error, 1, "mark_type with name (%s) is not declared", mark_type);
}
char valuestr[100];
snprintf(valuestr, 100, "%g", value);
container_t container = PJ_container_get(resource);
- type_t type = PJ_type_get (variable, container->type);
+ Type* type = PJ_type_get (variable, container->type);
switch (what){
case INSTR_US_SET:
new SetVariableEvent(time, container, type, value);
std::vector<simgrid::surf::LinkImpl*> route;
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(src_elm, dst_elm, &route, nullptr);
- for (auto link : route)
+ for (auto const& link : route)
instr_user_variable(time, link->cname(), variable, father_type, value, what, nullptr, &user_link_variables);
}
void TRACE_host_set_state(const char* host, const char* state, const char* value_str)
{
container_t container = PJ_container_get(host);
- type_t type = PJ_type_get (state, container->type);
+ Type* type = PJ_type_get (state, container->type);
value* val =
value::get_or_new(value_str, nullptr, type); /* if user didn't declare a value with a color, use nullptr color */
new SetStateEvent(MSG_get_clock(), container, type, val);
void TRACE_host_push_state(const char* host, const char* state, const char* value_str)
{
container_t container = PJ_container_get(host);
- type_t type = PJ_type_get (state, container->type);
+ Type* type = PJ_type_get (state, container->type);
value* val =
value::get_or_new(value_str, nullptr, type); /* if user didn't declare a value with a color, use nullptr color */
new PushStateEvent(MSG_get_clock(), container, type, val);
void TRACE_host_pop_state (const char *host, const char *state)
{
container_t container = PJ_container_get(host);
- type_t type = PJ_type_get (state, container->type);
+ Type* type = PJ_type_get (state, container->type);
new PopStateEvent(MSG_get_clock(), container, type);
}
return;
XBT_DEBUG("%s: dump until %f. starts", __FUNCTION__, TRACE_last_timestamp_to_dump);
if (force){
- for (auto event : buffer){
+ for (auto const& event : buffer) {
event->print();
delete event;
}
buffer.clear();
}else{
std::vector<PajeEvent*>::iterator i = buffer.begin();
- for (auto event :buffer){
+ for (auto const& event : buffer) {
double head_timestamp = event->timestamp;
if (head_timestamp > TRACE_last_timestamp_to_dump)
break;
void buffer_debug(std::vector<PajeEvent*> *buf) {
return;
XBT_DEBUG(">>>>>> Dump the state of the buffer. %zu events", buf->size());
- for (auto event :*buf){
+ for (auto const& event : *buf) {
event->print();
XBT_DEBUG("%p %s", event, stream.str().c_str());
stream.str("");
}
}
- void LogLinkTypeDefinition(type_t type, type_t source, type_t dest)
+ void LogLinkTypeDefinition(type_t type, Type* source, Type* dest)
{
XBT_DEBUG("%s: event_type=%d", __FUNCTION__, PAJE_DefineLinkType);
//print it
}
- SetVariableEvent::SetVariableEvent (double timestamp, container_t container, type_t type, double value)
+ SetVariableEvent::SetVariableEvent (double timestamp, container_t container, Type* type, double value)
{
this->event_type = PAJE_SetVariable;
this->timestamp = timestamp;
}
}
- AddVariableEvent::AddVariableEvent (double timestamp, container_t container, type_t type, double value)
+ AddVariableEvent::AddVariableEvent (double timestamp, container_t container, Type* type, double value)
{
this->event_type = PAJE_AddVariable;
this->timestamp = timestamp;
}
}
- SubVariableEvent::SubVariableEvent (double timestamp, container_t container, type_t type, double value)
+ SubVariableEvent::SubVariableEvent (double timestamp, container_t container, Type* type, double value)
{
this->event_type = PAJE_SubVariable;
this->timestamp = timestamp;
}
}
- SetStateEvent::SetStateEvent(double timestamp, container_t container, type_t type, value* val)
+ SetStateEvent::SetStateEvent(double timestamp, container_t container, Type* type, value* val)
{
this->event_type = PAJE_SetState;
this->timestamp = timestamp;
}
}
- PushStateEvent::PushStateEvent(double timestamp, container_t container, type_t type, value* val, void* extra)
+ PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, value* val, void* extra)
{
this->event_type = PAJE_PushState;
this->timestamp = timestamp;
insert_into_buffer (this);
}
- PushStateEvent::PushStateEvent(double timestamp, container_t container, type_t type, value* val)
+ PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, value* val)
: PushStateEvent(timestamp, container, type, val, nullptr)
{}
void PushStateEvent::print() {
}
- PopStateEvent::PopStateEvent (double timestamp, container_t container, type_t type)
+ PopStateEvent::PopStateEvent (double timestamp, container_t container, Type* type)
{
this->event_type = PAJE_PopState;
this->timestamp = timestamp;
}
}
- ResetStateEvent::ResetStateEvent (double timestamp, container_t container, type_t type)
+ ResetStateEvent::ResetStateEvent (double timestamp, container_t container, Type* type)
{
this->event_type = PAJE_ResetState;
this->timestamp = timestamp;
free(key);
}
StartLinkEvent::StartLinkEvent (double timestamp, container_t container,
- type_t type, container_t sourceContainer, const char *value, const char *key)
+ Type* type, container_t sourceContainer, const char *value, const char *key)
: StartLinkEvent(timestamp, container, type, sourceContainer, value, key, -1)
{}
- StartLinkEvent::StartLinkEvent (double timestamp, container_t container, type_t type, container_t sourceContainer,
+ StartLinkEvent::StartLinkEvent (double timestamp, container_t container, Type* type, container_t sourceContainer,
const char *value, const char *key, int size)
{
event_type = PAJE_StartLink;
}
}
- EndLinkEvent::EndLinkEvent (double timestamp, container_t container, type_t type, container_t destContainer,
+ EndLinkEvent::EndLinkEvent (double timestamp, container_t container, Type* type, container_t destContainer,
const char *value, const char *key)
{
this->event_type = PAJE_EndLink;
}
}
- NewEvent::NewEvent(double timestamp, container_t container, type_t type, value* val)
+ NewEvent::NewEvent(double timestamp, container_t container, Type* type, value* val)
{
this->event_type = PAJE_NewEvent;
this->timestamp = timestamp;
vm->start();
if (TRACE_msg_vm_is_enabled()) {
container_t vm_container = PJ_container_get(vm->getCname());
- type_t type = PJ_type_get("MSG_VM_STATE", vm_container->type);
+ Type* type = PJ_type_get("MSG_VM_STATE", vm_container->type);
value* val = value::get_or_new("start", "0 0 1", type); // start is blue
new PushStateEvent(MSG_get_clock(), vm_container, type, val);
}
// start link
container_t msg = PJ_container_get(vm->getCname());
- type_t type = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
+ Type* type = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
new StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
// destroy existing container of this vm
if (vm->pimpl_vm_->dp_objs.empty())
return;
- for (auto elm : vm->pimpl_vm_->dp_objs) {
+ for (auto const& elm : vm->pimpl_vm_->dp_objs) {
dirty_page_t dp = elm.second;
double remaining = MSG_task_get_flops_amount(dp->task);
dp->prev_clock = MSG_get_clock();
{
double total = 0;
- for (auto elm : vm->pimpl_vm_->dp_objs) {
+ for (auto const& elm : vm->pimpl_vm_->dp_objs) {
const char* key = elm.first.c_str();
dirty_page_t dp = elm.second;
double remaining = MSG_task_get_flops_amount(dp->task);
if (TRACE_msg_vm_is_enabled()) {
container_t vm_container = PJ_container_get(vm->getCname());
- type_t type = PJ_type_get("MSG_VM_STATE", vm_container->type);
+ Type* type = PJ_type_get("MSG_VM_STATE", vm_container->type);
value* val = value::get_or_new("suspend", "1 0 0", type); // suspend is red
new PushStateEvent(MSG_get_clock(), vm_container, type, val);
}
if (TRACE_msg_vm_is_enabled()) {
container_t vm_container = PJ_container_get(vm->getCname());
- type_t type = PJ_type_get("MSG_VM_STATE", vm_container->type);
+ Type* type = PJ_type_get("MSG_VM_STATE", vm_container->type);
new PopStateEvent(MSG_get_clock(), vm_container, type);
}
}
void TRACE_smpi_release()
{
- for (auto elm : keys)
+ for (auto const& elm : keys)
delete elm.second;
}
#if HAVE_PAPI
papi_counter_t counters = smpi_process()->papi_counters();
- for (auto& it : counters) {
+ for (auto const& it : counters) {
/**
* Check whether this variable already exists or not. Otherwise, it will be created
* multiple times but only the last one would be used...
*/
- if (PJ_type_get_or_null(it.first.c_str(), container->type) == nullptr) {
- PJ_type_variable_new(it.first.c_str(), nullptr, container->type);
+ if (s_type::getOrNull(it.first.c_str(), container->type) == nullptr) {
+ Type::variableNew(it.first.c_str(), nullptr, container->type);
}
}
#endif
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
+ 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));
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
+ Type* type = PJ_type_get ("MPI_STATE", container->type);
new PopStateEvent (SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get(str);
- type_t type = PJ_type_get("MPI_STATE", container->type);
+ Type* type = PJ_type_get("MPI_STATE", container->type);
const char* color = instr_find_color("computing");
new PushStateEvent(SIMIX_get_clock(), container, type, value::get_or_new("computing", color, type));
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
+ Type* type = PJ_type_get ("MPI_STATE", container->type);
value* val = value::get_or_new("computing", nullptr, type);
new PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
+ Type* type = PJ_type_get ("MPI_STATE", container->type);
new PopStateEvent (SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
+ Type* type = PJ_type_get ("MPI_STATE", container->type);
const char *color = instr_find_color ("sleeping");
value* val = value::get_or_new("sleeping", color, type);
new PushStateEvent(SIMIX_get_clock(), container, type, val);
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
+ Type* type = PJ_type_get ("MPI_STATE", container->type);
value* val = value::get_or_new("sleeping", nullptr, type);
new PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
+ Type* type = PJ_type_get ("MPI_STATE", container->type);
new PopStateEvent (SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
+ Type* type = PJ_type_get ("MPI_STATE", container->type);
value* val = value::get_or_new("test", nullptr, type);
new PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
+ Type* type = PJ_type_get ("MPI_STATE", container->type);
new PopStateEvent (SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
+ 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));
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
+ Type* type = PJ_type_get ("MPI_STATE", container->type);
new PopStateEvent (SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(src, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
+ Type* type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
XBT_DEBUG("Send tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
new StartLinkEvent (SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key, size);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(dst, str, INSTR_DEFAULT_STR_SIZE);
container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
+ Type* type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
XBT_DEBUG("Recv tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
new EndLinkEvent (SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key);
}
father->type->name,
src->type->name, src->type->id,
dst->type->name, dst->type->id);
- type_t link_type = PJ_type_get_or_null (link_typename, father->type);
+ Type* link_type = Type::getOrNull (link_typename, father->type);
if (link_type == nullptr){
- link_type = PJ_type_link_new (link_typename, father->type, src->type, dst->type);
+ link_type = Type::linkNew (link_typename, father->type, src->type, dst->type);
}
//register EDGE types for triva configuration
XBT_DEBUG("Graph extraction for NetZone = %s", netzone->getCname());
if (not netzone->getChildren()->empty()) {
//bottom-up recursion
- for (auto nz_son : *netzone->getChildren()) {
+ for (auto const& nz_son : *netzone->getChildren()) {
container_t child_container = static_cast<container_t>(xbt_dict_get(container->children, nz_son->getCname()));
recursiveGraphExtraction(nz_son, child_container, filter);
}
PJ_container_set_root (root);
if (TRACE_smpi_is_enabled()) {
- type_t mpi = PJ_type_get_or_null ("MPI", root->type);
+ Type* mpi = Type::getOrNull ("MPI", root->type);
if (mpi == nullptr){
- mpi = PJ_type_container_new("MPI", root->type);
+ mpi = Type::containerNew("MPI", root->type);
if (not TRACE_smpi_is_grouped())
- PJ_type_state_new ("MPI_STATE", mpi);
- PJ_type_link_new ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
+ Type::stateNew ("MPI_STATE", mpi);
+ Type::linkNew ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
}
}
container_t container = PJ_container_new(link.name(), INSTR_LINK, father);
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_link())) {
- type_t bandwidth = PJ_type_get_or_null("bandwidth", container->type);
+ Type* bandwidth = Type::getOrNull("bandwidth", container->type);
if (bandwidth == nullptr) {
- bandwidth = PJ_type_variable_new("bandwidth", nullptr, container->type);
+ bandwidth = Type::variableNew("bandwidth", nullptr, container->type);
}
- type_t latency = PJ_type_get_or_null("latency", container->type);
+ Type* latency = Type::getOrNull("latency", container->type);
if (latency == nullptr) {
- latency = PJ_type_variable_new("latency", nullptr, container->type);
+ latency = Type::variableNew("latency", nullptr, container->type);
}
new SetVariableEvent(0, container, bandwidth, bandwidth_value);
new SetVariableEvent(0, container, latency, latency_value);
}
if (TRACE_uncategorized()) {
- type_t bandwidth_used = PJ_type_get_or_null("bandwidth_used", container->type);
+ Type* bandwidth_used = Type::getOrNull("bandwidth_used", container->type);
if (bandwidth_used == nullptr) {
- PJ_type_variable_new("bandwidth_used", "0.5 0.5 0.5", container->type);
+ Type::variableNew("bandwidth_used", "0.5 0.5 0.5", container->type);
}
}
}
container_t container = PJ_container_new(host.getCname(), INSTR_HOST, father);
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_speed())) {
- type_t speed = PJ_type_get_or_null ("power", container->type);
+ Type* speed = Type::getOrNull ("power", container->type);
if (speed == nullptr){
- speed = PJ_type_variable_new ("power", nullptr, container->type);
+ speed = Type::variableNew ("power", nullptr, container->type);
}
double current_speed_state = host.getSpeed();
new SetVariableEvent (0, container, speed, current_speed_state);
}
if (TRACE_uncategorized()){
- type_t speed_used = PJ_type_get_or_null ("power_used", container->type);
+ Type* speed_used = Type::getOrNull ("power_used", container->type);
if (speed_used == nullptr){
- PJ_type_variable_new ("power_used", "0.5 0.5 0.5", container->type);
+ Type::variableNew ("power_used", "0.5 0.5 0.5", container->type);
}
}
if (TRACE_smpi_is_enabled() && TRACE_smpi_is_grouped()){
- type_t mpi = PJ_type_get_or_null ("MPI", container->type);
+ Type* mpi = Type::getOrNull ("MPI", container->type);
if (mpi == nullptr){
- mpi = PJ_type_container_new("MPI", container->type);
- PJ_type_state_new ("MPI_STATE", mpi);
+ mpi = Type::containerNew("MPI", container->type);
+ Type::stateNew ("MPI_STATE", mpi);
}
}
if (TRACE_msg_process_is_enabled()) {
- type_t msg_process = PJ_type_get_or_null ("MSG_PROCESS", container->type);
+ Type* msg_process = Type::getOrNull ("MSG_PROCESS", container->type);
if (msg_process == nullptr){
- msg_process = PJ_type_container_new("MSG_PROCESS", container->type);
- type_t state = PJ_type_state_new ("MSG_PROCESS_STATE", msg_process);
+ msg_process = Type::containerNew("MSG_PROCESS", container->type);
+ Type* state = Type::stateNew ("MSG_PROCESS_STATE", msg_process);
value PJ_value("suspend", "1 0 1", state);
value::get_or_new("sleep", "1 1 0", state);
value::get_or_new("receive", "1 0 0", state);
value::get_or_new("send", "0 0 1", state);
value::get_or_new("task_execute", "0 1 1", state);
- PJ_type_link_new ("MSG_PROCESS_LINK", PJ_type_get_root(), msg_process, msg_process);
- PJ_type_link_new ("MSG_PROCESS_TASK_LINK", PJ_type_get_root(), msg_process, msg_process);
+ Type::linkNew ("MSG_PROCESS_LINK", PJ_type_get_root(), msg_process, msg_process);
+ Type::linkNew ("MSG_PROCESS_TASK_LINK", PJ_type_get_root(), msg_process, msg_process);
}
}
if (TRACE_msg_vm_is_enabled()) {
- type_t msg_vm = PJ_type_get_or_null ("MSG_VM", container->type);
+ Type* msg_vm = Type::getOrNull ("MSG_VM", container->type);
if (msg_vm == nullptr){
- msg_vm = PJ_type_container_new("MSG_VM", container->type);
- type_t state = PJ_type_state_new ("MSG_VM_STATE", msg_vm);
+ msg_vm = Type::containerNew("MSG_VM", container->type);
+ Type* state = Type::stateNew ("MSG_VM_STATE", msg_vm);
value PJ_value("suspend", "1 0 1", state);
value::get_or_new("sleep", "1 1 0", state);
value::get_or_new("receive", "1 0 0", state);
value::get_or_new("send", "0 0 1", state);
value::get_or_new("task_execute", "0 1 1", state);
- PJ_type_link_new ("MSG_VM_LINK", PJ_type_get_root(), msg_vm, msg_vm);
- PJ_type_link_new ("MSG_VM_PROCESS_LINK", PJ_type_get_root(), msg_vm, msg_vm);
+ Type::linkNew ("MSG_VM_LINK", PJ_type_get_root(), msg_vm, msg_vm);
+ Type::linkNew ("MSG_VM_PROCESS_LINK", PJ_type_get_root(), msg_vm, msg_vm);
}
}
/*
* user categories support
*/
- static void recursiveNewVariableType (const char *new_typename, const char *color, type_t root)
+ static void recursiveNewVariableType (const char *new_typename, const char *color, Type* root)
{
if (not strcmp(root->name, "HOST")) {
char tnstr[INSTR_DEFAULT_STR_SIZE];
snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "p%s", new_typename);
- PJ_type_variable_new (tnstr, color, root);
+ Type::variableNew (tnstr, color, root);
}
if (not strcmp(root->name, "MSG_VM")) {
char tnstr[INSTR_DEFAULT_STR_SIZE];
snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "p%s", new_typename);
- PJ_type_variable_new (tnstr, color, root);
+ Type::variableNew (tnstr, color, root);
}
if (not strcmp(root->name, "LINK")) {
char tnstr[INSTR_DEFAULT_STR_SIZE];
snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "b%s", new_typename);
- PJ_type_variable_new (tnstr, color, root);
+ Type::variableNew (tnstr, color, root);
}
xbt_dict_cursor_t cursor = nullptr;
- type_t child_type;
+ Type* child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
recursiveNewVariableType (new_typename, color, child_type);
recursiveNewVariableType (new_typename, color, PJ_type_get_root());
}
- static void recursiveNewUserVariableType (const char *father_type, const char *new_typename, const char *color, type_t root)
+ static void recursiveNewUserVariableType (const char *father_type, const char *new_typename, const char *color, Type* root)
{
if (not strcmp(root->name, father_type)) {
- PJ_type_variable_new (new_typename, color, root);
+ Type::variableNew (new_typename, color, root);
}
xbt_dict_cursor_t cursor = nullptr;
- type_t child_type;
+ Type* child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
recursiveNewUserVariableType (father_type, new_typename, color, child_type);
recursiveNewUserVariableType (father_type, new_typename, color, PJ_type_get_root());
}
- static void recursiveNewUserStateType (const char *father_type, const char *new_typename, type_t root)
+ static void recursiveNewUserStateType (const char *father_type, const char *new_typename, Type* root)
{
if (not strcmp(root->name, father_type)) {
- PJ_type_state_new (new_typename, root);
+ Type::stateNew (new_typename, root);
}
xbt_dict_cursor_t cursor = nullptr;
- type_t child_type;
+ Type* child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
recursiveNewUserStateType (father_type, new_typename, child_type);
recursiveNewUserStateType (father_type, new_typename, PJ_type_get_root());
}
- static void recursiveNewValueForUserStateType(const char* type_name, const char* val, const char* color, type_t root)
+ static void recursiveNewValueForUserStateType(const char* type_name, const char* val, const char* color, Type* root)
{
if (not strcmp(root->name, type_name)) {
value PJ_value(val, color, root);
}
xbt_dict_cursor_t cursor = nullptr;
- type_t child_type;
+ Type* child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
recursiveNewValueForUserStateType(type_name, val, color, child_type);
{
if (not netzone->getChildren()->empty()) {
//bottom-up recursion
- for (auto netzone_child : *netzone->getChildren()) {
+ for (auto const& netzone_child : *netzone->getChildren()) {
container_t child_container =
static_cast<container_t>(xbt_dict_get(container->children, netzone_child->getCname()));
recursiveXBTGraphExtraction(graph, nodes, edges, netzone_child, child_container);