mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 02:30:18 +01:00
pan/decode: Add pandecode_dump_mappings
Add a helper to dump all mapped GPU memory. This is a blunt, seldom useful instrument ... but when it /is/ useful it's your only option. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14543>
This commit is contained in:
parent
861fa2baec
commit
c947a52df4
2 changed files with 19 additions and 0 deletions
|
|
@ -50,6 +50,8 @@ struct pandecode_mapped_memory *pandecode_find_mapped_gpu_mem_containing(uint64_
|
|||
|
||||
void pandecode_map_read_write(void);
|
||||
|
||||
void pandecode_dump_mappings(void);
|
||||
|
||||
static inline void *
|
||||
__pandecode_fetch_gpu_mem(const struct pandecode_mapped_memory *mem,
|
||||
uint64_t gpu_va, size_t size,
|
||||
|
|
|
|||
|
|
@ -246,6 +246,23 @@ pandecode_close(void)
|
|||
pandecode_dump_file_close();
|
||||
}
|
||||
|
||||
void
|
||||
pandecode_dump_mappings(void)
|
||||
{
|
||||
pandecode_dump_file_open();
|
||||
|
||||
rb_tree_foreach(struct pandecode_mapped_memory, it, &mmap_tree, node) {
|
||||
if (!it->addr || !it->length)
|
||||
continue;
|
||||
|
||||
fprintf(pandecode_dump_stream, "Buffer: %s gpu %" PRIx64 "\n\n",
|
||||
it->name, it->gpu_va);
|
||||
|
||||
pan_hexdump(pandecode_dump_stream, it->addr, it->length, false);
|
||||
fprintf(pandecode_dump_stream, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
void pandecode_abort_on_fault_v4(mali_ptr jc_gpu_va);
|
||||
void pandecode_abort_on_fault_v5(mali_ptr jc_gpu_va);
|
||||
void pandecode_abort_on_fault_v6(mali_ptr jc_gpu_va);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue