Skip to content

Commit

Permalink
make parser more robust over mangled dmesg: it seems you can
Browse files Browse the repository at this point in the history
get random 'IRQ 16' type strings in your dmesg output (nice) that
confused the parser.
  • Loading branch information
Michael Meeks committed Dec 9, 2009
1 parent a5304a9 commit 557036a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pybootchartgui/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _parse_dmesg(writer, file):
kernel.duration = time_ms / 10
continue

# print "foo: '%s' '%s' '%s' '%s'" % (timestamp, type, func, rest)
# print "foo: '%s' '%s' '%s'" % (type, func, rest)
if type == "calling":
ppid = kernel.pid
p = re.match ("\@ (\d+)", rest)
Expand All @@ -298,8 +298,11 @@ def _parse_dmesg(writer, file):
processMap[func] = Process(writer, ppid + idx, name, ppid, time_ms / 10)
elif type == "initcall":
# print "finished: '%s' at '%s'" % (func, time_ms)
process = processMap[func]
process.duration = (time_ms / 10) - process.start_time
if func in processMap:
process = processMap[func]
process.duration = (time_ms / 10) - process.start_time
else:
print "corrupted init call for %s" % (func)

elif type == "async_waiting" or type == "async_continuing":
continue # ignore
Expand Down

0 comments on commit 557036a

Please sign in to comment.