From 48eb0af3e0e088e38d1e5d801ce74d5245bc8a38 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sun, 1 Mar 2015 16:31:15 -0800 Subject: [PATCH] toplev: Dont print counter statistics by default --- tl-tester | 6 +++--- toplev.py | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tl-tester b/tl-tester index f4a52d3d..5b7e2578 100755 --- a/tl-tester +++ b/tl-tester @@ -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 @@ -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 diff --git a/toplev.py b/toplev.py index 7620f5da..5def864a 100755 --- a/toplev.py +++ b/toplev.py @@ -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() @@ -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)