Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
trace_session.hpp File Reference
#include <atomic>
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  pulp::runtime::detail::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...
struct  pulp::runtime::TraceStopResult
 Result of stopping a session: the flushed trace path + basic loss accounting so a caller can tell whether the ring dropped data under load (plan ยง0b #4). More...
class  pulp::runtime::TraceOwnership
 Opaque authority over one exact process-global trace generation. More...
struct  pulp::runtime::TraceStartResult
struct  pulp::runtime::TraceOwnershipStatus
 Atomic view of the process-global session relative to one ownership token. More...
class  pulp::runtime::Tracing
 Process-global tracing controller. More...
class  pulp::runtime::ScopedTracingAttachment
 RAII attachment. More...

Namespaces

namespace  pulp
namespace  pulp::runtime
namespace  pulp::runtime::detail

Enumerations

enum class  pulp::runtime::TraceStartStatus { pulp::runtime::Started , pulp::runtime::AlreadyActive , pulp::runtime::Unavailable }
 Outcome of an exclusive attempt to start the process-global trace session. More...

Functions

bool pulp::runtime::tracing_reminder_first_time (std::atomic< bool > &already_emitted)
 One-shot gate for the "tracing compiled in" reminder.
void pulp::runtime::log_tracing_reminder ()
 Emit โ€” at most once for the whole process โ€” a single dev-build reminder that Perfetto tracing is compiled in.
std::optional< std::uint32_t > pulp::runtime::detail::parse_autostart_ring_kb (const char *raw)
 Parse a $PULP_TRACE_RING_KB value.
TraceAutostartConfig pulp::runtime::detail::parse_trace_autostart (std::string_view text)
 Parse the autostart file's text.
std::string pulp::runtime::detail::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 pulp::runtime::detail::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.

Variables

constexpr std::uint32_t pulp::runtime::detail::default_autostart_ring_kb = 80u * 1024u
 Ring size the env-driven autostart uses when $PULP_TRACE_RING_KB is unset.
constexpr std::uint32_t pulp::runtime::detail::min_autostart_ring_kb = 1024u
 Accepted bounds for an override: 1 MB to 4 GB, expressed in KB.
constexpr std::uint32_t pulp::runtime::detail::max_autostart_ring_kb = 4u * 1024u * 1024u