Lines Matching +full:local +full:- +full:timers
8 //===----------------------------------------------------------------------===//
12 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
14 //===----------------------------------------------------------------------===//
25 http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#On-line_algorithm
53 notInMaster = 1 << 3, //!< statistic is valid only for non-primary threads
55 //! KMP_STATS_EVENTS is on (valid only for timers)
79 * @param macro a user defined macro that takes three arguments -
94 // clang-format off
118 // clang-format on
121 * \brief Add new timers under KMP_FOREACH_TIMER() macro in kmp_stats.h
123 * @param macro a user defined macro that takes three arguments -
129 * timers the printing code also provides an aggregation over the thread totals.
132 * arguments passed to fork" as well). For timers the threads are not
138 // clang-format off
185 // clang-format on
187 // OMP_worker_thread_life -- Time from thread becoming an OpenMP thread (either
190 // OMP_parallel -- Time thread spends executing work directly
192 // OMP_parallel_overhead -- Time thread spends setting up a parallel region
193 // OMP_loop_static -- Time thread spends executing loop iterations from
195 // OMP_loop_static_scheduling -- Time thread spends scheduling loop iterations
197 // OMP_loop_dynamic -- Time thread spends executing loop iterations from
199 // OMP_loop_dynamic_scheduling -- Time thread spends scheduling loop iterations
201 // OMP_critical -- Time thread spends executing critical section
202 // OMP_critical_wait -- Time thread spends waiting to enter
204 // OMP_single -- Time spent executing a "single" region
205 // OMP_master -- Time spent executing a "master" region
206 // OMP_masked -- Time spent executing a "masked" region
207 // OMP_task_immediate -- Time spent executing non-deferred tasks
208 // OMP_task_taskwait -- Time spent executing tasks inside a taskwait
210 // OMP_task_taskyield -- Time spent executing tasks inside a taskyield
212 // OMP_task_taskgroup -- Time spent executing tasks inside a taskygroup
214 // OMP_task_join_bar -- Time spent executing tasks inside a join barrier
215 // OMP_task_plain_bar -- Time spent executing tasks inside a barrier
217 // OMP_taskloop_scheduling -- Time spent scheduling tasks inside a taskloop
219 // OMP_plain_barrier -- Time spent in a #pragma omp barrier construct or
222 // OMP_idle -- Time worker threads spend waiting for next
224 // OMP_fork_barrier -- Time spent in a the fork barrier surrounding a
226 // OMP_join_barrier -- Time spent in a the join barrier surrounding a
228 // OMP_serial -- Time thread zero spends executing serial code
229 // OMP_set_numthreads -- Values passed to omp_set_num_threads
230 // OMP_PARALLEL_args -- Number of arguments passed to a parallel region
231 // OMP_loop_static_iterations -- Number of iterations thread is assigned for
233 // OMP_loop_dynamic_iterations -- Number of iterations thread is assigned for
237 // Timers which are of interest to runtime library developers, not end users.
240 // KMP_fork_barrier -- time in __kmp_fork_barrier
241 // KMP_join_barrier -- time in __kmp_join_barrier
242 // KMP_barrier -- time in __kmp_barrier
243 // KMP_end_split_barrier -- time in __kmp_end_split_barrier
244 // KMP_setup_icv_copy -- time in __kmp_setup_icv_copy
245 // KMP_icv_copy -- start/stop timer for any ICV copying
246 // KMP_linear_gather -- time in __kmp_linear_barrier_gather
247 // KMP_linear_release -- time in __kmp_linear_barrier_release
248 // KMP_tree_gather -- time in __kmp_tree_barrier_gather
249 // KMP_tree_release -- time in __kmp_tree_barrier_release
250 // KMP_hyper_gather -- time in __kmp_hyper_barrier_gather
251 // KMP_hyper_release -- time in __kmp_hyper_barrier_release
252 // KMP_dist_gather -- time in __kmp_dist_barrier_gather
253 // KMP_dist_release -- time in __kmp_dist_barrier_release
254 // clang-format off
282 // clang-format on
285 * \brief Add new explicit timers under KMP_FOREACH_EXPLICIT_TIMER() macro.
287 * @param macro a user defined macro that takes three arguments -
294 * \details Explicit timers are ones where we need to allocate a timer itself
296 * per-thread basis, and explicitly start and stop them. Block timers just
437 maxVal = -minVal; in reset()
488 // Since these timers normally aren't nicely scoped, so don't have a good place
506 totalPauseTime += (tick - pauseStartTime); in resume()
518 // e.g., a partitionedTimers class with two timers of EXECUTING_TASK, and
536 // Special wrapper around the partitioned timers to aid timing code blocks
544 part_timers->push(timer); in blockPartitionedTimer()
546 ~blockPartitionedTimer() { part_timers->pop(); } in ~blockPartitionedTimer()
565 // The individual per-thread counts will be aggregated into a statistic at
591 the interface to this class is through four read-only operations:
592 1) getStart() -- returns the start time as 64 bit integer
593 2) getStop() -- returns the stop time as 64 bit integer
594 3) getNestLevel() -- returns the nest level of the event
595 4) getTimerName() -- returns the timer name that triggered event
603 Begin -------------------------------------------------------------> Time
635 ---------------------------------------------------------
637 ---------------------------------------------------------
640 explicitTimer->stop() call. The event records the thread #,
649 1) reset() -- sets the internal_size back to 0 but does not deallocate any
651 2) size() -- returns the number of valid elements in the vector
652 3) push_back(start, stop, nest, timer_name) -- pushes an event onto
654 4) deallocate() -- frees all memory associated with the vector
655 5) sort() -- sorts the vector by start time
656 6) operator[index] or at(index) -- returns event reference at that index
700 Class to implement a doubly-linked, circular, statistics list
702 |---| ---> |---| ---> |---| ---> |---| ---> ... next
704 |---| <--- |---| <--- |---| <--- |---| <--- ... prev
717 the start-stop times for each timer.
722 Every thread will have a thread local pointer to its node in
759 inline void decrementNestValue() { _nestLevel--; } in decrementNestValue()
788 iterator operator--();
789 iterator operator--(int dummy);
814 KMP_STATS_FILE -- if set, all statistics (not events) will be printed to this
816 KMP_STATS_THREADS -- if set to "on", then will print per thread statistics to
818 KMP_STATS_PLOT_FILE -- if set, print the ploticus plot file to this filename,
820 KMP_STATS_EVENTS -- if set to "on", then log events, otherwise, don't log
822 KMP_STATS_EVENTS_FILE -- if set, all events are outputted to this file,
870 // thread local pointer to stats node within list
899 __kmp_stats_thread_ptr->getTimer(TIMER_##name)->addSample((double)value)
912 __kmp_stats_thread_ptr->getCounter(COUNTER_##name)->increment()
919 * \details Explicitly stops all timers and outputs all stats. Environment
934 * \brief Initializes the partitioned timers to begin with name.
941 __kmp_stats_thread_ptr->getPartitionedTimers()->init(explicitTimer( \
942 __kmp_stats_thread_ptr->getTimer(TIMER_##name), TIMER_##name))
946 __kmp_stats_thread_ptr->getPartitionedTimers(), \
947 explicitTimer(__kmp_stats_thread_ptr->getTimer(TIMER_##name), \
951 __kmp_stats_thread_ptr->getPartitionedTimers()->push(explicitTimer( \
952 __kmp_stats_thread_ptr->getTimer(TIMER_##name), TIMER_##name))
955 __kmp_stats_thread_ptr->getPartitionedTimers()->pop()
958 __kmp_stats_thread_ptr->getPartitionedTimers()->exchange(explicitTimer( \
959 __kmp_stats_thread_ptr->getTimer(TIMER_##name), TIMER_##name))
962 __kmp_stats_thread_ptr->setState(state_name)
964 #define KMP_GET_THREAD_STATE() __kmp_stats_thread_ptr->getState()
967 blockThreadState __BTHREADSTATE__(__kmp_stats_thread_ptr->getStatePointer(), \
971 * \brief resets all stats (counters to 0, timers to 0 elapsed ticks)