[Openmp-commits] [PATCH] D19229: [STATS] Use partitioned timer scheme

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Mon Apr 18 10:39:12 PDT 2016


jlpeyton created this revision.
jlpeyton added reviewers: tlwilmar, jcownie.
jlpeyton added a subscriber: openmp-commits.
jlpeyton set the repository for this revision to rL LLVM.
Herald added a subscriber: sanjoy.

This change removes the current timers with ones that partition time properly.  The current timers are nested, so that if a new timer, B, starts when the current timer, A, is already timing, A's time will include B's.  To eliminate this problem, the partitioned timers are designed to stop the current timer (A), let the new timer run (B), and when the new timer is finished, restart the previously running timer (A).  With this partitioning of time, a threads' timers all sum up to the OMP_worker_thread_life time and can now easily show the percentage of time a thread is spending in different parts of the runtime or user code.

There is also a new state variable associated with each thread which tells where it is executing a task.  This corresponds with the timers: OMP_task_*, e.g., if time is spent in OMP_task_taskwait, then that thread executed tasks inside a #pragma omp taskwait construct.

The changes are mostly changing the MACROs to use the new PARITIONED_* macros, the new partitionedTimers class and its methods, and new state logic.

Repository:
  rL LLVM

http://reviews.llvm.org/D19229

Files:
  runtime/src/kmp_barrier.cpp
  runtime/src/kmp_csupport.c
  runtime/src/kmp_dispatch.cpp
  runtime/src/kmp_runtime.c
  runtime/src/kmp_sched.cpp
  runtime/src/kmp_stats.cpp
  runtime/src/kmp_stats.h
  runtime/src/kmp_stats_timing.h
  runtime/src/kmp_tasking.c
  runtime/src/kmp_wait_release.h
  runtime/src/z_Linux_util.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19229.54080.patch
Type: text/x-patch
Size: 37024 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20160418/07bd0e4a/attachment-0001.bin>


More information about the Openmp-commits mailing list