diff --git a/docs/debugging.md b/docs/debugging.md
index 8c19140b..17073aa9 100644
--- a/docs/debugging.md
+++ b/docs/debugging.md
@@ -254,8 +254,8 @@ adb logcat '*:F' | grep -A 50 wivrn
## Performance Profiling
-WiVRn supports timing analysis via CSV dumps and detailed system-wide
-profiling with Perfetto. See [docs/profiling.md](profiling.md) for capturing
+WiVRn supports timing analysis and detailed system-wide profiling with Perfetto.
+See [docs/profiling.md](profiling.md) for capturing
timing data, profiling the HMD client and server, and comparing the Vulkan,
NVENC, and VAAPI encoder paths.
@@ -327,7 +327,6 @@ The log is located at `$XDG_STATE_HOME/xrizer/xrizer.txt`, or `$HOME/.local/stat
| Variable | Description |
|----------|-------------|
| `WIVRN_DUMP_VIDEO` | Path to dump video frames (e.g., `/tmp/video-dump`) |
-| `WIVRN_DUMP_TIMINGS` | Path to dump timing CSV (e.g., `/tmp/wivrn-timings.csv`) |
| `WIVRN_LOGLEVEL` | Log level for the native client |
| `WIVRN_AUTOCONNECT` | Auto-connect to the first discovered server |
| `WIVRN_TRACING` | Enable WiVRn Perfetto tracing: `system` / `inprocess`. Requires `WIVRN_USE_PERFETTO=ON` at build time. See [docs/profiling.md](profiling.md). |
diff --git a/docs/profiling.md b/docs/profiling.md
index a173fd4b..61488452 100644
--- a/docs/profiling.md
+++ b/docs/profiling.md
@@ -1,6 +1,6 @@
# Profiling WiVRn
-Performance analysis for WiVRn: per-frame timing CSV and [Perfetto](https://perfetto.dev/) tracing.
+Performance analysis for WiVRn: [Perfetto](https://perfetto.dev/) tracing.
For general debugging see [docs/debugging.md](debugging.md).
## Quick start
@@ -28,15 +28,6 @@ tools/perfetto/wivrn_capture.py # WiVRn-only; --full adds Monado + ftrace
The Perfetto amalgamated SDK must be installed where CMake looks (`/usr/share/perfetto/sdk`, override
with `-DPERFETTO_SDK_DIR=
`); no automatic fetch.
-## Timing analysis (CSV)
-
-Per-frame timing without any Perfetto setup — same events as the `wivrn_feedback` track, one row each:
-```bash
-WIVRN_DUMP_TIMINGS=/tmp/wivrn-timings.csv wivrn-server
-```
-CSV and Perfetto are independent; set either, neither, or both. See
-[CSV ↔ Perfetto](#csv--perfetto-alignment).
-
## HMD profiling
```bash
@@ -180,11 +171,3 @@ the emit (a literal is fine). Place the span at the operation's semantic start,
| `encoder` | `wivrn_encoder` | WiVRn encoder |
| `compositor` | `wivrn_compositor` | WiVRn compositor |
| `network` | `wivrn_network` | WiVRn network |
-
-## CSV ↔ Perfetto alignment
-
-`WIVRN_DUMP_TIMINGS` (CSV) and the `wivrn_feedback` track read the **same** `dump_time` stream, clock
-(`CLOCK_MONOTONIC`), and event names (`wake_up`, `encode_begin`, `send_end`, `display`, …) — so
-`grep encode_begin` over the CSV and `name = "encode_begin"` in Perfetto select the same frames at
-the same timestamps. Perfetto additionally carries the CPU/GPU spans the CSV does not. Use the CSV
-for offline scripting, the trace for a visual timeline.
diff --git a/server/compositor/compositor.cpp b/server/compositor/compositor.cpp
index 0c800489..5e86dbff 100644
--- a/server/compositor/compositor.cpp
+++ b/server/compositor/compositor.cpp
@@ -265,7 +265,7 @@ xrt_result_t compositor::mark_frame(int64_t frame_id,
switch (point)
{
case XRT_COMPOSITOR_FRAME_POINT_WOKE:
- session.dump_time("wake_up", frame_id, when_ns);
+ trace::instant_feedback("wake_up", when_ns, frame_id);
return XRT_SUCCESS;
default:
assert(false);
@@ -308,7 +308,7 @@ xrt_result_t compositor::layer_commit(xrt_graphics_sync_handle_t sync_handle)
.alpha = layer_accum.data.env_blend_mode == XRT_BLEND_MODE_ALPHA_BLEND,
};
- session.dump_time("begin", frame.rendering.id, os_monotonic_get_ns());
+ trace::instant_feedback("begin", frame.rendering.id, os_monotonic_get_ns());
cmd_pool.reset();
cmd.begin({.flags = vk::CommandBufferUsageFlagBits::eOneTimeSubmit});
diff --git a/server/driver/wivrn_session.cpp b/server/driver/wivrn_session.cpp
index 4683e7d2..cd25a83f 100644
--- a/server/driver/wivrn_session.cpp
+++ b/server/driver/wivrn_session.cpp
@@ -355,12 +355,6 @@ xrt_result_t wivrn::wivrn_session::create_session(std::unique_ptrfeedback_csv.open(dump_file);
- }
-
*out_xsysd = self.release();
return XRT_SUCCESS;
}
@@ -788,17 +782,17 @@ void wivrn_session::operator()(from_headset::feedback && feedback)
compositor.on_feedback(feedback, o);
if (feedback.received_first_packet)
- dump_time("receive_begin", feedback.frame_index, o.from_headset(feedback.received_first_packet), feedback.stream_index);
+ trace::instant_feedback("receive_begin", o.from_headset(feedback.received_first_packet), feedback.frame_index, feedback.stream_index);
if (feedback.received_last_packet)
- dump_time("receive_end", feedback.frame_index, o.from_headset(feedback.received_last_packet), feedback.stream_index);
+ trace::instant_feedback("receive_end", o.from_headset(feedback.received_last_packet), feedback.frame_index, feedback.stream_index);
if (feedback.sent_to_decoder)
- dump_time("decode_begin", feedback.frame_index, o.from_headset(feedback.sent_to_decoder), feedback.stream_index);
+ trace::instant_feedback("decode_begin", o.from_headset(feedback.sent_to_decoder), feedback.frame_index, feedback.stream_index);
if (feedback.received_from_decoder)
- dump_time("decode_end", feedback.frame_index, o.from_headset(feedback.received_from_decoder), feedback.stream_index);
+ trace::instant_feedback("decode_end", o.from_headset(feedback.received_from_decoder), feedback.frame_index, feedback.stream_index);
if (feedback.blitted)
- dump_time("blit", feedback.frame_index, o.from_headset(feedback.blitted), feedback.stream_index);
+ trace::instant_feedback("blit", o.from_headset(feedback.blitted), feedback.frame_index, feedback.stream_index);
if (feedback.displayed)
- dump_time("display", feedback.frame_index, o.from_headset(feedback.displayed), feedback.stream_index);
+ trace::instant_feedback("display", o.from_headset(feedback.displayed), feedback.frame_index, feedback.stream_index);
}
void wivrn_session::operator()(from_headset::battery && battery)
@@ -1151,16 +1145,6 @@ void wivrn_session::set_foveated_size(uint32_t width, uint32_t height)
hmd.set_foveated_size(width, 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);
- feedback_csv << std::quoted(event) << "," << frame << "," << time << "," << (int)stream << extra << std::endl;
- }
-}
-
void wivrn_session::quit_if_no_client()
{
scoped_lock lock(xrt_system.sessions.mutex);
diff --git a/server/driver/wivrn_session.h b/server/driver/wivrn_session.h
index 7e714dc9..60c00a3c 100644
--- a/server/driver/wivrn_session.h
+++ b/server/driver/wivrn_session.h
@@ -40,7 +40,6 @@
#include "wivrn_uinput.h"
#include "xrt/xrt_results.h"
#include "xrt/xrt_system.h"
-#include
#include