Skip to content

Commit

Permalink
toplev: Return error when sampling step fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Andi Kleen committed Oct 8, 2015
1 parent 9d529a6 commit a76c89a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion toplev.py
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,9 @@ def print_sample(sample_obj, rest):
sperf = [perf, "record", "-g", "-e", sample] + [x for x in rest if x != "-A"]
print " ".join(sperf)
if args.run_sample:
os.system(" ".join(sperf))
ret = os.system(" ".join(sperf))
if ret:
sys.exit(ret)
print "Run `" + perf + " report' to show the sampling results"

def sysctl(name):
Expand Down

0 comments on commit a76c89a

Please sign in to comment.