mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
tools/trace: Don't crash if a trace has no timing information.
This commit is contained in:
parent
fa3040c117
commit
0fd71ac9eb
2 changed files with 4 additions and 3 deletions
|
|
@ -230,8 +230,9 @@ class PrettyPrinter:
|
|||
if node.ret is not None:
|
||||
self.formatter.text(' = ')
|
||||
node.ret.visit(self)
|
||||
self.formatter.text(' // time ')
|
||||
node.time.visit(self)
|
||||
if node.time is not None:
|
||||
self.formatter.text(' // time ')
|
||||
node.time.visit(self)
|
||||
|
||||
def visit_trace(self, node):
|
||||
for call in node.calls:
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ class TraceParser(XmlParser):
|
|||
method = attrs['method']
|
||||
args = []
|
||||
ret = None
|
||||
time = 0
|
||||
time = None
|
||||
while self.token.type == ELEMENT_START:
|
||||
if self.token.name_or_data == 'arg':
|
||||
arg = self.parse_arg()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue