diff options
author | Pavel Kirienko <pavel.kirienko@gmail.com> | 2015-01-16 21:40:14 +0300 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-21 14:54:23 +0100 |
commit | ff7c33a4b04e0545dc78a324cbc8f9a945f97519 (patch) | |
tree | 673f6714e501d0d4333dc8c5949d2522c2bf7f93 /Debug | |
parent | c0d71529bce816596dc3574e876e0f4c69bc9b9f (diff) | |
download | px4-firmware-ff7c33a4b04e0545dc78a324cbc8f9a945f97519.tar.gz px4-firmware-ff7c33a4b04e0545dc78a324cbc8f9a945f97519.tar.bz2 px4-firmware-ff7c33a4b04e0545dc78a324cbc8f9a945f97519.zip |
Profiler: xdg-open work-around
Diffstat (limited to 'Debug')
-rwxr-xr-x | Debug/poor-mans-profiler.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Debug/poor-mans-profiler.sh b/Debug/poor-mans-profiler.sh index eede0072d..2b2533756 100755 --- a/Debug/poor-mans-profiler.sh +++ b/Debug/poor-mans-profiler.sh @@ -37,7 +37,7 @@ sleeptime=0.1 # Doctors recommend 7-8 hours a day taskname= elf=$root/Build/px4fmu-v2_default.build/firmware.elf append=0 -fgfontsize=5 +fgfontsize=10 fgwidth=1900 for i in "$@" @@ -137,4 +137,12 @@ echo "Folded stacks saved to $foldfile" # Graphing. # cat $foldfile | flamegraph.pl --fontsize=$fgfontsize --width=$fgwidth > $graphfile -xdg-open $graphfile +echo "FlameGraph saved to $graphfile" + +# On KDE, xdg-open prefers Gwenview by default, which doesn't handle interactive SVGs, so we need a browser. +# The current implementation is hackish and stupid. Somebody, please do something about it. +opener=xdg-open +which firefox > /dev/null && opener=firefox +which google-chrome > /dev/null && opener=google-chrome + +$opener $graphfile |