From 45283b48d9fd8823c04eca2af5e41d1445a3f3f9 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Wed, 6 Sep 2023 19:31:09 -0400 Subject: [PATCH] Update performance scripts to support taking input file parameters. --- scripts/callgrind.bash | 2 +- scripts/perf.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/callgrind.bash b/scripts/callgrind.bash index cc5ad927..3bc909c4 100755 --- a/scripts/callgrind.bash +++ b/scripts/callgrind.bash @@ -7,7 +7,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$DIR/../" RUSTFLAGS="-C opt-level=0" cargo build --no-default-features -valgrind --tool=callgrind --callgrind-out-file=callgrind.out target/debug/parse +valgrind --tool=callgrind --callgrind-out-file=callgrind.out target/debug/parse "${@}" echo "You probably want to run:" echo "callgrind_annotate --auto=yes callgrind.out" diff --git a/scripts/perf.bash b/scripts/perf.bash index db63647b..f40e58be 100755 --- a/scripts/perf.bash +++ b/scripts/perf.bash @@ -16,7 +16,7 @@ function main { 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 + perf record --freq=2000 --call-graph dwarf --output=perf.data target/${PROFILE}/parse "${@}" # Convert to a format firefox will read # flags to consider --show-info