Make the stutter map count runs of long frames as one hitch and the texture pool's area loads as loads.

In the 2026-11-13 session three frames of 87, 91 and 96 ms after an area load each counted as a change of pace, as each was followed by one as long, and loads that only the texture pool saw (no area file read, so no scene line) were charged to play. Consecutive long frames are now one episode, counted once with their summed time, its line giving that time and the first frame's parts; a run of more than 8 long frames none of which stands out is still a change of pace. The texture pool's start and end of an area load mark an area load for the map, as the game's own loads do.

With trace = perf, the slow write-watch queries and freezes past the 200 lines they may log are counted and given every 60 frames, so a late area load still shows them; the session's lines had run out by frame 36,387.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 12:54:05 -05:00
parent 7b3edac140
commit 2f640fb8ed
6 changed files with 118 additions and 18 deletions

View File

@@ -10,6 +10,9 @@ void stutter_map_init(void);
// An area's load (perf.c perf_scene, from romfs.c): hitches from here on are counted in that area, and those within
// SM_LOAD_NS of the load apart from play.
void stutter_area(const char *name);
// The texture pool began or ended making an area's textures (vk_exec_draw.c pool_loading): frames within SM_LOAD_NS of
// it count as an area load's too, in the area of the last stutter_area.
void stutter_load(void);
// A draw met its pipeline (shader 0) or one of its shaders (shader 1) missing and the replay thread spent ns on it
// before it was bound or skipped (vk_exec_draw.c, beside wait_note). vi, fi: the vertex (or mesh) and fragment shaders'
// input ids, NULL when not known (still translating, or no fragment stage).