diff options
author | Pavel Kirienko <pavel.kirienko@gmail.com> | 2015-01-16 21:13:10 +0300 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-21 14:54:23 +0100 |
commit | c0d71529bce816596dc3574e876e0f4c69bc9b9f (patch) | |
tree | c431259adcc52632239be999e5a6bf99e72128a7 | |
parent | c0937ec8cac523d4c8fad028584e2b87956f3019 (diff) | |
download | px4-firmware-c0d71529bce816596dc3574e876e0f4c69bc9b9f.tar.gz px4-firmware-c0d71529bce816596dc3574e876e0f4c69bc9b9f.tar.bz2 px4-firmware-c0d71529bce816596dc3574e876e0f4c69bc9b9f.zip |
Profiler fixes
-rwxr-xr-x | Debug/poor-mans-profiler.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Debug/poor-mans-profiler.sh b/Debug/poor-mans-profiler.sh index d2393b296..eede0072d 100755 --- a/Debug/poor-mans-profiler.sh +++ b/Debug/poor-mans-profiler.sh @@ -77,6 +77,7 @@ done stacksfile=/tmp/pmpn-stacks.log foldfile=/tmp/pmpn-folded.txt graphfile=/tmp/pmpn-flamegraph.svg +gdberrfile=/tmp/pmpn-gdberr.log # # Sampling if requested. Note that if $append is true, the stack file will not be rewritten. @@ -87,14 +88,14 @@ if [[ $nsamples > 0 && "$taskname" != "" ]] then [[ $append = 0 ]] && (rm -f $stacksfile; echo "Old stacks removed") - echo "Sampling..." + echo "Sampling the task '$taskname'..." for x in $(seq 1 $nsamples) do - arm-none-eabi-gdb $exe --batch -ex "set print asm-demangle on" \ - -ex "source $root/Debug/Nuttx.py" \ - -ex "show mybt $taskname" \ - 2> /dev/null \ + arm-none-eabi-gdb $elf --batch -ex "set print asm-demangle on" \ + -ex "source $root/Debug/Nuttx.py" \ + -ex "show mybt $taskname" \ + 2> $gdberrfile \ | sed -n 's/0\.0:\(#.*\)/\1/p' \ >> $stacksfile echo -e '\n\n' >> $stacksfile |