diff --git a/src/backends/extrae/extrae_type_stack.cpp b/src/backends/extrae/extrae_type_stack.cpp index 21fb90a40abab01cd7cc32d5b77875b3b64cd3f0..1ac1be2332cd04dd1f51ec3d9a569036c4f08676 100644 --- a/src/backends/extrae/extrae_type_stack.cpp +++ b/src/backends/extrae/extrae_type_stack.cpp @@ -137,7 +137,7 @@ ExtraeTypeStackStrategy::get_value_by_region_name(const std::string &name) { else // if not allocate new entry { - const auto newValue= regionMapData.regionNameToValue.size()+1; + const extrae_value newValue= std::hash{}(name); regionMapData.regionNameToValue[name] = newValue; return newValue; } @@ -190,9 +190,9 @@ void ExtraeTypeStackStrategy::finalize() noexcept { std::vector routine_names{}; for (const auto &item : regionMapData.regionNameToValue) { - const auto &routine_name = item.first; + const auto ®ion_name = item.first; const auto &value = item.second; - routine_names.push_back(routine_name); + routine_names.push_back(region_name); values.push_back(value); } // leaking memory a bit, but c vs c++ strings are not worth making it not