Skip to content

i#7943: Set vector length in view tool - #7944

Merged
derekbruening merged 2 commits into
masterfrom
i7943-view-veclen
Jun 16, 2026
Merged

i#7943: Set vector length in view tool#7944
derekbruening merged 2 commits into
masterfrom
i7943-view-veclen

Conversation

@derekbruening

Copy link
Copy Markdown
Contributor

Looks for the vector length marker and sets the decoder vector length based on its value. This is required to decode the proper displacement for some SVE instruction's memory operands.

Adds a unit test.

Further tested on the original trace where this was noticed:

Before:

$ ctest -V -R off.allasm-scattergather-b
$ clients/bin64/drmemtrace_launcher -indir suite/tests/tool.drcacheoff.allasm-scattergather-basic-counts.allasm_scattergather.*.dir -tool view 2>&1 | less
        1408         240:  W0.T909560 ifetch       4 byte(s) @ 0x0000000000400508 a401a03c   ld1b   (%x1)[1byte] %p0/z -> %z28.b

After:

$ ctest -V -R off.allasm-scattergather-b
$ clients/bin64/drmemtrace_launcher -indir suite/tests/tool.drcacheoff.allasm-scattergather-basic-counts.allasm_scattergather.*.dir -tool view 2>&1 | less
        1408         240:  W0.T909560 ifetch       4 byte(s) @ 0x0000000000400508 a401a03c   ld1b   +0x10(%x1)[1byte] %p0/z -> %z28.b

Fixes #7943

Looks for the vector length marker and sets the decoder vector length
based on its value. This is required to decode the proper displacement
for some SVE instruction's memory operands.

Adds a unit test.

Further tested on the original trace where this was noticed:

Before:
```
$ ctest -V -R off.allasm-scattergather-b
$ clients/bin64/drmemtrace_launcher -indir suite/tests/tool.drcacheoff.allasm-scattergather-basic-counts.allasm_scattergather.*.dir -tool view 2>&1 | less
        1408         240:  W0.T909560 ifetch       4 byte(s) @ 0x0000000000400508 a401a03c   ld1b   (%x1)[1byte] %p0/z -> %z28.b
```

After:
```
$ ctest -V -R off.allasm-scattergather-b
$ clients/bin64/drmemtrace_launcher -indir suite/tests/tool.drcacheoff.allasm-scattergather-basic-counts.allasm_scattergather.*.dir -tool view 2>&1 | less
        1408         240:  W0.T909560 ifetch       4 byte(s) @ 0x0000000000400508 a401a03c   ld1b   +0x10(%x1)[1byte] %p0/z -> %z28.b
```

Fixes #7943
Comment thread clients/drcachesim/tools/view.cpp
Comment thread clients/drcachesim/tools/view.cpp
Comment thread clients/drcachesim/tests/view_test.cpp
@derekbruening
derekbruening merged commit 0222df1 into master Jun 16, 2026
23 checks passed
@derekbruening
derekbruening deleted the i7943-view-veclen branch June 16, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

drmemtrace view tool gets SVE disp wrong b/c doesn't set vector length

2 participants