xref: /linux/tools/perf/scripts/python/bin/sctop-report (revision e5451c8f8330e03ad3cfa16048b4daf961af434f)
147902f36STom Zanussi#!/bin/bash
247902f36STom Zanussi# description: syscall top
347902f36STom Zanussi# args: [comm] [interval]
447902f36STom Zanussin_args=0
547902f36STom Zanussifor i in "$@"
647902f36STom Zanussido
747902f36STom Zanussi    if expr match "$i" "-" > /dev/null ; then
847902f36STom Zanussi	break
947902f36STom Zanussi    fi
1047902f36STom Zanussi    n_args=$(( $n_args + 1 ))
1147902f36STom Zanussidone
1247902f36STom Zanussiif [ "$n_args" -gt 2 ] ; then
1347902f36STom Zanussi    echo "usage: sctop-report [comm] [interval]"
1447902f36STom Zanussi    exit
1547902f36STom Zanussifi
1647902f36STom Zanussiif [ "$n_args" -gt 1 ] ; then
1747902f36STom Zanussi    comm=$1
1847902f36STom Zanussi    interval=$2
1947902f36STom Zanussi    shift 2
2047902f36STom Zanussielif [ "$n_args" -gt 0 ] ; then
2147902f36STom Zanussi    interval=$1
2247902f36STom Zanussi    shift
2347902f36STom Zanussifi
24*765532c8SArnaldo Carvalho de Meloperf script $@ -s "$PERF_EXEC_PATH"/scripts/python/sctop.py $comm $interval
25