|
YAC 3.21.0
Yet Another Coupler
|
#include "instrument.h"

Go to the source code of this file.
Macros | |
| #define | YAC_INSTRUMENT_START(ID) yac_instrument_start_impl((ID), __FILE__, __LINE__) |
| Enter an instrumented region. | |
| #define | YAC_INSTRUMENT_STOP(ID) yac_instrument_stop_impl((ID), __FILE__, __LINE__) |
| Exit an instrumented region entered with YAC_INSTRUMENT_START(ID). | |
Functions | |
| void | yac_instrument_start_impl (yac_instrument_region_id id, char const *file, int line) |
| Start an instrumented region. Do not call directly — use the YAC_INSTRUMENT_START macro below, which supplies the source location. | |
| void | yac_instrument_stop_impl (yac_instrument_region_id id, char const *file, int line) |
| Stop an instrumented region. Do not call directly — use the YAC_INSTRUMENT_STOP macro below, which supplies the source location. | |
| #define YAC_INSTRUMENT_START | ( | ID | ) | yac_instrument_start_impl((ID), __FILE__, __LINE__) |
Enter an instrumented region.
Must be paired with a YAC_INSTRUMENT_STOP(ID) for the same ID, reached unconditionally before the enclosing function returns (no early return/goto in between) — a skipped stop leaves the region open and is only portable (no compiler-specific scope-guard extension is used), so it is caught at runtime, not compile time: the next YAC_INSTRUMENT_START or YAC_INSTRUMENT_STOP that observes the inconsistent depth reports the file/line where the leaked region was opened.
Definition at line 60 of file instrument_internal.h.
| #define YAC_INSTRUMENT_STOP | ( | ID | ) | yac_instrument_stop_impl((ID), __FILE__, __LINE__) |
Exit an instrumented region entered with YAC_INSTRUMENT_START(ID).
Definition at line 66 of file instrument_internal.h.
| void yac_instrument_start_impl | ( | yac_instrument_region_id | id, |
| char const * | file, | ||
| int | line ) |
Start an instrumented region. Do not call directly — use the YAC_INSTRUMENT_START macro below, which supplies the source location.
| id | The ID of the instrumented region to start. |
| file | Source file of the call (for diagnostics). |
| line | Source line of the call (for diagnostics). |
Definition at line 171 of file instrument.c.

| void yac_instrument_stop_impl | ( | yac_instrument_region_id | id, |
| char const * | file, | ||
| int | line ) |
Stop an instrumented region. Do not call directly — use the YAC_INSTRUMENT_STOP macro below, which supplies the source location.
| id | The ID of the instrumented region to stop. |
| file | Source file of the call (for diagnostics). |
| line | Source line of the call (for diagnostics). |
Definition at line 214 of file instrument.c.
