mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 15:00:10 +01:00
radv: Add sparse mappings to radv_check_va.py.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32146>
This commit is contained in:
parent
cb15b34295
commit
6370acbead
1 changed files with 16 additions and 4 deletions
|
|
@ -15,16 +15,28 @@ def main():
|
|||
with open(bo_history) as f:
|
||||
for line in f:
|
||||
p = re.compile('timestamp=(.*), VA=(.*)-(.*), destroyed=(.*), is_virtual=(.*)')
|
||||
mapped_p = re.compile('timestamp=(.*), VA=(.*)-(.*), mapped_to=(.*)')
|
||||
m = p.match(line)
|
||||
if m == None:
|
||||
mapped_m = mapped_p.match(line)
|
||||
if m:
|
||||
va_start = int(m.group(2), 16)
|
||||
va_end = int(m.group(3), 16)
|
||||
mapped_va = 0
|
||||
elif mapped_m:
|
||||
va_start = int(mapped_m.group(2), 16)
|
||||
va_end = int(mapped_m.group(3), 16)
|
||||
mapped_va = int(mapped_m.group(4), 16)
|
||||
else:
|
||||
continue
|
||||
|
||||
va_start = int(m.group(2), 16)
|
||||
va_end = int(m.group(3), 16)
|
||||
|
||||
# Check if the given VA was ever valid and print info.
|
||||
if va >= va_start and va < va_end:
|
||||
print("VA found: %s" % line, end='')
|
||||
if mapped_m:
|
||||
effective_va = (va - va_start) + mapped_va
|
||||
if mapped_va == 0:
|
||||
effective_va = 0
|
||||
print(" Virtual mapping: %016x -> %016x" % (va, effective_va))
|
||||
va_found = True
|
||||
if not va_found:
|
||||
print("VA not found!")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue