Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
public functions in header + fix deprecation info
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Tue, 11 Jan 2022 12:34:08 +0000 (13:34 +0100)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Tue, 11 Jan 2022 12:34:48 +0000 (13:34 +0100)
include/simgrid/instr.h
src/instr/instr_interface.cpp

index e8ed64b..2a724e7 100644 (file)
 
 namespace simgrid {
 namespace instr {
-void declare_host_variable(const std::string& variable, const std::string& color = std::string(""));
-void set_host_variable(const s4u::Host* host, const std::string& variable, double value,
-                       double time = simgrid_get_clock());
-void add_host_variable(const s4u::Host* host, const std::string& variable, double value,
-                       double time = simgrid_get_clock());
-void sub_host_variable(const s4u::Host* host, const std::string& variable, double value,
-                       double time = simgrid_get_clock());
-const std::set<std::string, std::less<>>& get_host_variables();
-
-void declare_link_variable(const std::string& variable, const std::string& color = std::string(""));
-void set_link_variable(const s4u::Link* link, const std::string& variable, double value,
-                       double time = simgrid_get_clock());
-void set_link_variable(const s4u::Host* src, const s4u::Host* dst, const std::string& variable, double value,
-                       double time = simgrid_get_clock());
-void add_link_variable(const s4u::Link* link, const std::string& variable, double value,
-                       double time = simgrid_get_clock());
-void add_link_variable(const s4u::Host* src, const s4u::Host* dst, const std::string& variable, double value,
-                       double time = simgrid_get_clock());
-void sub_link_variable(const s4u::Link* link, const std::string& variable, double value,
-                       double time = simgrid_get_clock());
-void sub_link_variable(const s4u::Host* src, const s4u::Host* dst, const std::string& variable, double value,
-                       double time = simgrid_get_clock());
-const std::set<std::string, std::less<>>& get_link_variables();
-
-void declare_vm_variable(const std::string& variable, const std::string& color = std::string(""));
-void set_vm_variable(const s4u::VirtualMachine* vm, const std::string& variable, double value,
-                     double time = simgrid_get_clock());
-void add_vm_variable(const s4u::VirtualMachine* vm, const std::string& variable, double value,
-                     double time = simgrid_get_clock());
-void sub_vm_variable(const s4u::VirtualMachine* vm, const std::string& variable, double value,
-                     double time = simgrid_get_clock());
-const std::set<std::string, std::less<>>& get_vm_variables();
+XBT_PUBLIC void declare_host_variable(const std::string& variable, const std::string& color = std::string(""));
+XBT_PUBLIC void set_host_variable(const s4u::Host* host, const std::string& variable, double value,
+                                  double time = simgrid_get_clock());
+XBT_PUBLIC void add_host_variable(const s4u::Host* host, const std::string& variable, double value,
+                                  double time = simgrid_get_clock());
+XBT_PUBLIC void sub_host_variable(const s4u::Host* host, const std::string& variable, double value,
+                                  double time = simgrid_get_clock());
+XBT_PUBLIC const std::set<std::string, std::less<>>& get_host_variables();
+
+XBT_PUBLIC void declare_link_variable(const std::string& variable, const std::string& color = std::string(""));
+XBT_PUBLIC void set_link_variable(const s4u::Link* link, const std::string& variable, double value,
+                                  double time = simgrid_get_clock());
+XBT_PUBLIC void set_link_variable(const s4u::Host* src, const s4u::Host* dst, const std::string& variable, double value,
+                                  double time = simgrid_get_clock());
+XBT_PUBLIC void add_link_variable(const s4u::Link* link, const std::string& variable, double value,
+                                  double time = simgrid_get_clock());
+XBT_PUBLIC void add_link_variable(const s4u::Host* src, const s4u::Host* dst, const std::string& variable, double value,
+                                  double time = simgrid_get_clock());
+XBT_PUBLIC void sub_link_variable(const s4u::Link* link, const std::string& variable, double value,
+                                  double time = simgrid_get_clock());
+XBT_PUBLIC void sub_link_variable(const s4u::Host* src, const s4u::Host* dst, const std::string& variable, double value,
+                                  double time = simgrid_get_clock());
+XBT_PUBLIC const std::set<std::string, std::less<>>& get_link_variables();
+
+XBT_PUBLIC void declare_vm_variable(const std::string& variable, const std::string& color = std::string(""));
+XBT_PUBLIC void set_vm_variable(const s4u::VirtualMachine* vm, const std::string& variable, double value,
+                                double time = simgrid_get_clock());
+XBT_PUBLIC void add_vm_variable(const s4u::VirtualMachine* vm, const std::string& variable, double value,
+                                double time = simgrid_get_clock());
+XBT_PUBLIC void sub_vm_variable(const s4u::VirtualMachine* vm, const std::string& variable, double value,
+                                double time = simgrid_get_clock());
+XBT_PUBLIC const std::set<std::string, std::less<>>& get_vm_variables();
 
 /*  Functions to manage tracing marks (used for trace comparison experiments) */
-void declare_mark(const std::string& mark_type);
-void declare_mark_value(const std::string& mark_type, const std::string& mark_value,
-                        const std::string& mark_color = std::string("1 1 1"));
-void mark(const std::string& mark_type, const std::string& mark_value);
-const std::set<std::string, std::less<>>& get_marks();
+XBT_PUBLIC void declare_mark(const std::string& mark_type);
+XBT_PUBLIC void declare_mark_value(const std::string& mark_type, const std::string& mark_value,
+                                   const std::string& mark_color = std::string("1 1 1"));
+XBT_PUBLIC void mark(const std::string& mark_type, const std::string& mark_value);
+XBT_PUBLIC const std::set<std::string, std::less<>>& get_marks();
 
-void declare_tracing_category(const std::string& name, const std::string& color = "");
-const std::set<std::string, std::less<>>& get_tracing_categories();
+XBT_PUBLIC void declare_tracing_category(const std::string& name, const std::string& color = "");
+XBT_PUBLIC const std::set<std::string, std::less<>>& get_tracing_categories();
 
 /* Function used by graphicator (transform a SimGrid platform file in a graphviz dot file with the network topology) */
-void platform_graph_export_graphviz(const std::string& output_filename);
+XBT_PUBLIC void platform_graph_export_graphviz(const std::string& output_filename);
 } // namespace instr
 } // namespace simgrid
 
