Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
instrumentation.h File Reference
#include "gromacs/utility/basedefinitions.h"
+ Include dependency graph for instrumentation.h:

Description

Define basic tracing API for manual instrumentation.

This header implements a simple set of tracing range start/stop functions which can be used for manual instrumentation of application code. Since current use is only through the wallcycle module, we define two sets of start/stop functions corresponding to the main and sub-counters in the wallcycle module.

The current implementation supports the following tracing APIs:

Author
Szilárd Páll <pall..nosp@m.szil.nosp@m.ard@g.nosp@m.mail.nosp@m..com
Andrey Alekseenko al42a.nosp@m.nd@g.nosp@m.mail..nosp@m.com

Functions

static void traceRangeStart (const char *rangeName, int rangeId)
 Start a main tracing region. More...
 
static void traceSubRangeStart (const char *rangeName, int rangeId)
 Start a tracing sub-region. More...
 
static void traceRangeEnd ()
 End a main tracing region. More...
 
static void traceSubRangeEnd ()
 End a tracing sub-region. More...
 
static gmx_unused void traceRangeStart (gmx_unused const char *rangeName, gmx_unused int rangeId)
 
static gmx_unused void traceSubRangeStart (gmx_unused const char *rangeName, gmx_unused int rangeId)
 

Function Documentation

static gmx_unused void traceRangeEnd ( )
static

End a main tracing region.

Note that this should always be paired with a traceRangeStart().

static void traceRangeStart ( const char *  rangeName,
int  rangeId 
)
static

Start a main tracing region.

Note that the rangeId argument is currently only used with NVTX for aiding in coloring of trace regions.

Parameters
[in]rangeNameString containing the name of the traced range.
[in]rangeIdNumeric ID of the range.
static gmx_unused void traceSubRangeEnd ( )
static

End a tracing sub-region.

Note that this should always be paired with a traceSubRangeStart().

static void traceSubRangeStart ( const char *  rangeName,
int  rangeId 
)
static

Start a tracing sub-region.

Note that the rangeId argument is currently only used with NVTX for aiding in coloring of trace regions.

Parameters
[in]rangeNameString containing the name of the traced range.
[in]rangeIdNumeric ID of the range.