summaryrefslogtreecommitdiff
path: root/src/gallium/tools
diff options
context:
space:
mode:
authorMatti Hamalainen <ccr@tnsp.org>2021-05-31 15:32:01 +0300
committerMarge Bot <eric+marge@anholt.net>2021-06-21 18:33:41 +0000
commitaeaeef661a8f2ba5a4f1a4ef271cd8415c81d98d (patch)
treef6a463e1bd0c4bc2cbd9a7ab36138b9b1eca6664 /src/gallium/tools
parent1e508777b453704fd6bc940345eba1ab0918a3d5 (diff)
gallium/tools: improve handling of pointer arrays
Extend the special handling of return types to also include pointer type array list elements, so we ignore the initial "name" of the element until we know a better type for them. This improves the type "detection" of such pointer array elements when parsing the logs with dump.py / tracediff.sh Related to Mesa issue #4609 Signed-off-by: Matti Hamalainen <ccr@tnsp.org> Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11492>
Diffstat (limited to 'src/gallium/tools')
-rwxr-xr-xsrc/gallium/tools/trace/model.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/tools/trace/model.py b/src/gallium/tools/trace/model.py
index 275ad183a13..8350daf744b 100755
--- a/src/gallium/tools/trace/model.py
+++ b/src/gallium/tools/trace/model.py
@@ -108,6 +108,7 @@ class Pointer(Node):
ptr_list = {}
ptr_type_list = {}
ptr_types_list = {}
+ ptr_ignore_list = ["ret", "elem"]
def __init__(self, address, pname):
self.address = address
@@ -115,15 +116,17 @@ class Pointer(Node):
# Check if address exists in list and if it is a return value address
t1 = address in self.ptr_list
if t1:
- t2 = self.ptr_type_list[address] == "ret" and pname != "ret"
+ rname = self.ptr_type_list[address]
+ t2 = rname in self.ptr_ignore_list and pname not in self.ptr_ignore_list
else:
+ rname = pname
t2 = False
# If address does NOT exist (add it), OR IS a ret value (update with new type)
if not t1 or t2:
# If previously set to ret value, remove one from count
if t1 and t2:
- self.adjust_ptr_type_count("ret", -1)
+ self.adjust_ptr_type_count(rname, -1)
# Add / update
self.adjust_ptr_type_count(pname, 1)