|
|
|
@ -6,8 +6,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
|
|
|
|
|
: ${PROFILE:="perf"}
|
|
|
|
|
|
|
|
|
|
cd "$DIR/../"
|
|
|
|
|
|
|
|
|
|
function main {
|
|
|
|
|
local additional_flags=()
|
|
|
|
|
if [ "$PROFILE" = "dev" ] || [ "$PROFILE" = "debug" ]; then
|
|
|
|
@ -15,12 +13,12 @@ function main {
|
|
|
|
|
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}/parse "${@}"
|
|
|
|
|
(cd "$DIR/../" && cargo build --no-default-features "${additional_flags[@]}")
|
|
|
|
|
perf record --freq=2000 --call-graph dwarf --output="$DIR/../perf.data" "$DIR/../target/${PROFILE}/parse" "${@}"
|
|
|
|
|
|
|
|
|
|
# Convert to a format firefox will read
|
|
|
|
|
# flags to consider --show-info
|
|
|
|
|
perf script -F +pid --input perf.data > perf.firefox
|
|
|
|
|
perf script -F +pid --input "$DIR/../perf.data" > "$DIR/../perf.firefox"
|
|
|
|
|
|
|
|
|
|
echo "You probably want to go to https://profiler.firefox.com/"
|
|
|
|
|
echo "Either that or run hotspot"
|
|
|
|
|