mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 17:00:09 +01:00
u_trace: Indirect capture fixes
Fixes a missing sizeof parenthesis. Fixes multiple indirects writing to the same address. Fixes:0a17035b5c("u_trace: add support for indirect data") Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519> (cherry picked from commit78ca5ef87f)
This commit is contained in:
parent
d7eb552051
commit
1a474a31fe
3 changed files with 8 additions and 6 deletions
|
|
@ -1334,7 +1334,7 @@
|
|||
"description": "u_trace: Indirect capture fixes",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "0a17035b5cd3e181a2bf4ab6feea8b4d5763b613",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -980,11 +980,13 @@ u_trace_appendv(struct u_trace *ut,
|
|||
tp->flags);
|
||||
|
||||
if (ut->utctx->enabled_traces & U_TRACE_TYPE_INDIRECTS) {
|
||||
uint64_t dst_offset = 0;
|
||||
for (unsigned i = 0; i < n_indirects; i++) {
|
||||
ut->utctx->capture_data(ut, cs, chunk->indirects,
|
||||
ut->utctx->max_indirect_size_bytes * tp_idx,
|
||||
addresses[i].bo, addresses[i].offset,
|
||||
indirect_sizes_B[i]);
|
||||
ut->utctx->capture_data(
|
||||
ut, cs, chunk->indirects,
|
||||
ut->utctx->max_indirect_size_bytes * tp_idx + dst_offset,
|
||||
addresses[i].bo, addresses[i].offset, indirect_sizes_B[i]);
|
||||
dst_offset += indirect_sizes_B[i];
|
||||
}
|
||||
chunk->has_indirect |= n_indirects > 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class Tracepoint(object):
|
|||
indirect_sizes = []
|
||||
for indirect in self.indirect_args:
|
||||
indirect.indirect_offset = ' + '.join(indirect_sizes) if len(indirect_sizes) > 0 else 0
|
||||
indirect_sizes.append(f"sizeof({indirect.type}")
|
||||
indirect_sizes.append(f"sizeof({indirect.type})")
|
||||
|
||||
self.tp_perfetto = tp_perfetto
|
||||
self.tp_markers = tp_markers
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue