Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1245)

Unified Diff: tools/run-perf.sh

Issue 2391193003: [tools] run-perf: ensure command line arguments are prepended (Closed)
Patch Set: Fix being stupid (at least in this case) Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "$@"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698