From c09bf37c66e920c0c49200f142a452e1cc414b21 Mon Sep 17 00:00:00 2001 From: James Dansereau <106631954+jkdansereau@users.noreply.github.com> Date: Fri, 28 Aug 2026 09:04:46 -0400 Subject: [PATCH] D63: gate dram-branch G_DL trace behind GE_D63 (was flooding -level_09) --- port/fast3d/gfx_pc.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/port/fast3d/gfx_pc.cpp b/port/fast3d/gfx_pc.cpp index a63d816c..00cdb291 100644 --- a/port/fast3d/gfx_pc.cpp +++ b/port/fast3d/gfx_pc.cpp @@ -2373,6 +2373,15 @@ uintptr_t clearMtx; /* TEMP D63 (strip before commit) */ static int s_d63taskcount = 0; static int s_d63ctxdump = 0; +/* D63 dram-branch trace is opt-in: it fires per G_DL and floods -level_09 + * runs otherwise. Set GE_D63=1 to re-enable. */ +static int d63BranchLogEnabled(void) +{ + static int cached = -1; + if (cached < 0) + cached = getenv("GE_D63") ? 1 : 0; + return cached; +} extern "C" void d63RecordBranch(const Gfx *from, const Gfx *to); extern "C" void d63DumpTrail(void); extern "C" void d63LogLastBranchReread(void); @@ -2419,7 +2428,7 @@ static void gfx_run_dl(Gfx* cmd) { { const Gfx *tgt = (const Gfx *)seg_addr(cmd->words.w1); uintptr_t ta = (uintptr_t)tgt; - if (ta >= 0x70000000 && ta < 0xA0000000) + if (ta >= 0x70000000 && ta < 0xA0000000 && d63BranchLogEnabled()) { sysLogPrintf(LOG_NOTE, "D63 dram-branch t=%d from=%p to=%p first=(%08x,%08x)", s_d63taskcount++, (const void *)cmd, (const void *)tgt,