Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
#include "tbb/tbb_stddef.h"
Go to the source code of this file.
Macros | |
#define | __TBB_STATISTICS 0 |
#define | GATHER_STATISTIC(x) ((void)0) |
#define __TBB_STATISTICS 0 |
This file defines parameters of the internal statistics collected by the TBB library (currently by the task scheduler only).
Statistics is accumulated separately in each thread and is dumped when the scheduler instance associated with the given thread is destroyed. For apps with multiple master threads or with the same master repeatedly initializing and then deinitializing task scheduler this results in TBB workers statistics getting inseparably mixed.
Therefore statistics is accumulated in arena slots, and should be dumped when arena is destroyed. This separates statistics collected for each scheduler activity region in each master thread.
With the current RML implementation (TBB 2.2, 3.0) to avoid complete loss of statistics data during app shutdown (because of lazy workers deinitialization logic) set __TBB_STATISTICS_EARLY_DUMP macro to write the statistics at the moment a master thread deinitializes its scheduler. This may happen a little earlier than the moment of arena destruction resulting in the following undesired (though usually tolerable) effects:
Macro __TBB_STATISTICS_STDOUT and global variable __TBB_ActiveStatisticsGroups defined below can be used to configure the statistics output.
To add new counter: 1) Insert it into the appropriate group range in statistics_counters; 2) Insert the corresponding field title into StatFieldTitles (preserving relative order of the fields).
To add new counters group: 1) Insert new group bit flag into statistics_groups; 2) Insert the new group title into StatGroupTitles (preserving relative order of the groups). 3) Add counter belonging to the new group as described above
Definition at line 62 of file tbb_statistics.h.
#define GATHER_STATISTIC | ( | x | ) | ((void)0) |
Definition at line 232 of file tbb_statistics.h.