Optional server profiling built on the Perfetto SDK. Adds CPU spans (compositor, encoder, network), GPU encode/copy slices from Vulkan timestamp queries (Vulkan/NVENC/VAAPI), and headset feedback markers from dump_time. WIVRN_TRACING enables tracing and selects the backend (system, inprocess, or both); WIVRN_USE_PERFETTO gates it at build time and compiles it out otherwise. WIVRN_TRACE_MONADO additionally drives Monado's percetto tracing from the same switch so WiVRn and Monado land on one timeline. Tooling: server-tracing[-monado] presets and a CI build, two Perfetto configs (WiVRn-only and full-system), a wivrn_capture.py capture wrapper, a pftrace summary script, and docs/profiling.md.
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
# WiVRn-only Perfetto config: WiVRn track_event slices, no ftrace. Small,
|
|
# encoder-focused traces. For system context use wivrn_full_trace_cfg.pbtx
|
|
# (or --full).
|
|
#
|
|
# Capture: tools/perfetto/wivrn_capture.py
|
|
# Manual setup and socket details: docs/profiling.md.
|
|
|
|
duration_ms: 15000
|
|
buffers {
|
|
size_kb: 65536
|
|
fill_policy: RING_BUFFER
|
|
}
|
|
|
|
data_sources {
|
|
config {
|
|
name: "track_event"
|
|
target_buffer: 0
|
|
track_event_config {
|
|
# Allowlist must match the category names in
|
|
# server/utils/wivrn_trace.cpp exactly (Perfetto does exact/glob,
|
|
# not substring matching). Listing only WiVRn categories keeps the
|
|
# trace WiVRn-only even when Monado is built with tracing.
|
|
# Do NOT add `disabled_categories: "*"`: it also silences the
|
|
# enabled allowlist, giving empty traces.
|
|
enabled_categories: "wivrn_encoder"
|
|
enabled_categories: "wivrn_encoder_gpu"
|
|
enabled_categories: "wivrn_compositor"
|
|
enabled_categories: "wivrn_network"
|
|
enabled_categories: "wivrn_feedback"
|
|
}
|
|
}
|
|
}
|