Skip to content

Commit

Permalink
toplev: Fix skip heuristic
Browse files Browse the repository at this point in the history
  • Loading branch information
Andi Kleen committed Jul 14, 2023
1 parent c5bff5d commit 9a45365
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions toplev.py
Original file line number Diff line number Diff line change
Expand Up @@ -2160,6 +2160,7 @@ def do_execute(rlist, summary, evstr, flat_rmap, out, rest, resoff, revnum):
continue
if prun.skip_first_line():
continue
origl = l
if args.interval:
m = re.match(r"\s*([0-9.]{9,}|SUMMARY);(.*)", l)
if m:
Expand All @@ -2184,6 +2185,7 @@ def do_execute(rlist, summary, evstr, flat_rmap, out, rest, resoff, revnum):
elif not l[:1].isspace():
# these are likely bogus summary lines printed by v5.8 perf stat
# just ignore
skip = False
continue

if prun.skip_input():
Expand Down Expand Up @@ -2227,6 +2229,8 @@ def do_execute(rlist, summary, evstr, flat_rmap, out, rest, resoff, revnum):
if runner is None:
linenum += 1
continue
if skip:
l = origl

multiplex = float('nan')
event = event.rstrip()
Expand Down Expand Up @@ -2291,8 +2295,7 @@ def uncore_event(event):
cpunum = int(title)
socket = cpu.cputosocket[cpunum]
dup_val(cpu.sockettocpus[socket])
# per core events are only output once per core
elif (re.match(r'(S\d+-)?(D\d+-)?C\d+', title) or uncore_event(event)) and (smt_mode or args.no_aggr):
elif re.match(r'(S\d+-)?(D\d+-)?C\d+', title) and (smt_mode or args.no_aggr):
m = re.match(r'(?:S(\d+)-)?(?:D(\d+)-)?C(\d+)', title)
if m.group(2): # XXX
warn_once("die topology not supported currently")
Expand Down

0 comments on commit 9a45365

Please sign in to comment.