mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 02:36:37 +08:00
Profiler fixes
This commit is contained in:
committed by
Lorenz Meier
parent
9293950cdb
commit
c0937ec8ca
+16
-11
@@ -14,6 +14,21 @@
|
|||||||
set -e
|
set -e
|
||||||
root=$(dirname $0)/..
|
root=$(dirname $0)/..
|
||||||
|
|
||||||
|
function die()
|
||||||
|
{
|
||||||
|
echo "$@"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function usage()
|
||||||
|
{
|
||||||
|
echo "Invalid usage. Supported options:"
|
||||||
|
cat $0 | sed -n 's/^\s*--\([^)\*]*\).*/\1/p' # Don't try this at home.
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
which flamegraph.pl > /dev/null || die "Install flamegraph.pl first"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Parsing the arguments. Read this section for usage info.
|
# Parsing the arguments. Read this section for usage info.
|
||||||
#
|
#
|
||||||
@@ -25,13 +40,6 @@ append=0
|
|||||||
fgfontsize=5
|
fgfontsize=5
|
||||||
fgwidth=1900
|
fgwidth=1900
|
||||||
|
|
||||||
function usage()
|
|
||||||
{
|
|
||||||
echo "Invalid usage. Supported options:"
|
|
||||||
cat $0 | sed -n 's/^\s*--\([^)\*]*\).*/\1/p' # Don't try this at home.
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in "$@"
|
for i in "$@"
|
||||||
do
|
do
|
||||||
case $i in
|
case $i in
|
||||||
@@ -103,10 +111,7 @@ fi
|
|||||||
#
|
#
|
||||||
# Folding the stacks.
|
# Folding the stacks.
|
||||||
#
|
#
|
||||||
if [ ! -f $stacksfile ]; then
|
[ -f $stacksfile ] || die "Where are the stack samples?"
|
||||||
echo "Where are the stack samples?"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat $stacksfile | perl -e 'use File::Basename;
|
cat $stacksfile | perl -e 'use File::Basename;
|
||||||
my $current = "";
|
my $current = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user