diff options
author | yang-g <yangg@google.com> | 2018-01-31 10:43:48 -0800 |
---|---|---|
committer | yang-g <yangg@google.com> | 2018-01-31 13:40:15 -0800 |
commit | 20ea5b806601bcf87495077f5fb7d3ea10052230 (patch) | |
tree | 7f81e41f4df21cdb1cce65a7053f31e866cfa57f /tools/profiling | |
parent | 29d1e504ee555d1d23767525f81cc710258bd382 (diff) |
Fix issues in latency parsing tool
Diffstat (limited to 'tools/profiling')
-rwxr-xr-x | tools/profiling/latency_profile/profile_analyzer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/profiling/latency_profile/profile_analyzer.py b/tools/profiling/latency_profile/profile_analyzer.py index e3d33574c2..d4d14ef8c7 100755 --- a/tools/profiling/latency_profile/profile_analyzer.py +++ b/tools/profiling/latency_profile/profile_analyzer.py @@ -122,7 +122,8 @@ class CallStackBuilder(object): return True return False elif line_type == '.' or line_type == '!': - self.stk[-1].mark(line) + if self.stk: + self.stk[-1].mark(line) return False else: raise Exception('Unknown line type: \'%s\'' % line_type) @@ -255,6 +256,7 @@ if args.fmt == 'html': accounted_for = 0 for cs in call_stacks: + print >> out, '\n' if args.fmt in BANNER: print >> out, BANNER[args.fmt] % { 'count': cs.count, |