Skip to content

Commit

Permalink
toplev: Do not add ring filter to already filtered events
Browse files Browse the repository at this point in the history
  • Loading branch information
Andi Kleen committed Jul 3, 2015
1 parent b315006 commit eb0ded0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tl-tester
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ $WRAP ./toplev.py -o /dev/null --no-desc -v -l5 --run-sample $LOAD
for cpu in $ALLCPUS ; do
EVENTMAP=${cpus[$cpu]} FORCECPU=$cpu $WRAP ./toplev.py -o /dev/null --no-desc -v --all --show-sample $LOAD >&log
cat log
grep "not found" log && exit 1
grep -v UNC log | grep "not found" && exit 1
done

trap "" ERR 0
Expand Down
8 changes: 7 additions & 1 deletion toplev.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,9 +676,15 @@ def separator(x):
return ""
return ":"

def add_filter_event(e):
s = separator(e)
if not e.endswith(s + ring_filter):
return e + s + ring_filter
return e

def add_filter(s):
if ring_filter:
s = [x + separator(x) + ring_filter for x in s]
s = map(add_filter_event, s)
return s

def raw_event(i, name="", period=False):
Expand Down

0 comments on commit eb0ded0

Please sign in to comment.