|
| void | zth::perf_start (zth_perf_done_callback_t *f) noexcept |
| | Starts recording perf events.
|
| |
| void | zth::perf_stop () noexcept |
| | Stops recording perf events.
|
| |
| void | zth::perf_mark (char const *m, Timestamp const &t) noexcept |
| | Put a string marker into the perf output.
|
| |
| void | zth::perf_async_handle (zth_perf_async_handle_t *handle) noexcept |
| | Returns the handle of the current thread's perf buffer.
|
| |
| void | zth::perf_mark_async (char const *marker, zth_perf_async_handle_t *handle) noexcept |
| | Async-/thread-safe zth::perf_mark().
|
| |
| void | zth::perf_log (char const *fmt,...) noexcept |
| | Put a formatted log string into the perf output.
|
| |
| void | zth::perf_log (Timestamp const &t, char const *fmt,...) noexcept |
| | Put a formatted log string into the perf output.
|
| |
| void | zth::perf_logv (char const *fmt, va_list args, Timestamp const &t) noexcept |
| | Put a formatted log string into the perf output.
|
| |
| void | zth::perf_dump (zth_perf_dump_callback_t *f) noexcept |
| | Passes collected perf data to f.
|
| |
| void | zth::perf_run (zth_perf_dump_callback_t *f) noexcept |
| | Setup the system to automatically perform perf event recording, dumping, and resuming.
|
| |
| void | zth::perf_abort () noexcept |
| | Abort a zth::perf_run().
|
| |
| void | zth::perf_run_dump (char const *path) noexcept |
| | Like zth::perf_run(), but dump the contents to file immediately.
|
| |
This module allows generating a VCD file which tracks scheduling behavior of the application.
◆ perf_abort()
◆ perf_async_handle()
Returns the handle of the current thread's perf buffer.
- See also
- perf_mark_async()
Definition at line 408 of file perf.cpp.
◆ perf_dump()
Passes collected perf data to f.
The data (pointer to a buffer and its length) passed to f can be converted to VCD later on. Write the data to file or stdout, for example, for later processing.
The internal buffer is erased afterwards.
Typical workflow:
Definition at line 572 of file perf.cpp.
◆ perf_log() [1/2]
| void zth::perf_log |
( |
char const * |
fmt, |
|
|
|
... |
|
) |
| |
|
noexcept |
Put a formatted log string into the perf output.
- Examples
- 5_perf.cpp.
Definition at line 443 of file perf.cpp.
◆ perf_log() [2/2]
| void zth::perf_log |
( |
Timestamp const & |
t, |
|
|
char const * |
fmt, |
|
|
|
... |
|
) |
| |
|
noexcept |
Put a formatted log string into the perf output.
Definition at line 455 of file perf.cpp.
◆ perf_logv()
Put a formatted log string into the perf output.
Definition at line 467 of file perf.cpp.
◆ perf_mark()
◆ perf_mark_async()
◆ perf_run()
Setup the system to automatically perform perf event recording, dumping, and resuming.
Typical workflow:
- Make sure Config::DoPerfEvent is set (optionally via environment).
- Call perf_run().
- When the buffer is full, the callback function is called, as if zth::perf_dump() was invoked.
- The buffer is cleared and recording is resumed automatically.
This gives a continuous flow of zth::perf_dump() callbacks, with data later/offline to be converted to VCD.
Definition at line 685 of file perf.cpp.
◆ perf_run_dump()
| void zth::perf_run_dump |
( |
char const * |
path = nullptr | ) |
|
|
noexcept |
◆ perf_start()
Starts recording perf events.
Recording can only be started when perf is enabled.
Definition at line 263 of file perf.cpp.
◆ perf_stop()
Stops recording perf events.
Recording is automatically stopped when the buffer is full.
Definition at line 276 of file perf.cpp.