OpenMPToolsInterface / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org.
http://llvm.org
2 stars 4 forks source link

Current task of thread shouldnt be saved and reused #42

Closed vigbalu closed 3 years ago

vigbalu commented 3 years ago

With OMPT-plugin, when comparing ompt and ompd data, ompd_thread handle saves current task in a variable and reuses for successive calls. When "omp task" is used, each thread might use different task at different instances. This patch retrieve current task through ompd api everytime it gets called. These will fix the test cases failed due to #41.

jprotze commented 3 years ago

The intention was, that the plugin should detect continuation of execution (or respectively the stop of execution) and invalidate the cached state of the thread. While the execution is stopped, it should be save to cache the current task.

vigbalu commented 3 years ago

i couldn't find any gdb api or decent place in plugin code to invalidate the cache state. Possible places are before/after the "ompd" commands and start/end of function call "ompd_tool_test".

can i proceed with above ?

jprotze commented 3 years ago

Sure, we can fix this later once we find a way to detect that execution continues.