X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d540368e78e2afddd339a10aef1c5fab8aae469c..4bff2cd38194b0f95d7a0d19867f7e4e19e8a328:/src/instr/instr_resource_utilization.cpp diff --git a/src/instr/instr_resource_utilization.cpp b/src/instr/instr_resource_utilization.cpp index 6b7bfec6fe..374f569f3a 100644 --- a/src/instr/instr_resource_utilization.cpp +++ b/src/instr/instr_resource_utilization.cpp @@ -14,7 +14,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_resource, instr, "tracing (un)-categorize static std::unordered_map platform_variables; //used by all methods -static void __TRACE_surf_check_variable_set_to_zero(double now, const char *variable, const char *resource) +static void __TRACE_surf_check_variable_set_to_zero(double now, const char* variable, std::string resource) { /* To trace resource utilization, we use pajeAddVariable and pajeSubVariable only. * The Paje simulator needs a pajeSetVariable in the first place so it knows the initial value of all variables for @@ -23,11 +23,11 @@ static void __TRACE_surf_check_variable_set_to_zero(double now, const char *vari */ // create a key considering the resource and variable - std::string key = std::string(resource) + variable; + std::string key = resource + variable; // check if key exists: if it doesn't, set the variable to zero and mark this in the dict if (platform_variables.find(key) == platform_variables.end()) { - container_t container = PJ_container_get (resource); + container_t container = PJ_container_get(resource.c_str()); simgrid::instr::Type* type = container->type_->getChild(variable); new simgrid::instr::SetVariableEvent(now, container, type, 0); platform_variables[key] = std::string("");