Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] a source file to keep functions to deal with data structures for paje tracing
[simgrid.git] / src / instr / instr_private.h
index d3e7355..05d2f1e 100644 (file)
 #include "simdag/private.h"
 #include "simix/private.h"
 
+typedef enum {
+  TYPE_VARIABLE,
+  TYPE_LINK,
+  TYPE_CONTAINER,
+  TYPE_STATE,
+  TYPE_EVENT,
+} e_entity_types;
+
+typedef struct s_type *type_t;
+typedef struct s_type {
+  char *id;
+  char *name;
+  e_entity_types kind;
+  struct s_type *father;
+  xbt_dict_t children;
+}s_type_t;
+
+typedef enum {
+  INSTR_HOST,
+  INSTR_LINK,
+  INSTR_ROUTER,
+  INSTR_AS,
+  INSTR_SMPI,
+  INSTR_MSG_PROCESS,
+  INSTR_MSG_TASK,
+} e_container_types;
+
+typedef struct s_container *container_t;
+typedef struct s_container {
+  char *name;     /* Unique name of this container */
+  char *id;       /* Unique id of this container */
+  type_t type;    /* Type of this container */
+  int level;      /* Level in the hierarchy, root level is 0 */
+  e_container_types kind; /* This container is of what kind */
+  struct s_container *father;
+  xbt_dict_t children;
+}s_container_t;
+
+extern xbt_dict_t created_categories;
+
 /* from paje.c */
 void TRACE_paje_create_header(void);
 void TRACE_paje_start(void);
@@ -26,6 +66,8 @@ void pajeDefineContainerType(const char *alias, const char *containerType,
                              const char *name);
 void pajeDefineStateType(const char *alias, const char *containerType,
                          const char *name);
+void pajeDefineEventTypeWithColor(const char *alias, const char *containerType,
+                         const char *name, const char *color);
 void pajeDefineEventType(const char *alias, const char *containerType,
                          const char *name);
 void pajeDefineLinkType(const char *alias, const char *containerType,
@@ -66,8 +108,6 @@ void pajeNewEvent(double time, const char *entityType,
 
 /* declaration of instrumentation functions from msg_task_instr.c */
 char *TRACE_task_container(m_task_t task, char *output, int len);
-void TRACE_msg_task_alloc(void);
-void TRACE_msg_task_release(void);
 void TRACE_msg_task_create(m_task_t task);
 void TRACE_msg_task_execute_start(m_task_t task);
 void TRACE_msg_task_execute_end(m_task_t task);
@@ -81,8 +121,6 @@ void TRACE_msg_task_put_end(void);
 char *TRACE_process_alias_container(m_process_t process, m_host_t host,
                                     char *output, int len);
 char *TRACE_process_container(m_process_t process, char *output, int len);
-void TRACE_msg_process_alloc(void);
-void TRACE_msg_process_release(void);
 void TRACE_msg_process_change_host(m_process_t process, m_host_t old_host,
                                    m_host_t new_host);
 void TRACE_msg_process_kill(m_process_t process);
@@ -179,12 +217,28 @@ void TRACE_sd_task_create(SD_task_t task);
 void TRACE_sd_task_destroy(SD_task_t task);
 
 /* instr_routing.c */
+container_t newContainer (const char *name, e_container_types kind, container_t father);
+container_t getContainer (const char *name);
+container_t getContainerByName (const char *name);
+container_t getRootContainer (void);
+void instr_paje_init (container_t root);
+type_t getRootType (void);
+type_t getContainerType (const char *name, type_t father);
+type_t getEventType (const char *name, const char *color, type_t father);
+type_t getVariableType (const char *name, const char *color, type_t father);
+type_t getLinkType (const char *name, type_t father, type_t source, type_t dest);
+type_t getStateType (const char *name, type_t father);
+type_t getType (const char *name);
+void destroyContainer (container_t container);
 void instr_routing_define_callbacks (void);
 int instr_link_is_traced (const char *name);
-char *instr_link_type (const char *name);
-char *instr_host_type (const char *name);
-char *instr_id (const char *name);
+char *instr_variable_type (const char *name, const char *resource);
+char *instr_resource_type (const char *resource_name);
 void instr_destroy_platform (void);
+void instr_new_user_variable_type (const char *new_typename, const char *color);
+void instr_new_user_link_variable_type  (const char *new_typename, const char *color);
+void instr_new_user_host_variable_type  (const char *new_typename, const char *color);
+int instr_platform_traced (void);
 
 #endif /* HAVE_TRACING */
 #endif /* INSTR_PRIVATE_H_ */