PetscLogState#

Interface for the shared state information used by PetscLogHandlers.

Synopsis#

typedef struct _n_PetscLogState *PetscLogState;

Most users will not need to reference a PetscLogState directly: global logging routines like PetscLogEventRegister() and PetscLogStagePush() implicitly manipulate PETSc’s global logging state, PetscLogGetState().

Notes#

PetscLogState holds a registry of events (PetscLogStateEventRegister()), stages (PetscLogStateStageRegister()), and classes (PetscLogStateClassRegister()). It keeps track of when the user has activated events (PetscLogStateEventSetActive()) and stages (PetscLogStateStageSetActive()). It also keeps a stack of running stages (PetscLogStateStagePush(), PetscLogStateStagePop()).

The struct defining PetscLogState is in a public header so that PetscLogEventBegin(), PetscLogEventEnd(), PetscLogObjectCreate(), and PetscLogObjectDestroy() can be defined as macros rather than function calls, but users are discouraged from directly accessing the struct’s fields, which are subject to change.

See Also#

Profiling, PetscLogStateCreate(), PetscLogStateDestroy()

Level#

developer

Location#

include/petsclogtypes.h


Index of all Profiling routines
Table of Contents for all manual pages
Index of all manual pages