tools/showstack: add configurable rank parameters
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
parent
1f1c793fd5
commit
76c214bd00
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user