Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a script for install ns3
[simgrid.git] / include / instr / instr.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_H_
8 #define INSTR_H_
9
10 #include "simgrid_config.h"
11
12 #ifdef HAVE_TRACING
13
14 #include "xbt.h"
15 #include "xbt/graph.h"
16 #include "msg/msg.h"
17 #include "simdag/simdag.h"
18
19 XBT_PUBLIC(void) TRACE_category(const char *category);
20 XBT_PUBLIC(void) TRACE_category_with_color (const char *category, const char *color);
21 XBT_PUBLIC(void) TRACE_msg_set_task_category(m_task_t task,
22                                              const char *category);
23 void TRACE_msg_set_process_category(m_process_t process, const char *category, const char *color);
24 XBT_PUBLIC(void) TRACE_user_host_variable(double time,
25                                           const char *variable,
26                                           double value, const char *what);
27 XBT_PUBLIC(const char *) TRACE_node_name (xbt_node_t node);
28 XBT_PUBLIC(xbt_graph_t) TRACE_platform_graph (void);
29 XBT_PUBLIC(void) TRACE_platform_graph_export_graphviz (xbt_graph_t g, const char *filename);
30 XBT_PUBLIC(void) TRACE_user_link_variable(double time, const char *resource,
31                               const char *variable,
32                               double value, const char *what);
33 XBT_PUBLIC(void) TRACE_declare_mark(const char *mark_type);
34 XBT_PUBLIC(void) TRACE_mark(const char *mark_type, const char *mark_value);
35 XBT_PUBLIC(void) TRACE_smpi_set_category(const char *category);
36 XBT_PUBLIC(void) TRACE_sd_set_task_category(SD_task_t task,
37                                             const char *category);
38
39 #define TRACE_host_variable_declare(var) \
40         TRACE_user_host_variable(0,var,0,"declare");
41
42 #define TRACE_host_variable_set_with_time(time,var,value) \
43         TRACE_user_host_variable(time,var,value,"set");
44
45 #define TRACE_host_variable_add_with_time(time,var,value) \
46         TRACE_user_host_variable(time,var,value,"add");
47
48 #define TRACE_host_variable_sub_with_time(time,var,value) \
49         TRACE_user_host_variable(time,var,value,"sub");
50
51 #define TRACE_host_variable_set(var,value) \
52         TRACE_user_host_variable(MSG_get_clock(),var,value,"set");
53
54 #define TRACE_host_variable_add(var,value) \
55         TRACE_user_host_variable(MSG_get_clock(),var,value,"add");
56
57 #define TRACE_host_variable_sub(var,value) \
58         TRACE_user_host_variable(MSG_get_clock(),var,value,"sub");
59
60 #define TRACE_link_variable_declare(var) \
61         TRACE_user_link_variable(0,NULL,NULL,var,0,"declare");
62
63 #define TRACE_link_variable_set_with_time(time,link,var,value) \
64         TRACE_user_link_variable(time,link,var,value,"set");
65
66 #define TRACE_link_variable_add_with_time(time,link,var,value) \
67         TRACE_user_link_variable(time,link,var,value,"add");
68
69 #define TRACE_link_variable_sub_with_time(time,link,var,value) \
70         TRACE_user_link_variable(time,link,var,value,"sub");
71
72 #define TRACE_link_variable_set(link,var,value) \
73         TRACE_user_link_variable(MSG_get_clock(),link,var,value,"set");
74
75 #define TRACE_link_variable_add(link,var,value) \
76         TRACE_user_link_variable(MSG_get_clock(),link,var,value,"add");
77
78 #define TRACE_link_variable_sub(link,var,value) \
79         TRACE_user_link_variable(MSG_get_clock(),link,var,value,"sub");
80
81 #else                           /* HAVE_TRACING */
82
83 #define TRACE_category(cat)
84 #define TRACE_category_with_color(cat,color)
85 #define TRACE_msg_set_task_category(task,cat)
86 #define TRACE_msg_set_process_category(proc,cat,color)
87 #define TRACE_set_mask(mask)
88
89 #define TRACE_host_variable_declare(var)
90 #define TRACE_host_variable_set_with_time(time,var,value)
91 #define TRACE_host_variable_add_with_time(time,var,value)
92 #define TRACE_host_variable_sub_with_time(time,var,value)
93 #define TRACE_host_variable_set(var,value)
94 #define TRACE_host_variable_add(var,value)
95 #define TRACE_host_variable_sub(var,value)
96 #define TRACE_link_variable_declare(var)
97 #define TRACE_link_variable_set_with_time(time,link,var,value)
98 #define TRACE_link_variable_add_with_time(time,link,var,value)
99 #define TRACE_link_variable_sub_with_time(time,link,var,value)
100 #define TRACE_link_variable_set(link,var,value)
101 #define TRACE_link_variable_add(link,var,value)
102 #define TRACE_link_variable_sub(link,var,value)
103 #define TRACE_declare_mark(type)
104 #define TRACE_mark(type,value)
105 #define TRACE_smpi_set_category(cat)
106 #define TRACE_sd_set_task_category(task,cat)
107
108 #endif                          /* HAVE_TRACING */
109
110 #endif                          /* INSTR_H_ */