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;
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);
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);
}
THROWF (tracing_error, 0, "new container kind is unknown.");
break;
}
- type_t type = Type::getOrNull (typeNameBuff, newContainer->father->type);
+ Type* type = Type::getOrNull (typeNameBuff, newContainer->father->type);
if (type == nullptr){
newContainer->type = Type::containerNew (typeNameBuff, newContainer->father->type);
}else{
}
}
-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;
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_types, instr, "Paje tracing event system (types)");
-static type_t rootType = nullptr; /* the root type */
+static Type* rootType = nullptr; /* the root type */
void PJ_type_release ()
{
return rootType;
}
-Type::Type (const char *typeNameBuff, const char *key, const char *color, e_entity_types kind, type_t father)
+Type::Type (const char *typeNameBuff, const char *key, const char *color, e_entity_types kind, Type* father)
{
if (typeNameBuff == nullptr || key == nullptr){
THROWF(tracing_error, 0, "can't create a new type with name or key equal nullptr");
{
XBT_DEBUG("recursiveDestroyType %s", type->name);
xbt_dict_cursor_t cursor = nullptr;
- type_t child;
+ Type* child;
char *child_name;
xbt_dict_foreach(type->children, cursor, child_name, child) {
recursiveDestroyType (child);
PJ_type_free(type);
}
-type_t PJ_type_get (const char *name, type_t father)
+type_t PJ_type_get (const char *name, Type* father)
{
- type_t ret = Type::getOrNull (name, father);
+ Type* ret = Type::getOrNull (name, father);
if (ret == nullptr){
THROWF (tracing_error, 2, "type with name (%s) not found in father type (%s)", name, father->name);
}
return ret;
}
-type_t Type::getOrNull (const char *name, type_t father)
+type_t Type::getOrNull (const char *name, Type* father)
{
if (name == nullptr || father == nullptr){
THROWF (tracing_error, 0, "can't get type with a nullptr name or from a nullptr father");
}
- type_t ret = nullptr;
- type_t child;
+ Type* ret = nullptr;
+ Type* child;
char *child_name;
xbt_dict_cursor_t cursor = nullptr;
xbt_dict_foreach(father->children, cursor, child_name, child) {
return ret;
}
-type_t Type::containerNew (const char *name, type_t father)
+type_t Type::containerNew (const char *name, Type* father)
{
if (name == nullptr){
THROWF (tracing_error, 0, "can't create a container type with a nullptr name");
}
- type_t ret = new Type (name, name, nullptr, TYPE_CONTAINER, father);
+ Type* ret = new Type (name, name, nullptr, TYPE_CONTAINER, father);
if (father == nullptr) {
rootType = ret;
} else {
return ret;
}
-type_t Type::eventNew (const char *name, type_t father)
+type_t Type::eventNew (const char *name, Type* father)
{
if (name == nullptr){
THROWF (tracing_error, 0, "can't create an event type with a nullptr name");
}
- type_t ret = new Type (name, name, nullptr, TYPE_EVENT, father);
+ Type* ret = new Type (name, name, nullptr, TYPE_EVENT, father);
XBT_DEBUG("EventType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
LogDefineEventType(ret);
return ret;
}
-type_t Type::variableNew (const char *name, const char *color, type_t father)
+type_t Type::variableNew (const char *name, const char *color, Type* father)
{
if (name == nullptr){
THROWF (tracing_error, 0, "can't create a variable type with a nullptr name");
}
- type_t ret = nullptr;
+ Type* ret = nullptr;
if (not color) {
char white[INSTR_DEFAULT_STR_SIZE] = "1 1 1";
return ret;
}
-type_t Type::linkNew (const char *name, type_t father, type_t source, type_t dest)
+type_t Type::linkNew (const char *name, Type* father, Type* source, Type* dest)
{
if (name == nullptr){
THROWF (tracing_error, 0, "can't create a link type with a nullptr name");
}
- type_t ret = nullptr;
+ Type* ret = nullptr;
char key[INSTR_DEFAULT_STR_SIZE];
snprintf (key, INSTR_DEFAULT_STR_SIZE, "%s-%s-%s", name, source->id, dest->id);
return ret;
}
-type_t Type::stateNew (const char *name, type_t father)
+type_t Type::stateNew (const char *name, Type* father)
{
if (name == nullptr){
THROWF (tracing_error, 0, "can't create a state type with a nullptr name");
}
- type_t ret = nullptr;
+ Type* ret = nullptr;
ret = new Type (name, name, nullptr, TYPE_STATE, father);
XBT_DEBUG("StateType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_values, instr, "Paje tracing event system (values)");
-value::value(const char* name, const char* color, type_t father)
+value::value(const char* name, const char* color, Type* father)
{
if (name == nullptr || father == nullptr){
THROWF (tracing_error, 0, "can't create a value with a nullptr name (or a nullptr father)");
*/
}
-value* value::get_or_new(const char* name, const char* color, type_t father)
+value* value::get_or_new(const char* name, const char* color, Type* father)
{
value* ret = 0;
try {
return ret;
}
-value* value::get(const char* name, type_t father)
+value* value::get(const char* name, Type* father)
{
if (name == nullptr || father == nullptr){
THROWF (tracing_error, 0, "can't get a value with a nullptr name (or a nullptr father)");
// check if key exists: if it doesn't, set the variable to zero and mark this in the dict
if (platform_variables.find(key) == platform_variables.end()) {
container_t container = PJ_container_get (resource);
- type_t type = PJ_type_get (variable, container->type);
+ Type* type = PJ_type_get (variable, container->type);
new SetVariableEvent (now, container, type, 0);
platform_variables[key] = std::string("");
}
}
-static void instr_event (double now, double delta, type_t variable, container_t resource, double value)
+static void instr_event (double now, double delta, Type* variable, container_t resource, double value)
{
__TRACE_surf_check_variable_set_to_zero(now, variable->name, resource->name);
new AddVariableEvent(now, resource, variable, value);
if (TRACE_uncategorized()){
XBT_DEBUG("UNCAT LINK [%f - %f] %s bandwidth_used %f", now, now+delta, resource, value);
container_t container = PJ_container_get (resource);
- type_t type = PJ_type_get ("bandwidth_used", container->type);
+ Type* type = PJ_type_get ("bandwidth_used", container->type);
instr_event (now, delta, type, container, value);
}
snprintf (category_type, INSTR_DEFAULT_STR_SIZE, "b%s", category);
XBT_DEBUG("CAT LINK [%f - %f] %s %s %f", now, now+delta, resource, category_type, value);
container_t container = PJ_container_get (resource);
- type_t type = PJ_type_get (category_type, container->type);
+ Type* type = PJ_type_get (category_type, container->type);
instr_event (now, delta, type, container, value);
}
}
//trace uncategorized host utilization
if (TRACE_uncategorized()){
XBT_DEBUG("UNCAT HOST [%f - %f] %s power_used %f", now, now+delta, resource, value);
- type_t type = PJ_type_get ("power_used", container->type);
+ Type* type = PJ_type_get ("power_used", container->type);
instr_event (now, delta, type, container, value);
}
char category_type[INSTR_DEFAULT_STR_SIZE];
snprintf (category_type, INSTR_DEFAULT_STR_SIZE, "p%s", category);
XBT_DEBUG("CAT HOST [%f - %f] %s %s %f", now, now+delta, resource, category_type, value);
- type_t type = PJ_type_get (category_type, container->type);
+ Type* type = PJ_type_get (category_type, container->type);
instr_event (now, delta, type, container, value);
}
}
//start link
container_t msg = PJ_container_get (instr_process_id(process, str, len));
- type_t type = PJ_type_get ("MSG_PROCESS_LINK", PJ_type_get_root());
+ Type* type = PJ_type_get ("MSG_PROCESS_LINK", PJ_type_get_root());
new StartLinkEvent (MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
//destroy existing container of this process
char str[INSTR_DEFAULT_STR_SIZE];
container_t process_container = PJ_container_get (instr_process_id(process, str, len));
- type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
+ Type* type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
value* val = value::get("suspend", type);
new PushStateEvent(MSG_get_clock(), process_container, type, val);
}
char str[INSTR_DEFAULT_STR_SIZE];
container_t process_container = PJ_container_get (instr_process_id(process, str, len));
- type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
+ Type* type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
new PopStateEvent (MSG_get_clock(), process_container, type);
}
}
char str[INSTR_DEFAULT_STR_SIZE];
container_t process_container = PJ_container_get (instr_process_id(process, str, len));
- type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
+ Type* type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
value* val = value::get("sleep", type);
new PushStateEvent(MSG_get_clock(), process_container, type, val);
}
char str[INSTR_DEFAULT_STR_SIZE];
container_t process_container = PJ_container_get (instr_process_id(process, str, len));
- type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
+ Type* type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
new PopStateEvent (MSG_get_clock(), process_container, type);
}
}
char str[INSTR_DEFAULT_STR_SIZE];
container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
+ Type* type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
value* val = value::get("task_execute", type);
new PushStateEvent(MSG_get_clock(), process_container, type, val);
}
char str[INSTR_DEFAULT_STR_SIZE];
container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
+ Type* type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
new PopStateEvent (MSG_get_clock(), process_container, type);
}
}
char str[INSTR_DEFAULT_STR_SIZE];
container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
+ Type* type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
value* val = value::get("receive", type);
new PushStateEvent(MSG_get_clock(), process_container, type, val);
}
char str[INSTR_DEFAULT_STR_SIZE];
container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
+ Type* type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
new PopStateEvent (MSG_get_clock(), process_container, type);
char key[INSTR_DEFAULT_STR_SIZE];
char str[INSTR_DEFAULT_STR_SIZE];
container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
+ Type* type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
value* val = value::get("send", type);
new PushStateEvent(MSG_get_clock(), process_container, type, val);
char str[INSTR_DEFAULT_STR_SIZE];
container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
+ Type* type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
new PopStateEvent (MSG_get_clock(), process_container, type);
}
}
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 (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);
}
}
#define TRACE_AUTO_COLL(cat) \
if (TRACE_is_enabled()) { \
- type_t type = Type::getOrNull(#cat, PJ_type_get_root()); \
+ Type* type = Type::getOrNull(#cat, PJ_type_get_root()); \
if (not type) { \
type = Type::eventNew(#cat, PJ_type_get_root()); \
} \
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 = Type::getOrNull (link_typename, father->type);
+ Type* link_type = Type::getOrNull (link_typename, father->type);
if (link_type == nullptr){
link_type = Type::linkNew (link_typename, father->type, src->type, dst->type);
}
PJ_container_set_root (root);
if (TRACE_smpi_is_enabled()) {
- type_t mpi = Type::getOrNull ("MPI", root->type);
+ Type* mpi = Type::getOrNull ("MPI", root->type);
if (mpi == nullptr){
mpi = Type::containerNew("MPI", root->type);
if (not TRACE_smpi_is_grouped())
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 = Type::getOrNull("bandwidth", container->type);
+ Type* bandwidth = Type::getOrNull("bandwidth", container->type);
if (bandwidth == nullptr) {
bandwidth = Type::variableNew("bandwidth", nullptr, container->type);
}
- type_t latency = Type::getOrNull("latency", container->type);
+ Type* latency = Type::getOrNull("latency", container->type);
if (latency == nullptr) {
latency = Type::variableNew("latency", nullptr, container->type);
}
new SetVariableEvent(0, container, latency, latency_value);
}
if (TRACE_uncategorized()) {
- type_t bandwidth_used = Type::getOrNull("bandwidth_used", container->type);
+ Type* bandwidth_used = Type::getOrNull("bandwidth_used", container->type);
if (bandwidth_used == nullptr) {
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 = Type::getOrNull ("power", container->type);
+ Type* speed = Type::getOrNull ("power", container->type);
if (speed == nullptr){
speed = Type::variableNew ("power", nullptr, container->type);
}
new SetVariableEvent (0, container, speed, current_speed_state);
}
if (TRACE_uncategorized()){
- type_t speed_used = Type::getOrNull ("power_used", container->type);
+ Type* speed_used = Type::getOrNull ("power_used", container->type);
if (speed_used == nullptr){
Type::variableNew ("power_used", "0.5 0.5 0.5", container->type);
}
}
if (TRACE_smpi_is_enabled() && TRACE_smpi_is_grouped()){
- type_t mpi = Type::getOrNull ("MPI", container->type);
+ Type* mpi = Type::getOrNull ("MPI", container->type);
if (mpi == nullptr){
mpi = Type::containerNew("MPI", container->type);
Type::stateNew ("MPI_STATE", mpi);
}
if (TRACE_msg_process_is_enabled()) {
- type_t msg_process = Type::getOrNull ("MSG_PROCESS", container->type);
+ Type* msg_process = Type::getOrNull ("MSG_PROCESS", container->type);
if (msg_process == nullptr){
msg_process = Type::containerNew("MSG_PROCESS", container->type);
- type_t state = Type::stateNew ("MSG_PROCESS_STATE", msg_process);
+ 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);
}
if (TRACE_msg_vm_is_enabled()) {
- type_t msg_vm = Type::getOrNull ("MSG_VM", container->type);
+ Type* msg_vm = Type::getOrNull ("MSG_VM", container->type);
if (msg_vm == nullptr){
msg_vm = Type::containerNew("MSG_VM", container->type);
- type_t state = Type::stateNew ("MSG_VM_STATE", msg_vm);
+ 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);
/*
* 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];
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)) {
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)) {
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 (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
container_t container = PJ_container_get(resource);
- type_t type = PJ_type_get ("power", container->type);
+ Type* type = PJ_type_get ("power", container->type);
new SetVariableEvent(date, container, type, speed);
}
}
{
if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
container_t container = PJ_container_get(resource);
- type_t type = PJ_type_get ("bandwidth", container->type);
+ Type* type = PJ_type_get ("bandwidth", container->type);
new SetVariableEvent(date, container, type, bandwidth);
}
}