Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] registering the tracing categories of mpi processes in dictionary
[simgrid.git] / src / instr / instr_private.h
1 /* Copyright (c) 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5   * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef INSTR_PRIVATE_H_
8 #define INSTR_PRIVATE_H_
9
10 #include "simgrid_config.h"
11
12 #ifdef HAVE_TRACING
13
14 #define INSTR_DEFAULT_STR_SIZE 500
15
16 #include "instr/instr.h"
17 #include "msg/msg.h"
18 #include "simdag/private.h"
19 #include "simix/private.h"
20
21 /* from paje.c */
22 void TRACE_paje_create_header(void);
23 void TRACE_paje_start(void);
24 void TRACE_paje_end(void);
25 void pajeDefineContainerType(const char *alias, const char *containerType,
26                              const char *name);
27 void pajeDefineStateType(const char *alias, const char *containerType,
28                          const char *name);
29 void pajeDefineEventType(const char *alias, const char *containerType,
30                          const char *name);
31 void pajeDefineLinkType(const char *alias, const char *containerType,
32                         const char *sourceContainerType,
33                         const char *destContainerType, const char *name);
34 void pajeCreateContainer(double time, const char *alias, const char *type,
35                          const char *container, const char *name);
36 void pajeDestroyContainer(double time, const char *type,
37                           const char *container);
38 void pajeSetState(double time, const char *entityType,
39                   const char *container, const char *value);
40 void pajePushState(double time, const char *entityType,
41                    const char *container, const char *value);
42 void pajePopState(double time, const char *entityType,
43                   const char *container);
44 void pajeStartLink(double time, const char *entityType,
45                    const char *container, const char *value,
46                    const char *sourceContainer, const char *key);
47 void pajeStartLinkWithVolume(double time, const char *entityType,
48                              const char *container, const char *value,
49                              const char *sourceContainer, const char *key,
50                              double volume);
51 void pajeEndLink(double time, const char *entityType,
52                  const char *container, const char *value,
53                  const char *destContainer, const char *key);
54 void pajeDefineVariableType(const char *alias, const char *containerType,
55                             const char *name);
56 void pajeDefineVariableTypeWithColor(const char *alias, const char *containerType,
57                             const char *name, const char *color);
58 void pajeSetVariable(double time, const char *entityType,
59                      const char *container, const char *value);
60 void pajeAddVariable(double time, const char *entityType,
61                      const char *container, const char *value);
62 void pajeSubVariable(double time, const char *entityType,
63                      const char *container, const char *value);
64 void pajeNewEvent(double time, const char *entityType,
65                   const char *container, const char *value);
66
67 /* declaration of instrumentation functions from msg_task_instr.c */
68 char *TRACE_task_container(m_task_t task, char *output, int len);
69 void TRACE_msg_task_alloc(void);
70 void TRACE_msg_task_release(void);
71 void TRACE_msg_task_create(m_task_t task);
72 void TRACE_msg_task_execute_start(m_task_t task);
73 void TRACE_msg_task_execute_end(m_task_t task);
74 void TRACE_msg_task_destroy(m_task_t task);
75 void TRACE_msg_task_get_start(void);
76 void TRACE_msg_task_get_end(double start_time, m_task_t task);
77 int TRACE_msg_task_put_start(m_task_t task);    //returns TRUE if the task_put_end must be called
78 void TRACE_msg_task_put_end(void);
79
80 /* declaration of instrumentation functions from msg_process_instr.c */
81 char *TRACE_process_alias_container(m_process_t process, m_host_t host,
82                                     char *output, int len);
83 char *TRACE_process_container(m_process_t process, char *output, int len);
84 void TRACE_msg_process_alloc(void);
85 void TRACE_msg_process_release(void);
86 void TRACE_msg_process_change_host(m_process_t process, m_host_t old_host,
87                                    m_host_t new_host);
88 void TRACE_msg_process_kill(m_process_t process);
89 void TRACE_msg_process_suspend(m_process_t process);
90 void TRACE_msg_process_resume(m_process_t process);
91 void TRACE_msg_process_sleep_in(m_process_t process);   //called from msg/gos.c
92 void TRACE_msg_process_sleep_out(m_process_t process);
93 void TRACE_msg_process_end(m_process_t process);
94
95 /* declaration of instrumentation functions from msg_volume.c */
96 void TRACE_msg_volume_start(m_task_t task);
97 void TRACE_msg_volume_finish(m_task_t task);
98
99 /* from smx.c */
100 void TRACE_smx_host_execute(smx_action_t act);
101 void TRACE_smx_action_communicate(smx_action_t act, smx_process_t proc);
102 void TRACE_smx_action_destroy(smx_action_t act);
103
104 /* from surf_instr.c */
105 void TRACE_surf_alloc(void);
106 void TRACE_surf_release(void);
107 void TRACE_surf_host_declaration(const char *name, double power);
108 void TRACE_surf_host_set_power(double date, const char *resource,
109                                double power);
110 void TRACE_surf_host_define_id(const char *name, int host_id);
111 void TRACE_surf_host_vivaldi_parse(char *host, double x, double y,
112                                    double h);
113 void TRACE_surf_link_declaration(void *link, char *name, double bw,
114                                  double lat);
115 void TRACE_surf_link_set_bandwidth(double date, void *link,
116                                    double bandwidth);
117 void TRACE_surf_link_set_latency(double date, void *link, double latency);
118 void TRACE_surf_save_onelink(void);
119 int TRACE_surf_link_is_traced(void *link);
120 void TRACE_surf_action(surf_action_t surf_action, const char *category);
121
122 //for tracing gtnets
123 void TRACE_surf_gtnets_communicate(void *action, int src, int dst);
124 int TRACE_surf_gtnets_get_src(void *action);
125 int TRACE_surf_gtnets_get_dst(void *action);
126 void TRACE_surf_gtnets_destroy(void *action);
127
128 /* from smpi_instr.c */
129 void TRACE_internal_smpi_set_category (const char *category);
130 const char *TRACE_internal_smpi_get_category (void);
131 void TRACE_smpi_alloc(void);
132 void TRACE_smpi_release(void);
133 void TRACE_smpi_init(int rank);
134 void TRACE_smpi_finalize(int rank);
135 void TRACE_smpi_start(void);
136 void TRACE_smpi_collective_in(int rank, int root, const char *operation);
137 void TRACE_smpi_collective_out(int rank, int root, const char *operation);
138 void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation);
139 void TRACE_smpi_ptp_out(int rank, int src, int dst, const char *operation);
140 void TRACE_smpi_send(int rank, int src, int dst);
141 void TRACE_smpi_recv(int rank, int src, int dst);
142
143 /* from instr_config.c */
144 int TRACE_start (void);
145 int TRACE_end (void);
146 void TRACE_activate (void);
147 void TRACE_desactivate (void);
148 int TRACE_is_active (void);
149 int TRACE_is_enabled(void);
150 int TRACE_is_configured(void);
151 int TRACE_smpi_is_enabled(void);
152 int TRACE_smpi_is_grouped(void);
153 int TRACE_platform_is_enabled(void);
154 int TRACE_uncategorized (void);
155 int TRACE_msg_task_is_enabled(void);
156 int TRACE_msg_process_is_enabled(void);
157 int TRACE_msg_volume_is_enabled(void);
158 char *TRACE_get_filename(void);
159 char *TRACE_get_platform_method(void);
160 char *TRACE_get_triva_uncat_conf (void);
161 char *TRACE_get_triva_cat_conf (void);
162 void TRACE_global_init(int *argc, char **argv);
163 void TRACE_help(int detailed);
164 void TRACE_generate_triva_uncat_conf (void);
165 void TRACE_generate_triva_cat_conf (void);
166
167 /* from resource_utilization.c */
168 void TRACE_surf_host_set_utilization(const char *name,
169                                      smx_action_t smx_action,
170                                      surf_action_t surf_action,
171                                      double value, double now,
172                                      double delta);
173 void TRACE_surf_link_set_utilization(void *link, smx_action_t smx_action,
174                                      surf_action_t surf_action,
175                                      double value, double now,
176                                      double delta);
177 void TRACE_surf_resource_utilization_start(smx_action_t action);
178 void TRACE_surf_resource_utilization_event(smx_action_t action, double now,
179                                            double delta,
180                                            const char *variable,
181                                            const char *resource,
182                                            double value);
183 void TRACE_surf_resource_utilization_end(smx_action_t action);
184 void TRACE_surf_resource_utilization_alloc(void);
185 void TRACE_surf_resource_utilization_release(void);
186
187 /* sd_instr.c */
188 void TRACE_sd_task_create(SD_task_t task);
189 void TRACE_sd_task_destroy(SD_task_t task);
190
191 #endif /* HAVE_TRACING */
192 #endif /* INSTR_PRIVATE_H_ */