1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-09-24 04:41:54 +01:00

gfxinfo fixes

- Make sure timestamps are actually reported in microseconds.
- Eliminate duplicate entries from successive dumps
This commit is contained in:
Sergei Trofimov
2017-09-22 13:46:32 +01:00
parent 9f666320f3
commit 4593d8605d
3 changed files with 9 additions and 3 deletions

View File

@@ -195,6 +195,7 @@ class GfxinfoFrameCollector(FrameCollector):
def _process_raw_file(self, fh):
found = False
try:
last_vsync = 0
while True:
for line in fh:
if line.startswith('---PROFILEDATA---'):
@@ -205,7 +206,11 @@ class GfxinfoFrameCollector(FrameCollector):
for line in fh:
if line.startswith('---PROFILEDATA---'):
break
self.frames.append(map(int, line.strip().split(',')[:-1])) # has a trailing ','
entries = map(int, line.strip().split(',')[:-1]) # has a trailing ','
if entries[1] <= last_vsync:
continue # repeat frame
last_vsync = entries[1]
self.frames.append(entries)
except StopIteration:
pass
if not found: