diff options
| author | SuarezPM <SuarezPM@users.noreply.github.com> | 2026-11-22 15:58:29 -0300 |
|---|---|---|
| committer | SuarezPM <SuarezPM@users.noreply.github.com> | 2026-11-22 15:58:29 -0300 |
| commit | efcd434cfcbc3780d5de25a5e18ee4823dc2636c (patch) | |
| tree | c47c7232924b53255d1673569cb3b1e3bf26da44 /tools/boot_trace.py | |
| parent | bd6e3afa68a6c4bdfb9dc8ac76a941830275f2f8 (diff) | |
boot: keep the first D3D12 call from a PowerShell 5.1 log
PowerShell 5.1 wraps the first stderr line of a native program in an error
record: `d3d12_test.exe : [d3d12-trace] #1 ...`. The anchored tag match
counted that line as noise, so the summary lost call #1 and still exited 0.
The tag may now follow a `<name> : ` prefix; a fixture and a dedicated test
keep it.
docs/boot.md says the prefix is accepted and that the BOM from
Out-File -Encoding utf8 is stripped.
Diffstat (limited to 'tools/boot_trace.py')
| -rw-r--r-- | tools/boot_trace.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/boot_trace.py b/tools/boot_trace.py index 47d167781..bebf34bd0 100644 --- a/tools/boot_trace.py +++ b/tools/boot_trace.py | |||
| @@ -7,7 +7,9 @@ triage needs: modules, unimplemented calls and their callers, DllMain/TLS result | |||
| 7 | the D3D12 calls by outcome and the first call per method. | 7 | the D3D12 calls by outcome and the first call per method. |
| 8 | 8 | ||
| 9 | The method field can contain spaces (`SetMarker/BeginEvent with unknown metadata`), so the parser takes the | 9 | The method field can contain spaces (`SetMarker/BeginEvent with unknown metadata`), so the parser takes the |
| 10 | outcome as the last field instead of assuming a single-word method. | 10 | outcome as the last field instead of assuming a single-word method. PowerShell 5.1 wraps the first stderr line of |
| 11 | a native program in an error record (`program.exe : [d3d12-trace] #1 ...`), so a `<name> : ` prefix before the | ||
| 12 | tag is accepted too; without it the first call of the run would be lost. | ||
| 11 | 13 | ||
| 12 | Usage: | 14 | Usage: |
| 13 | python -I boot_trace.py boot.jsonl [--d3d12 d3d12.log] [--json] [--limit N] | 15 | python -I boot_trace.py boot.jsonl [--d3d12 d3d12.log] [--json] [--limit N] |
| @@ -27,7 +29,7 @@ import json | |||
| 27 | import re | 29 | import re |
| 28 | import sys | 30 | import sys |
| 29 | 31 | ||
| 30 | D3D12_LINE = re.compile(r"^\[d3d12-trace\] #(\d+) (.+) (\S+)\s*$") | 32 | D3D12_LINE = re.compile(r"^(?:.+ : )?\[d3d12-trace\] #(\d+) (.+) (\S+)\s*$") |
| 31 | 33 | ||
| 32 | 34 | ||
| 33 | class TraceError(ValueError): | 35 | class TraceError(ValueError): |