Add WiVRn-native Perfetto via Perfetto SDK

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.
This commit is contained in:
Jonathan Steffan
2026-07-01 21:04:08 +02:00
committed by xytovl
parent b11655fdee
commit b9c8a54d92
34 changed files with 1968 additions and 58 deletions
+3
View File
@@ -20,6 +20,7 @@
#pragma once
#include "ffmpeg_helper.h"
#include "utils/gpu_timestamp_pool.h"
#include "video_encoder_ffmpeg.h"
#include <array>
@@ -47,6 +48,8 @@ class video_encoder_va : public video_encoder_ffmpeg
av_buffer_ptr drm_frame_ctx;
std::array<in_t, num_slots> in;
gpu_timestamp_pool ts_pool;
public:
video_encoder_va(wivrn::vk_bundle &, const wivrn::encoder_settings & settings, uint8_t stream_index);