Chromium Code Reviews| Index: tools/run-perf.sh |
| diff --git a/tools/run-perf.sh b/tools/run-perf.sh |
| index 03123fdbb84df8829854eb07978605cc09bb7f7d..880f126a4a62d50e4aaabcfc33e827b756b50113 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 $1 --perf_basic_prof "$@" |
|
rmcilroy
2016/10/05 11:26:49
Should the $1 here be $COMMAND instead?
Leszek Swirski
2016/10/05 11:29:41
It absolutely should, not sure how that snuck past
|