Skip to content
Snippets Groups Projects
Commit ce89cf6e authored by Gopi Krishna Nedanuri's avatar Gopi Krishna Nedanuri
Browse files

lrdp_v2: Optimize extraction of etr buffer

Reading byte by byte takes lot of time. So read complete buffer
at a time.

Change-Id: Ie9dcb74d9b75ee3adf2c7940a4b6530525a073fe
parent d2adaf22
No related branches found
No related tags found
No related merge requests found
......@@ -347,10 +347,7 @@ class QDSSDump():
start = dbaddr
else:
break
for i in it:
val = ram_dump.read_byte(i, False)
tmc_etr.write(struct.pack("<B",val))
tmc_etr.write(ram_dump.read_physical(it[0], len(it)))
else:
while continue_looping:
entry = ram_dump.read_u32(start, False)
......@@ -366,10 +363,7 @@ class QDSSDump():
continue_looping = False
else:
break
for i in it:
val = ram_dump.read_byte(i, False)
tmc_etr.write(struct.pack("<B",val))
tmc_etr.write(ram_dump.read_physical(it[0], len(it)))
def save_etr_bin(self, ram_dump):
tmc_etr = ram_dump.open_file('tmc-etr.bin')
......@@ -416,13 +410,13 @@ class QDSSDump():
else:
print_out_str('Contiguous memory type was selected for TMC ETR')
if (sts & 0x1) == 1:
it = itertools.chain(range(rwpval, dbaddr+rsz), range(dbaddr, rwpval))
it1 = range(rwpval, dbaddr+rsz)
it2 = range(dbaddr, rwpval)
tmc_etr.write(ram_dump.read_physical(it1[0], len(it)))
tmc_etr.write(ram_dump.read_physical(it2[0], len(it)))
else:
it = range(dbaddr, dbaddr+rsz)
for i in it:
val = ram_dump.read_byte(i, False)
tmc_etr.write(struct.pack("<B",val))
tmc_etr.write(ram_dump.read_physical(it[0], len(it)))
else:
print_out_str ('!!! ETR was not the current sink!')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment