Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] updating the entry point functions of resource utilization tracing
[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_set_power(double date, const char *resource,
108                                double power);
109 void TRACE_surf_host_define_id(const char *name, int host_id);
110 void TRACE_surf_host_vivaldi_parse(char *host, double x, double y,
111                                    double h);
112 void TRACE_surf_link_set_bandwidth(double date, void *link,
113                                    double bandwidth);
114 void TRACE_surf_link_set_latency(double date, void *link, double latency);
115 void TRACE_surf_save_onelink(void);
116 void TRACE_surf_action(surf_action_t surf_action, const char *category);
117
118 //for tracing gtnets
119 void TRACE_surf_gtnets_communicate(void *action, int src, int dst);
120 int TRACE_surf_gtnets_get_src(void *action);
121 int TRACE_surf_gtnets_get_dst(void *action);
122 void TRACE_surf_gtnets_destroy(void *action);
123
124 /* from smpi_instr.c */
125 void TRACE_internal_smpi_set_category (const char *category);
126 const char *TRACE_internal_smpi_get_category (void);
127 void TRACE_smpi_alloc(void);
128 void TRACE_smpi_release(void);
129 void TRACE_smpi_init(int rank);
130 void TRACE_smpi_finalize(int rank);
131 void TRACE_smpi_start(void);
132 void TRACE_smpi_collective_in(int rank, int root, const char *operation);
133 void TRACE_smpi_collective_out(int rank, int root, const char *operation);
134 void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation);
135 void TRACE_smpi_ptp_out(int rank, int src, int dst, const char *operation);
136 void TRACE_smpi_send(int rank, int src, int dst);
137 void TRACE_smpi_recv(int rank, int src, int dst);
138
139 /* from instr_config.c */
140 int TRACE_start (void);
141 int TRACE_end (void);
142 void TRACE_activate (void);
143 void TRACE_desactivate (void);
144 int TRACE_is_active (void);
145 int TRACE_is_enabled(void);
146 int TRACE_is_configured(void);
147 int TRACE_smpi_is_enabled(void);
148 int TRACE_smpi_is_grouped(void);
149 int TRACE_categorized (void);
150 int TRACE_uncategorized (void);
151 int TRACE_msg_task_is_enabled(void);
152 int TRACE_msg_process_is_enabled(void);
153 int TRACE_msg_volume_is_enabled(void);
154 char *TRACE_get_filename(void);
155 char *TRACE_get_platform_method(void);
156 char *TRACE_get_triva_uncat_conf (void);
157 char *TRACE_get_triva_cat_conf (void);
158 void TRACE_global_init(int *argc, char **argv);
159 void TRACE_help(int detailed);
160 void TRACE_generate_triva_uncat_conf (void);
161 void TRACE_generate_triva_cat_conf (void);
162
163 /* from resource_utilization.c */
164 void TRACE_surf_host_set_utilization(const char *resource,
165                                      smx_action_t smx_action,
166                                      surf_action_t surf_action,
167                                      double value, double now,
168                                      double delta);
169 void TRACE_surf_link_set_utilization(const char *resource, smx_action_t smx_action,
170                                      surf_action_t surf_action,
171                                      double value, double now,
172                                      double delta);
173 void TRACE_surf_resource_utilization_start(smx_action_t action);
174 void TRACE_surf_resource_utilization_event(smx_action_t action, double now,
175                                            double delta,
176                                            const char *variable,
177                                            const char *resource,
178                                            double value);
179 void TRACE_surf_resource_utilization_end(smx_action_t action);
180 void TRACE_surf_resource_utilization_alloc(void);
181 void TRACE_surf_resource_utilization_release(void);
182
183 /* sd_instr.c */
184 void TRACE_sd_task_create(SD_task_t task);
185 void TRACE_sd_task_destroy(SD_task_t task);
186
187 /* instr_routing.c */
188 void instr_routing_define_callbacks (void);
189 int instr_link_is_traced (const char *name);
190 char *instr_link_type (const char *name);
191 char *instr_host_type (const char *name);
192 void instr_destroy_platform (void);
193
194 #endif /* HAVE_TRACING */
195 #endif /* INSTR_PRIVATE_H_ */