|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
Compile-time profiler instrumentation: Tracy zones, plots, messages and thread names, behind morph's own macro names. More...
Go to the source code of this file.
Macros | |
| #define | MORPH_ZONE(name) |
Opens a profiler zone named name that ends with the enclosing scope. At most one per scope. | |
| #define | MORPH_ZONE_TEXT(text) |
Attaches text to the enclosing scope's MORPH_ZONE; an empty text attaches nothing. | |
| #define | MORPH_PLOT(name, value) |
Records value on the plot named name. | |
| #define | MORPH_THREAD_NAME(name) |
| Names the calling thread in the capture. | |
| #define | MORPH_MESSAGE(text) |
Sends text to the capture's timeline as a message. | |
Compile-time profiler instrumentation: Tracy zones, plots, messages and thread names, behind morph's own macro names.
Configure with -DMORPH_ENABLE_TRACY=ON and the macros below forward to Tracy (MORPH_TRACY_ENABLED is then defined on every target that links morph::morph). Otherwise each macro is a stub that names its arguments only inside decltype, an unevaluated operand: a disabled build evaluates nothing, warns about no unused argument, and needs no Tracy headers.
Definition in file profiler.hpp.
| #define MORPH_ZONE | ( | name | ) |
Opens a profiler zone named name that ends with the enclosing scope. At most one per scope.
| name | A string literal: Tracy keeps a pointer to it for the life of the process. |
Definition at line 118 of file profiler.hpp.
| #define MORPH_ZONE_TEXT | ( | text | ) |
Attaches text to the enclosing scope's MORPH_ZONE; an empty text attaches nothing.
Only valid after a MORPH_ZONE in the same or an enclosing scope.
| text | Anything convertible to std::string_view; Tracy copies it. Not evaluated in a build without Tracy. |
Definition at line 126 of file profiler.hpp.
| #define MORPH_PLOT | ( | name, | |
| value ) |
Records value on the plot named name.
| name | A string literal, the plot's identity in the capture. |
| value | An arithmetic value, recorded as a double. Not evaluated in a build without Tracy. |
Definition at line 132 of file profiler.hpp.
| #define MORPH_THREAD_NAME | ( | name | ) |
Names the calling thread in the capture.
| name | A NUL-terminated string; Tracy copies it. |
Definition at line 137 of file profiler.hpp.
| #define MORPH_MESSAGE | ( | text | ) |
Sends text to the capture's timeline as a message.
| text | Anything convertible to std::string_view; Tracy copies it. Not evaluated in a build without Tracy. |
Definition at line 142 of file profiler.hpp.