fix(audioout2): wire skipped-submit trace counter (#761)
This commit is contained in:
parent
c086e32f3d
commit
418eb7ecea
|
|
@ -921,6 +921,7 @@ public static class AudioOut2Exports
|
|||
|
||||
if (mixedPorts == 0)
|
||||
{
|
||||
TraceSubmitSkipped(context, frames, "no-ports");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -942,6 +943,7 @@ public static class AudioOut2Exports
|
|||
var backend = ResolveContextBackend(context, out var backendName);
|
||||
if (backend is null)
|
||||
{
|
||||
TraceSubmitSkipped(context, frames, "no-backend");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1212,4 +1214,14 @@ public static class AudioOut2Exports
|
|||
Console.Error.WriteLine($"[LOADER][TRACE] audio_out2.{message}");
|
||||
}
|
||||
}
|
||||
|
||||
private static void TraceSubmitSkipped(ContextState context, int frames, string reason)
|
||||
{
|
||||
var n = Interlocked.Increment(ref _submitSkipTraceCount);
|
||||
if (n <= 8 || n % 500 == 0)
|
||||
{
|
||||
TraceAudioOut2(
|
||||
$"context-submit-skip#{n} handle=0x{context.Handle:X} frames={frames} reason={reason}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue