From a2255cfc5a02990cf0a7c30aa53b68c1c0b0073e Mon Sep 17 00:00:00 2001 From: chrg6 Date: Fri, 13 Nov 2026 17:48:39 -0500 Subject: [PATCH] Drop the false reason from present_main's single read of the trace flags. The review found that the comment in vk_backend.c present_main and the message of 3236dc3c gave a cause that cannot happen: the menu cannot turn trace=perf on between the two reads. rt_trace is set once at start (main.c parse_trace), TRACE is a RESTART row in cfg.c metas, no menu code changes it, and the only other writer, ipc.c probe_sdk_client, runs in a probe mode and changes only the IPC bit. The single read stays, since the stamps and both lines then follow the same flags; the comment now says only that. Comment only. vk_backend.c compiles with the dev flags and with -Wall -Wextra without new warnings. Co-Authored-By: Claude Opus 5.5 --- runtime/vk_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/vk_backend.c b/runtime/vk_backend.c index 26b39933..529b0096 100644 --- a/runtime/vk_backend.c +++ b/runtime/vk_backend.c @@ -110,7 +110,7 @@ static void present_main(void *arg) { busy = 1; plat_cond_broadcast(&pcv); plat_mutex_unlock(&pl); - unsigned tr = rt_trace; // once, as the menu's performance log can switch the trace meanwhile + unsigned tr = rt_trace; // read once: the stamps and both lines below follow the same flags int timed = (tr & (RT_TRACE_PRESENT | RT_TRACE_PERF)) != 0; uint64_t b0 = timed ? kern_now_ns() : 0; if (flight_on || vk_dump_white) vk_thumbs_frame(j.frame); // NX2NAVI_DUMP_WHITE reads them too