/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/instr/instr_private.h"
-#include "src/instr/instr_smpi.h"
+#include "simgrid/sg_config.h"
+#include "src/instr/instr_private.hpp"
+#include "src/instr/instr_smpi.hpp"
- XBT_DEBUG("%s: insert event_type=%d, timestamp=%f, buffersize=%zu)", __FUNCTION__, (int)tbi->eventType_,
- tbi->timestamp_, buffer.size());
+ XBT_DEBUG("%s: insert event_type=%d, timestamp=%f, buffersize=%zu)", __FUNCTION__, static_cast<int>(eventType_),
+ timestamp_, buffer.size());
std::vector<simgrid::instr::PajeEvent*>::reverse_iterator i;
for (i = buffer.rbegin(); i != buffer.rend(); ++i) {
simgrid::instr::PajeEvent* e1 = *i;
std::vector<simgrid::instr::PajeEvent*>::reverse_iterator i;
for (i = buffer.rbegin(); i != buffer.rend(); ++i) {
simgrid::instr::PajeEvent* e1 = *i;
- XBT_DEBUG("compare to %p is of type %d; timestamp:%f", e1, (int)e1->eventType_, e1->timestamp_);
- if (e1->timestamp_ <= tbi->timestamp_)
+ XBT_DEBUG("compare to %p is of type %d; timestamp:%f", e1, static_cast<int>(e1->eventType_), e1->timestamp_);
+ if (e1->timestamp_ <= timestamp_)
else if (i == buffer.rbegin())
XBT_DEBUG("%s: inserted at end", __FUNCTION__);
else
else if (i == buffer.rbegin())
XBT_DEBUG("%s: inserted at end", __FUNCTION__);
else
- XBT_DEBUG("%s: inserted at pos= %zd from its end", __FUNCTION__,
- std::distance(buffer.rbegin(),i));
- buffer.insert(i.base(), tbi);
+ XBT_DEBUG("%s: inserted at pos= %zd from its end", __FUNCTION__, std::distance(buffer.rbegin(), i));
+ buffer.insert(i.base(), this);
TRACE_precision(), 0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineContainerType;
TRACE_precision(), 0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineContainerType;
TRACE_precision(), 0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineVariableType;
TRACE_precision(), 0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineVariableType;
0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineStateType;
0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineStateType;
TRACE_precision(), 0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineEventType;
TRACE_precision(), 0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineEventType;
0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineLinkType;
0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineLinkType;
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineEntityValue;
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineEntityValue;
- stream << " " << val->id_ << " " << val->father_->id_ << " " << val->name_;
- if (val->color_)
- stream << " \"" << val->color_ << "\"";
+ stream << " " << id_ << " " << father_->getId() << " " << name_;
+ if (isColored())
+ stream << " \"" << color_ << "\"";
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
if (not xbt_cfg_get_boolean("tracing/smpi/format/ti-one-file") || tracing_files.size() == 1) {
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
if (not xbt_cfg_get_boolean("tracing/smpi/format/ti-one-file") || tracing_files.size() == 1) {
}
simgrid::instr::SetVariableEvent::SetVariableEvent(double timestamp, container_t container, Type* type, double value)
}
simgrid::instr::SetVariableEvent::SetVariableEvent(double timestamp, container_t container, Type* type, double value)
- : container(container), type(type), value(value)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_SetVariable), value(value)
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
simgrid::instr::AddVariableEvent::AddVariableEvent(double timestamp, container_t container, simgrid::instr::Type* type,
double value)
simgrid::instr::AddVariableEvent::AddVariableEvent(double timestamp, container_t container, simgrid::instr::Type* type,
double value)
- : container(container), type(type), value(value)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_AddVariable), value(value)
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
}
simgrid::instr::SubVariableEvent::SubVariableEvent(double timestamp, container_t container, Type* type, double value)
}
simgrid::instr::SubVariableEvent::SubVariableEvent(double timestamp, container_t container, Type* type, double value)
- : container(container), type(type), value(value)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_SubVariable), value(value)
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
}
simgrid::instr::SetStateEvent::SetStateEvent(double timestamp, container_t container, Type* type, Value* value)
}
simgrid::instr::SetStateEvent::SetStateEvent(double timestamp, container_t container, Type* type, Value* value)
- : container(container), type(type), value(value)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_SetState), value(value)
#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
#endif
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
#endif
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
stream << " \"" << filename << "\" " << linenumber;
#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
stream << " \"" << filename << "\" " << linenumber;
simgrid::instr::PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, Value* value,
void* extra)
simgrid::instr::PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, Value* value,
void* extra)
- : container(container), type(type), value(value), extra_(extra)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_PushState), value(value), extra_(extra)
#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
}
simgrid::instr::PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, Value* val)
}
simgrid::instr::PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, Value* val)
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
}
simgrid::instr::ResetStateEvent::ResetStateEvent(double timestamp, container_t container, Type* type)
}
simgrid::instr::ResetStateEvent::ResetStateEvent(double timestamp, container_t container, Type* type)
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
}
simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t container, Type* type,
}
simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t container, Type* type,
: StartLinkEvent(timestamp, container, type, sourceContainer, value, key, -1)
{}
simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t container, Type* type,
: StartLinkEvent(timestamp, container, type, sourceContainer, value, key, -1)
{}
simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t container, Type* type,
- container_t sourceContainer, const char* value, const char* key,
+ container_t sourceContainer, std::string value, std::string key,
XBT_DEBUG("%s: event_type=%d, timestamp=%f, value:%s", __FUNCTION__, (int)eventType_, this->timestamp_, this->value_.c_str());
XBT_DEBUG("%s: event_type=%d, timestamp=%f, value:%s", __FUNCTION__, (int)eventType_, this->timestamp_, this->value_.c_str());
simgrid::instr::EndLinkEvent::EndLinkEvent(double timestamp, container_t container, Type* type,
container_t destContainer, std::string value, std::string key)
simgrid::instr::EndLinkEvent::EndLinkEvent(double timestamp, container_t container, Type* type,
container_t destContainer, std::string value, std::string key)
- : container(container), type(type), destContainer(destContainer), value(value), key(key)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_EndLink)
+ , destContainer(destContainer)
+ , value(value)
+ , key(key)
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
}
simgrid::instr::NewEvent::NewEvent(double timestamp, container_t container, Type* type, Value* val)
}
simgrid::instr::NewEvent::NewEvent(double timestamp, container_t container, Type* type, Value* val)
this->val = val;
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
this->val = val;
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);