index 4c193d0..30d3f0f 100644 (file)
@@ -495,7 +495,7 @@ void TRACE_host_variable_set (const char *host, const char *variable, double val
                       &user_host_variables);
 }
 
-void TRACE_host_variable_add(const char* host, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v333
+void TRACE_host_variable_add(const char* host, const char* variable, double value)
 {
   instr_user_variable(simgrid_get_clock(), host, variable, "HOST", value, InstrUserVariable::ADD, "",
                       &user_host_variables);
@@ -510,7 +510,7 @@ void TRACE_host_variable_add(const char* host, const char* variable, double valu
  *
  *  @see TRACE_host_variable_declare, TRACE_host_variable_set, TRACE_host_variable_add
  */
-void TRACE_host_variable_sub(const char* host, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v333
+void TRACE_host_variable_sub(const char* host, const char* variable, double value)
 {
   instr_user_variable(simgrid_get_clock(), host, variable, "HOST", value, InstrUserVariable::SUB, "",
                       &user_host_variables);
@@ -575,13 +575,13 @@ void TRACE_link_variable_set (const char *link, const char *variable, double val
                       &user_link_variables);
 }
 
-void TRACE_link_variable_add(const char* link, const char* variable, double value)
+void TRACE_link_variable_add(const char* link, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v333
 {
   instr_user_variable(simgrid_get_clock(), link, variable, "LINK", value, InstrUserVariable::ADD, "",
                       &user_link_variables);
 }
 
-void TRACE_link_variable_sub(const char* link, const char* variable, double value)
+void TRACE_link_variable_sub(const char* link, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v333
 {
   instr_user_variable(simgrid_get_clock(), link, variable, "LINK", value, InstrUserVariable::SUB, "",
                       &user_link_variables);