[Openmp-commits] [openmp] r273299 - Add debug trace messages for taskloop
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jun 21 12:18:13 PDT 2016
Author: jlpeyton
Date: Tue Jun 21 14:18:13 2016
New Revision: 273299
URL: http://llvm.org/viewvc/llvm-project?rev=273299&view=rev
Log:
Add debug trace messages for taskloop
Modified:
openmp/trunk/runtime/src/kmp_tasking.c
Modified: openmp/trunk/runtime/src/kmp_tasking.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_tasking.c?rev=273299&r1=273298&r2=273299&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_tasking.c (original)
+++ openmp/trunk/runtime/src/kmp_tasking.c Tue Jun 21 14:18:13 2016
@@ -2971,6 +2971,7 @@ __kmp_taskloop_linear(ident_t *loc, int
tc = (upper - lower) / st + 1;
}
if(tc == 0) {
+ KA_TRACE(20, ("__kmpc_taskloop(exit): T#%d zero-trip loop\n", gtid));
// free the pattern task and exit
__kmp_task_start( gtid, task, current_task );
// do not execute anything for zero-trip loop
@@ -3011,6 +3012,8 @@ __kmp_taskloop_linear(ident_t *loc, int
KMP_DEBUG_ASSERT(tc == num_tasks * grainsize + extras);
KMP_DEBUG_ASSERT(num_tasks > extras);
KMP_DEBUG_ASSERT(num_tasks > 0);
+ KA_TRACE(20, ("__kmpc_taskloop: T#%d will launch: num_tasks %lld, grainsize %lld, extras %lld\n",
+ gtid, num_tasks, grainsize, extras));
// Main loop, launch num_tasks tasks, assign grainsize iterations each task
for( i = 0; i < num_tasks; ++i ) {
@@ -3039,6 +3042,8 @@ __kmp_taskloop_linear(ident_t *loc, int
*(kmp_uint64*)((char*)next_task + upper_offset) = upper;
if( ptask_dup != NULL )
ptask_dup(next_task, task, lastpriv); // set lastprivate flag, construct fistprivates, etc.
+ KA_TRACE(20, ("__kmpc_taskloop: T#%d schedule task %p: lower %lld, upper %lld (offsets %p %p)\n",
+ gtid, next_task, lower, upper, lower_offset, upper_offset));
__kmp_omp_task(gtid, next_task, true); // schedule new task
lower = upper + st; // adjust lower bound for the next iteration
}
More information about the Openmp-commits
mailing list