Index: tools/run-perf.sh |
diff --git a/tools/run-perf.sh b/tools/run-perf.sh |
index 03123fdbb84df8829854eb07978605cc09bb7f7d..83750936c8eb296beca1e65c5425b3c8913f0253 100755 |
--- a/tools/run-perf.sh |
+++ b/tools/run-perf.sh |
@@ -45,9 +45,14 @@ if [ "$ACTUAL_KERNEL_MAP_RESTRICTION" -ne "0" ] ; then |
echo 0 | sudo tee $KERNEL_MAP_CONFIG_FILE |
fi |
+# Extract the command being perfed, so that we can prepend arguments to the |
+# arguments that the user supplied. |
+COMMAND=$1 |
+shift 1 |
+ |
echo "Running..." |
perf record -R \ |
-e $EVENT_TYPE \ |
-c $SAMPLE_EVERY_N_CYCLES \ |
--call-graph $CALL_GRAPH_METHOD \ |
- -i $@ --perf_basic_prof |
+ -i "$COMMAND" --perf_basic_prof "$@" |