diff --git a/src/apex/apex.cpp b/src/apex/apex.cpp index ac43ec42..11aa597a 100644 --- a/src/apex/apex.cpp +++ b/src/apex/apex.cpp @@ -1111,6 +1111,10 @@ std::shared_ptr update_task( task_identifier * id = task_identifier::get_task_id(timer_name); if (id != wrapper->get_task_id()) { wrapper->aliases.insert(id); + //printf("New alias: %s to %s\n", wrapper->task_id->get_name().c_str(), timer_name.c_str()); + } + if (wrapper->prof != nullptr) { + wrapper->prof->set_task_id(wrapper->task_id); } return wrapper; } @@ -1130,7 +1134,12 @@ std::shared_ptr update_task( task_identifier * id = task_identifier::get_task_id(function_address); wrapper = _new_task(id, UINTMAX_MAX, null_task_wrapper, instance); } else { + //printf("New alias: %s", wrapper->task_id->get_name().c_str()); wrapper->task_id = task_identifier::get_task_id(function_address); + //printf(" to %s\n", wrapper->task_id->get_name().c_str()); + } + if (wrapper->prof != nullptr) { + wrapper->prof->set_task_id(wrapper->task_id); } return wrapper; } diff --git a/src/apex/profiler.hpp b/src/apex/profiler.hpp index 2ae4abe0..230778e8 100644 --- a/src/apex/profiler.hpp +++ b/src/apex/profiler.hpp @@ -93,6 +93,9 @@ class profiler { task_identifier * get_task_id(void) { return task_id; } + void set_task_id(task_identifier * tid) { + task_id = tid; + } // this constructor is for regular timers profiler(std::shared_ptr &task, bool resume = false,