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:
@@ -28,6 +28,7 @@
|
||||
#include "utils/load_icon.h"
|
||||
#include "utils/method.h"
|
||||
#include "utils/scoped_lock.h"
|
||||
#include "utils/wivrn_trace.h"
|
||||
|
||||
#include "audio/audio_setup.h"
|
||||
#include "wivrn_android_face_tracker.h"
|
||||
@@ -383,6 +384,9 @@ void wivrn_session::pause_session()
|
||||
audio_handle->pause();
|
||||
|
||||
// FIXME: pause compositor
|
||||
|
||||
// Rotate this connection's trace before it pauses for reconnect.
|
||||
wivrn::trace::flush_session();
|
||||
}
|
||||
|
||||
void wivrn_session::resume_session()
|
||||
@@ -1066,6 +1070,7 @@ void wivrn_session::set_foveated_size(uint32_t width, uint32_t height)
|
||||
|
||||
void wivrn_session::dump_time(const std::string & event, uint64_t frame, int64_t time, uint8_t stream, const char * extra)
|
||||
{
|
||||
trace::instant_feedback(event.c_str(), time, frame, stream);
|
||||
if (feedback_csv)
|
||||
{
|
||||
std::lock_guard lock(csv_mutex);
|
||||
|
||||
Reference in New Issue
Block a user