Commit 5c49ec9
committed
test/run_test.py: Improve output check of test 3
On some configurations, test 3 shows failures. On passing
configurations, we see:
Disassembly:
code object: memory://547073#offset=0x1bceb520&size=3528
loaded at: [0x744416090000-0x7444160937b1]
=> 0x744416091660: s_code_end
0x744416091664: s_code_end
0x744416091668: s_code_end
0x74441609166c: s_code_end
0x744416091670: s_code_end
0x744416091674: s_code_end
...
In this case, the debug agent sees the PC of the wave in the buffer of
s_code_end instructions added as padding just at the end of the shader
code. This is mostly because the last instruction emitted by the
compiler is `s_trap 2` (i.e. abort). The compiler knows that the
execution does not return from this call, then does not emit anything
after it. As a consequence, in this case dbgapi sees the wave's PC
outside of the kernel symbol.
The failing case on the other hand shows:
Disassembly for function kernel_abort:
code object: memory://810730#offset=0x1c966d0&size=3696
loaded at: [0x7b84b2348000-0x7b84b234b8f1]
=> 0x7b84b2349664 <+100>: s_sendmsg_rtn_b32 s0, sendmsg(MSG_RTN_GET_DOORBELL)
0x7b84b2349668 <+104>: s_mov_b32 ttmp2, m0
0x7b84b234966c <+108>: s_waitcnt lgkmcnt(0)
0x7b84b2349670 <+112>: s_and_b32 s0, s0, 0x3ff
0x7b84b2349678 <+120>: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
...
On this configuration, there are instructions after the `s_trap 2`
instructions, so dbgapi sees the wave's PC still in the kernel_abort
symbol.
The test case is looking for the "Disassembly:" marker, which is only
seen when the PC is not within the symbol.
This patch changes look for either "Disassembly:\n" or "Disassembly for
function kernel_abort:\n", which should cover both possible cases.
Tested on gfx1030 and gfx1100.
Bug: SWDEV-512969
Change-Id: I25a7b74ad3daa6e6ec5bc3d679f12f2a91f829fc
(cherry picked from commit f1d3abe)1 parent 7466647 commit 5c49ec9
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
0 commit comments