summaryrefslogtreecommitdiff
path: root/openmp/runtime/src/kmp_sched.cpp
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2015-08-11 21:36:41 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2015-08-11 21:36:41 +0000
commit45be450070170249ac44043e705d4587a9c53205 (patch)
treefcbf4247ba307318e66f9e6a1caa33e8233cf718 /openmp/runtime/src/kmp_sched.cpp
parent827529e7a05d19185ff54aa8997a363c77f9baf0 (diff)
Tidy statistics collection
This removes some statistics counters and timers which were not used, adds new counters and timers for some language features that were not monitored previously and separates the counters and timers into those which are of interest for investigating user code and those which are only of interest to the developer of the runtime itself. The runtime developer statistics are now ony collected if the additional #define KMP_DEVELOPER_STATS is set. Additional user statistics which are now collected include: * Count of nested parallelism (omp parallel inside a parallel region) * Count of omp distribute occurrences * Count of omp teams occurrences * Counts of task related statistics (taskyield, task execution, task cancellation, task steal) * Values passed to omp_set_numtheads * Time spent in omp single and omp master None of this affects code compiled without stats gathering enabled, which is the normal library build mode. This also fixes the CMake build by linking to the standard c++ library when building the stats library as it is a requirement. The normal library does not have this requirement and its link phase is left alone. Differential Revision: http://reviews.llvm.org/D11759 llvm-svn: 244677
Diffstat (limited to 'openmp/runtime/src/kmp_sched.cpp')
-rw-r--r--openmp/runtime/src/kmp_sched.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_sched.cpp b/openmp/runtime/src/kmp_sched.cpp
index 0821f3805a4e..4eec41b9d448 100644
--- a/openmp/runtime/src/kmp_sched.cpp
+++ b/openmp/runtime/src/kmp_sched.cpp
@@ -84,6 +84,8 @@ __kmp_for_static_init(
typename traits_t< T >::signed_t chunk
) {
KMP_COUNT_BLOCK(OMP_FOR_static);
+ KMP_TIME_BLOCK (FOR_static_scheduling);
+
typedef typename traits_t< T >::unsigned_t UT;
typedef typename traits_t< T >::signed_t ST;
/* this all has to be changed back to TID and such.. */
@@ -151,6 +153,7 @@ __kmp_for_static_init(
team_info->microtask);
}
#endif
+ KMP_COUNT_VALUE (FOR_static_iterations, 0);
return;
}
@@ -246,6 +249,7 @@ __kmp_for_static_init(
__kmp_error_construct( kmp_i18n_msg_CnsIterationRangeTooLarge, ct_pdo, loc );
}
}
+ KMP_COUNT_VALUE (FOR_static_iterations, trip_count);
/* compute remaining parameters */
switch ( schedtype ) {
@@ -372,7 +376,7 @@ __kmp_dist_for_static_init(
typename traits_t< T >::signed_t incr,
typename traits_t< T >::signed_t chunk
) {
- KMP_COUNT_BLOCK(OMP_DISTR_FOR_static);
+ KMP_COUNT_BLOCK(OMP_DISTRIBUTE);
typedef typename traits_t< T >::unsigned_t UT;
typedef typename traits_t< T >::signed_t ST;
register kmp_uint32 tid;
@@ -437,6 +441,7 @@ __kmp_dist_for_static_init(
} else {
trip_count = (ST)(*pupper - *plower) / incr + 1; // cast to signed to cover incr<0 case
}
+
*pstride = *pupper - *plower; // just in case (can be unused)
if( trip_count <= nteams ) {
KMP_DEBUG_ASSERT(