- const char* getCname() { return name_.c_str(); }
- const char* getId() { return id_.c_str(); }
- e_entity_types getKind() { return kind_; }
- bool isColored() { return not color_.empty(); }
-
- Type* byName(std::string name);
-
- Type* getOrCreateContainerType(std::string name);
- Type* getOrCreateEventType(std::string name);
- Type* getOrCreateLinkType(std::string name, Type* source, Type* dest);
- Type* getOrCreateStateType(std::string name);
- Type* getOrCreateVariableType(std::string name, std::string color);
-
- void logContainerTypeDefinition();
- void logVariableTypeDefinition();
- void logStateTypeDefinition();
- void logLinkTypeDefinition(simgrid::instr::Type* source, simgrid::instr::Type* dest);
- void logDefineEventType();
-
- static Type* createRootType();
- static Type* getRootType();
-};
-
-//--------------------------------------------------
-class Value {
- std::string name_;
- std::string id_;
- std::string color_;
- Type* father_;
-
- explicit Value(std::string name, std::string color, Type* father);
-
-public:
- ~Value();
- static Value* byNameOrCreate(std::string name, std::string color, Type* father);
- static Value* byName(std::string name, Type* father);
- const char* getCname() { return name_.c_str(); }
- const char* getId() { return id_.c_str(); }
- bool isColored() { return not color_.empty(); }
- void print();
-};
-
-//--------------------------------------------------
-enum e_container_types {
- INSTR_HOST,
- INSTR_LINK,
- INSTR_ROUTER,
- INSTR_AS,
- INSTR_SMPI,
- INSTR_MSG_VM,
- INSTR_MSG_PROCESS,
- INSTR_MSG_TASK
-};
-
-class Container {
- e_container_types kind_; /* This container is of what kind */
- int level_ = 0; /* Level in the hierarchy, root level is 0 */
- sg_netpoint_t netpoint_ = nullptr;
-
-public:
- Container(std::string name, simgrid::instr::e_container_types kind, Container* father);
- virtual ~Container();
-
- std::string name_; /* Unique name of this container */
- std::string id_; /* Unique id of this container */
- Type* type_; /* Type of this container */
- Container* father_;
- std::map<std::string, Container*> children_;
- static Container* byNameOrNull(std::string name);
- static Container* byName(std::string name);
- void removeFromParent();
- void logCreation();
- void logDestruction();
-};
-
-//--------------------------------------------------
-class PajeEvent {
-protected:
- Container* container;
- Type* type;
-
-public:
- double timestamp_;
- e_event_type eventType_;
- PajeEvent(Container* container, Type* type, double timestamp, e_event_type eventType)
- : container(container), type(type), timestamp_(timestamp), eventType_(eventType){};
- virtual void print() = 0;
- virtual ~PajeEvent();
- void insertIntoBuffer();