Support the debug/dev profile in the perf script.
This commit is contained in:
parent
f25dbc1d7c
commit
cc86591a6c
@ -8,11 +8,22 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
|
|
||||||
cd "$DIR/../"
|
cd "$DIR/../"
|
||||||
|
|
||||||
cargo build --profile "$PROFILE" --no-default-features
|
function main {
|
||||||
perf record --freq=2000 --call-graph dwarf --output=perf.data target/${PROFILE}/compare
|
local additional_flags=()
|
||||||
# Convert to a format firefox will read
|
if [ "$PROFILE" = "dev" ] || [ "$PROFILE" = "debug" ]; then
|
||||||
# flags to consider --show-info
|
PROFILE="debug"
|
||||||
perf script -F +pid --input perf.data > perf.firefox
|
else
|
||||||
|
additional_flags+=(--profile "$PROFILE")
|
||||||
|
fi
|
||||||
|
cargo build --no-default-features "${additional_flags[@]}"
|
||||||
|
perf record --freq=2000 --call-graph dwarf --output=perf.data target/${PROFILE}/compare
|
||||||
|
|
||||||
echo "You probably want to go to https://profiler.firefox.com/"
|
# Convert to a format firefox will read
|
||||||
echo "Either that or run hotspot"
|
# flags to consider --show-info
|
||||||
|
perf script -F +pid --input perf.data > perf.firefox
|
||||||
|
|
||||||
|
echo "You probably want to go to https://profiler.firefox.com/"
|
||||||
|
echo "Either that or run hotspot"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "${@}"
|
||||||
|
Loading…
Reference in New Issue
Block a user