LLVM OpenMP 19.0.0git
Statistics Gathering from OMPTB

These macros support profiling the libomp library.

These macros support profiling the libomp library.

Use –stats=on when building with build.pl to enable and then use the KMP_* macros to profile (through counts or clock ticks) libomp during execution of an OpenMP program.

Environment Variables

This section describes the environment variables relevant to stats-gathering in libomp

KMP_STATS_FILE

This environment variable is set to an output filename that will be appended NOT OVERWRITTEN if it exists. If this environment variable is undefined, the statistics will be output to stderr

KMP_STATS_THREADS

This environment variable indicates to print thread-specific statistics as well as aggregate statistics. Each thread's statistics will be shown as well as the collective sum of all threads. The values "true", "on", "1", "yes" will all indicate to print per thread statistics.