pandecode: Add more addresses to trace
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Fri, 12 Jul 2019 14:42:52 +0000 (16:42 +0200)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 16 Jul 2019 15:40:59 +0000 (08:40 -0700)
When debugging, we're given the fault_pointer unresolved, so it is
helpful to have more context in the decode.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
src/panfrost/pandecode/decode.c

index 7e7fed81f9976d73f35fc32d2937f172555f361e..4eaf09fd3426d4d4461fc7903886b76f66e19855 100644 (file)
@@ -1367,8 +1367,8 @@ pandecode_uniform_buffers(mali_ptr pubufs, int ubufs_count, int job_no)
                 pandecode_log("};\n");
         }
 
-        pandecode_log("struct mali_uniform_buffer_meta uniform_buffers_%d[] = {\n",
-                      job_no);
+        pandecode_log("struct mali_uniform_buffer_meta uniform_buffers_%"PRIx64"_%d[] = {\n",
+                      pubufs, job_no);
         pandecode_indent++;
 
         for (int i = 0; i < ubufs_count; i++) {
@@ -1616,7 +1616,7 @@ pandecode_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix *p,
                 struct pandecode_mapped_memory *fmem = pandecode_find_mapped_gpu_mem_containing(p->viewport);
                 struct mali_viewport *PANDECODE_PTR_VAR(f, fmem, p->viewport);
 
-                pandecode_log("struct mali_viewport viewport_%d%s = {\n", job_no, suffix);
+                pandecode_log("struct mali_viewport viewport_%"PRIx64"_%d%s = {\n", p->viewport, job_no, suffix);
                 pandecode_indent++;
 
                 pandecode_prop("clip_minx = %f", f->clip_minx);
@@ -1724,7 +1724,7 @@ pandecode_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix *p,
                 if (mmem) {
                         mali_ptr *PANDECODE_PTR_VAR(u, mmem, p->texture_trampoline);
 
-                        pandecode_log("uint64_t texture_trampoline_%d[] = {\n", job_no);
+                        pandecode_log("uint64_t texture_trampoline_%"PRIx64"_%d[] = {\n", p->texture_trampoline, job_no);
                         pandecode_indent++;
 
                         for (int tex = 0; tex < texture_count; ++tex) {
@@ -1855,7 +1855,7 @@ pandecode_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix *p,
                         for (int i = 0; i < sampler_count; ++i) {
                                 s = pandecode_fetch_gpu_mem(smem, d + sizeof(*s) * i, sizeof(*s));
 
-                                pandecode_log("struct mali_sampler_descriptor sampler_descriptor_%d_%d = {\n", job_no, i);
+                                pandecode_log("struct mali_sampler_descriptor sampler_descriptor_%"PRIx64"_%d_%d = {\n", d + sizeof(*s) * i, job_no, i);
                                 pandecode_indent++;
 
                                 /* Only the lower two bits are understood right now; the rest we display as hex */