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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user