[OMPT] Adapt OMPT callbacks for tasks to handle untied tasks correctly
authorJoachim Protze <protze@itc.rwth-aachen.de>
Fri, 27 Jul 2018 18:13:20 +0000 (18:13 +0000)
committerJoachim Protze <protze@itc.rwth-aachen.de>
Fri, 27 Jul 2018 18:13:20 +0000 (18:13 +0000)
commit86ed6aa66823f593e009cb38eb462d4f06488c36
treefd9298dd4cac85232c5631ffa0a690ff9a32bef9
parentf203109edbb11fe855f3a0748ad7ffbc403b2d72
[OMPT] Adapt OMPT callbacks for tasks to handle untied tasks correctly

The ompt/tasks/task_types.c testcase did not test untied tasks properly. Now,
frame addresses are tested and two scheduling points are added at which the
task can switch to another thread. Due to scheduling effects, the frame address
could be NULL.

This needed a restructure of the way OMPT callbacks are called.
__ompt_task_finish() now as an extra parameter, whether a task is completed.
Its invocation has been moved into __kmp_task_finish(). Thus, the order of the
writes to the frame addresses is not subject to scheduling effects anymore.

Patch by Simon Convent

Reviewed by: protze.joachim, hbae

Subscribers: openmp-commits

Differential Revision: https://reviews.llvm.org/D49181

llvm-svn: 338145
openmp/runtime/src/kmp_tasking.cpp
openmp/runtime/test/ompt/tasks/task_types.c