+/* for VM variables */
+/** @brief Declare a new user variable associated to VMs.
+ *
+ * Declare a user variable that will be associated to VMs. A user host variable can be used to trace user variables
+ * such as the number of tasks in a VM, the number of clients in an application (for hosts), and so on. The color
+ * associated to this new variable will be random if not given as parameter.
+ */
+void declare_vm_variable(const std::string& variable, const std::string& color)
+{
+ instr_user_variable(0, "", variable, "VM", 0, InstrUserVariable::DECLARE, color, &user_vm_variables);
+}
+
+/** @brief Set the value of a variable of a vm */
+void set_vm_variable(const std::string& vm, const std::string& variable, double value, double time)
+{
+ instr_user_variable(time, vm, variable, "VM", value, InstrUserVariable::SET, "", &user_vm_variables);
+}
+
+/** @brief Add a value to a variable of a VM */
+void add_vm_variable(const std::string& vm, const std::string& variable, double value, double time)
+{
+ instr_user_variable(time, vm, variable, "VM", value, InstrUserVariable::ADD, "", &user_vm_variables);
+}
+
+/** @brief Subtract a value from a variable of a VM */
+void sub_vm_variable(const std::string& vm, const std::string& variable, double value, double time)
+{
+ instr_user_variable(time, vm, variable, "VM", value, InstrUserVariable::SUB, "", &user_vm_variables);
+}
+
+/** @brief Get VM variables that were already declared with #declare_vm_variable. */
+const std::set<std::string, std::less<>>& get_vm_variables()
+{
+ return user_vm_variables;
+}
+
+/**@brief Declare a new type for tracing mark.
+ *
+ * This function declares a new Paje event type in the trace file that can be used by simulators to declare
+ * application-level marks. This function is independent of which API is used in SimGrid.
+ */