From 1e1e3b757f5cb84ba633c483da6b18d726ae11ae Mon Sep 17 00:00:00 2001 From: chrg6 Date: Fri, 13 Nov 2026 17:46:43 -0500 Subject: [PATCH] Have the preparation's prebuild report say it counts from the preparation's start. The review of the prebuild report's start time (0e1c8339) found that in --prepare-pipelines and --prepare-shaders, where K.t0 is now seed_pipelines' start, before the shader prewarm, prebuild_report still said "... ms after the device was ready". seed_pipelines now sets K.prep beside K.t0, and prebuild_report then says "after the preparation started"; in play, where prewarm_run sets K.t0, the line is as before. Log text only. vk_pipeline.c compiles, with its four -Wall -Wextra warnings and none new; no test or tool reads the line. Co-Authored-By: Claude Opus 5.5 --- runtime/vk_pipeline.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/runtime/vk_pipeline.c b/runtime/vk_pipeline.c index 7797e962..3fe6249f 100644 --- a/runtime/vk_pipeline.c +++ b/runtime/vk_pipeline.c @@ -4546,7 +4546,8 @@ static struct { uint32_t built, failed, promoted; uint32_t gate_ended; // boot builders the memory gate ended (warm_builder) double t0; // now_ms() when the prebuild started - double until; // now_ms() after which the boot builders stop (comment at prewarm_run); 0 none + int prep; // t0 is the preparation's start (seed_pipelines), not the ready device's + double until; // now_ms() after which the boot builders stop (comment at prewarm_run); 0 none } K = {.io = PLAT_MUTEX_INIT}; static uint64_t rec_hash(const KeyRec *r) { @@ -4806,8 +4807,8 @@ static void ready_note(Pipe *p, int fast, const VkPipeState *s) { } static void prebuild_report(void) { - rt_log("vk_pipeline: prebuild done: %u built, %u failed, %u asked for by a draw first; %.0f ms after the device was " - "ready", K.built, K.failed, K.promoted, now_ms() - K.t0); + rt_log("vk_pipeline: prebuild done: %u built, %u failed, %u asked for by a draw first; %.0f ms after %s", K.built, + K.failed, K.promoted, now_ms() - K.t0, K.prep ? "the preparation started" : "the device was ready"); } static void job_lower(Job *j); @@ -8397,7 +8398,7 @@ static int seed_pipelines(const char *dir) { uint32_t queued = 0, dropped = 0, known = 0, other = 0, mesh = 0, no_mesh = 0; plat_mutex_lock(&P.lock); uint32_t built0 = K.built, failed0 = K.failed; - K.t0 = t0; // prebuild_report's start: this mode never runs prewarm_run, which sets it in play + K.t0 = t0, K.prep = 1; // prebuild_report's start: this mode never runs prewarm_run, which sets it in play K.loading = 1; for (size_t i = 0; i < n; i++) { const uint8_t (*v)[32] = bsearch(r[i].vs, ids, u, 32, id_cmp);