tools/showstack: add configurable rank parameters

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
pengyiqiang 2023-09-11 19:41:35 +08:00 committed by Xiang Xiao
parent 1f1c793fd5
commit 76c214bd00

View File

@ -29,10 +29,17 @@ function analyse()
}
if [[ $# == 0 ]]; then
echo "usage: $0 <dir>..."
echo "usage: $0 <rank> <dir>..."
exit
fi
rank=20
if [[ "$1" =~ ^[0-9]+$ ]]; then
rank=$1
shift
fi
for dir in $@; do
analyse $dir 20
analyse $dir $rank
done