From b09aa79f4a5da6766b6090e2470ee2dcb3a97e4c Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 1 Sep 2022 18:49:46 +0100 Subject: [PATCH] c/multi: Improve frame timing printing a little bit --- .../compositor/multi/comp_multi_compositor.c | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/xrt/compositor/multi/comp_multi_compositor.c b/src/xrt/compositor/multi/comp_multi_compositor.c index 6dddfc2be..85e67a3b2 100644 --- a/src/xrt/compositor/multi/comp_multi_compositor.c +++ b/src/xrt/compositor/multi/comp_multi_compositor.c @@ -202,13 +202,19 @@ wait_for_scheduled_free(struct multi_compositor *mc) break; } - U_LOG_D("next: %f (%" PRIu64 ")\nprogress: %f (%" PRIu64 ")\nscheduled: %f (%" PRIu64 ")\n", - time_ns_to_ms_f((int64_t)v_mc->slot_next_frame_display - now_ns), // - v_mc->slot_next_frame_display, // - time_ns_to_ms_f((int64_t)v_mc->progress.display_time_ns - now_ns), // - v_mc->progress.display_time_ns, // - time_ns_to_ms_f((int64_t)v_mc->scheduled.display_time_ns - now_ns), // - v_mc->scheduled.display_time_ns); // + U_LOG_D( + "Two frames have completed GPU work and are waiting to be displayed." + "\n\tnext frame: %fms (%" PRIu64 + ") (next time for compositor to pick up frame)" + "\n\tprogress: %fms (%" PRIu64 + ") (latest completed frame)" + "\n\tscheduled: %fms (%" PRIu64 ") (oldest waiting frame)", + time_ns_to_ms_f((int64_t)v_mc->slot_next_frame_display - now_ns), // + v_mc->slot_next_frame_display, // + time_ns_to_ms_f((int64_t)v_mc->progress.display_time_ns - now_ns), // + v_mc->progress.display_time_ns, // + time_ns_to_ms_f((int64_t)v_mc->scheduled.display_time_ns - now_ns), // + v_mc->scheduled.display_time_ns); // os_mutex_unlock(&mc->slot_lock);