X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e6a1650c1da9d6a60f8fc5d12ebce854120ccdb7..17288b1b642b369a5377677875d08a82d37a5f67:/src/instr/instr_interface.cpp diff --git a/src/instr/instr_interface.cpp b/src/instr/instr_interface.cpp index 0f353c7c2c..d6c2d30f28 100644 --- a/src/instr/instr_interface.cpp +++ b/src/instr/instr_interface.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2021. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -17,13 +17,13 @@ enum class InstrUserVariable { DECLARE, SET, ADD, SUB }; XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_api, instr, "API"); -std::set created_categories; -std::set declared_marks; -std::set user_host_variables; -std::set user_vm_variables; -std::set user_link_variables; +std::set> created_categories; +std::set> declared_marks; +std::set> user_host_variables; +std::set> user_vm_variables; +std::set> user_link_variables; -static xbt_dynar_t instr_set_to_dynar(const std::set& filter) +static xbt_dynar_t instr_set_to_dynar(const std::set>& filter) { if (not TRACE_is_enabled() || not TRACE_needs_platform()) return nullptr; @@ -82,8 +82,8 @@ void TRACE_category_with_color (const char *category, const char *color) //check if category is already created if (created_categories.find(category) != created_categories.end()) return; - else - created_categories.insert(category); + + created_categories.emplace(category); //define final_color std::string final_color; @@ -148,7 +148,7 @@ void TRACE_declare_mark(const char *mark_type) XBT_DEBUG("MARK,declare %s", mark_type); simgrid::instr::Container::get_root()->type_->by_name_or_create(mark_type); - declared_marks.insert(mark_type); + declared_marks.emplace(mark_type); } /** @ingroup TRACE_mark @@ -258,7 +258,8 @@ xbt_dynar_t TRACE_get_marks () } static void instr_user_variable(double time, const char* resource, const char* variable_name, const char* father_type, - double value, InstrUserVariable what, const char* color, std::set* filter) + double value, InstrUserVariable what, const char* color, + std::set>* filter) { /* safe switches. tracing has to be activated and if platform is not traced, we don't allow user variables */ if (not TRACE_is_enabled() || not TRACE_needs_platform())