Classes | |
| struct | CancelStateBase |
| Public part of the shared state so is_cancelled() can inline to one load. More... | |
| struct | LogSinkRegistry |
| struct | OkTag |
| struct | ErrTag |
| struct | TraceAutostartConfig |
| A traced plug-in records when PULP_TRACE_PATH is set in its host's environment, but an out-of-process host (AUHostingService, where Logic runs AU v2 plug-ins) inherits nothing from a shell or launchctl setenv. More... | |
| class | TimeoutController |
| A single owned, cancellable, joinable timeout. More... | |
Functions | |
| template<typename T> | |
| void | dbg_var_one (std::string_view name, const T &value) |
| void | dbg_var_emit_prefix (std::source_location loc) |
| void | dbg_var_emit_suffix () |
| LogSinkRegistry & | log_sink_registry () |
| bool & | in_log_sink_dispatch () |
| void | dispatch_log_sink (LogLevel level, std::string_view category, std::string_view message) |
| void | log_impl (LogLevel level, std::string_view category, std::string_view message) |
| void | log_impl (LogLevel level, std::string_view message) |
| std::optional< std::uint32_t > | parse_autostart_ring_kb (const char *raw) |
| Parse a $PULP_TRACE_RING_KB value. | |
| TraceAutostartConfig | parse_trace_autostart (std::string_view text) |
| Parse the autostart file's text. | |
| std::string | trace_autostart_expand (const std::string &path, const std::string &temp_dir) |
| Expand a leading $TMPDIR in an autostart path to temp_dir (the process's own temporary directory: a sandboxed service such as AUHostingService can write there and nowhere else under the user's home). | |
| std::string | trace_autostart_output_path (const std::string &path, std::string_view process_name, long pid) |
| The file a process writes for path: path itself, or, for a directory (ends with '/'), <path><process>-<pid>.pftrace. | |
| constexpr bool | timeout_targets_current_session (std::uint64_t armed_for, std::uint64_t current) noexcept |
| True when a timeout armed for armed_for may still act on the session currently identified by current. | |
Variables | |
| constexpr std::uint32_t | default_autostart_ring_kb = 80u * 1024u |
| Ring size the env-driven autostart uses when $PULP_TRACE_RING_KB is unset. | |
| constexpr std::uint32_t | min_autostart_ring_kb = 1024u |
| Accepted bounds for an override: 1 MB to 4 GB, expressed in KB. | |
| constexpr std::uint32_t | max_autostart_ring_kb = 4u * 1024u * 1024u |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Parse a $PULP_TRACE_RING_KB value.
Returns the requested ring size in KB, or nullopt when raw is absent, empty, not a bare decimal integer, or outside [min_autostart_ring_kb, max_autostart_ring_kb].
This is a separate pure function, and the caller reports a rejection rather than silently falling back, because an undersized ring does not degrade gracefully: the ring wraps, the interned string table at the head of the sequence is overwritten, and every later packet on that sequence becomes unparseable. What lands on disk is then a large .pftrace that opens without complaint and contains zero slices. A typo that quietly kept the default would produce exactly the empty capture this override exists to avoid.
Config-independent, so it is unit-testable in the default OFF build.
|
inline |
Parse the autostart file's text.
Config-independent (testable in the OFF build); values are taken verbatim and validated by their usual readers.
|
constexprnoexcept |
True when a timeout armed for armed_for may still act on the session currently identified by current.
Pure so the rule is testable without a live Perfetto session. 0 means "no session", which nothing may act on — a timeout that fires after the last detach has nothing left to flush.
|
inline |
Expand a leading $TMPDIR in an autostart path to temp_dir (the process's own temporary directory: a sandboxed service such as AUHostingService can write there and nowhere else under the user's home).
|
inline |
The file a process writes for path: path itself, or, for a directory (ends with '/'), <path><process>-<pid>.pftrace.
|
inlineconstexpr |
Ring size the env-driven autostart uses when $PULP_TRACE_RING_KB is unset.
Sized for a render/DSP capture.
|
inlineconstexpr |
|
inlineconstexpr |
Accepted bounds for an override: 1 MB to 4 GB, expressed in KB.