Skip to content

Commit

Permalink
toplev: Dont print counter statistics by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Andi Kleen committed Mar 2, 2015
1 parent 9422520 commit 48eb0af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tl-tester
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ EVENTMAP=${cpus[ivb]} FORCECPU=ivb $WRAP ./toplev.py --no-desc -d -l4 $LOAD
EVENTMAP=${cpus[ivb]} FORCECPU=ivb $WRAP ./toplev.py --no-desc -v -d -l4 $LOAD
EVENTMAP=${cpus[ivb]} FORCECPU=ivb $WRAP ./toplev.py --no-desc -x, -v -d -l4 $LOAD
EVENTMAP=${cpus[ivb]} FORCECPU=ivb $WRAP ./toplev.py --no-desc --metrics -x, -v -d -l4 $LOAD
EVENTMAP=${cpus[ivb]} FORCECPU=ivb $WRAP ./toplev.py --no-desc -d $ALL --kernel $LOAD | tee log
EVENTMAP=${cpus[ivb]} FORCECPU=ivb $WRAP ./toplev.py --no-desc -d $ALL --kernel --no-multiplex $LOAD | tee log
EVENTMAP=${cpus[ivb]} FORCECPU=ivb $WRAP ./toplev.py --no-desc --stats -d $ALL --kernel $LOAD | tee log
EVENTMAP=${cpus[ivb]} FORCECPU=ivb $WRAP ./toplev.py --no-desc --stats -d $ALL --kernel --no-multiplex $LOAD | tee log
grep :k log
grep /k log

Expand Down Expand Up @@ -86,7 +86,7 @@ checklog log.$j
done

# misc features
EVENTMAP=${cpus[hsw]} FORCECPU=hsw $WRAP ./toplev.py -d --metrics --no-multiplex -l4 $LOAD
EVENTMAP=${cpus[hsw]} FORCECPU=hsw $WRAP ./toplev.py -d --stats --metrics --no-multiplex -l4 $LOAD
EVENTMAP=${cpus[hsw]} FORCECPU=hsw $WRAP ./toplev.py -d --no-desc --power -l4 $LOAD
EVENTMAP=${cpus[hsw]} FORCECPU=hsw $WRAP ./toplev.py -d --no-desc $ALL --no-group $LOAD
EVENTMAP=${cpus[hsw]} FORCECPU=hsw $WRAP ./toplev.py -d --no-desc --sw -l4 $LOAD
Expand Down
6 changes: 4 additions & 2 deletions toplev.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ def event_group(evlist):
p.add_argument('--no-multiplex',
help='Do not multiplex, but run the workload multiple times as needed. Requires reproducible workloads.',
action='store_true')
p.add_argument('--stats', help='Show statistics on what events counted', action='store_true')
p.add_argument('--power', help='Display power metrics', action='store_true')
p.add_argument('--version', help=argparse.SUPPRESS, action='store_true')
args, rest = p.parse_known_args()
Expand Down Expand Up @@ -564,10 +565,11 @@ def print_account(ad):
for j in ad:
a = ad[j]
for e in a.errors:
print_not(a, a.errors[e], e, j)
if args.stats:
print_not(a, a.errors[e], e, j)
total[e] += 1
if sum(total.values()) > 0:
print >>sys.stderr, ", ".join(["%d %s" % (num, e) for e, num in total.iteritems()])
print >>sys.stderr, ", ".join(["%d events %s" % (num, e) for e, num in total.iteritems()])

def event_regexp():
return "|".join(valid_events)
Expand Down

0 comments on commit 48eb0af

Please sign in to comment.