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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #! /bin/sh 1 #! /bin/sh
2 # 2 #
3 # Copyright 2016 the V8 project authors. All rights reserved. 3 # Copyright 2016 the V8 project authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 # 6 #
7 7
8 ########## Global variable definitions 8 ########## Global variable definitions
9 9
10 # Ensure that <your CPU clock> / $SAMPLE_EVERY_N_CYCLES < $MAXIMUM_SAMPLE_RATE. 10 # Ensure that <your CPU clock> / $SAMPLE_EVERY_N_CYCLES < $MAXIMUM_SAMPLE_RATE.
(...skipping 27 matching lines...) Expand all
38 echo "Setting appropriate maximum sample rate..." 38 echo "Setting appropriate maximum sample rate..."
39 echo $MAXIMUM_SAMPLE_RATE | sudo tee $SAMPLE_RATE_CONFIG_FILE 39 echo $MAXIMUM_SAMPLE_RATE | sudo tee $SAMPLE_RATE_CONFIG_FILE
40 fi 40 fi
41 41
42 ACTUAL_KERNEL_MAP_RESTRICTION=$(cat $KERNEL_MAP_CONFIG_FILE) 42 ACTUAL_KERNEL_MAP_RESTRICTION=$(cat $KERNEL_MAP_CONFIG_FILE)
43 if [ "$ACTUAL_KERNEL_MAP_RESTRICTION" -ne "0" ] ; then 43 if [ "$ACTUAL_KERNEL_MAP_RESTRICTION" -ne "0" ] ; then
44 echo "Disabling kernel address map restriction..." 44 echo "Disabling kernel address map restriction..."
45 echo 0 | sudo tee $KERNEL_MAP_CONFIG_FILE 45 echo 0 | sudo tee $KERNEL_MAP_CONFIG_FILE
46 fi 46 fi
47 47
48 # Extract the command being perfed, so that we can prepend arguments to the
49 # arguments that the user supplied.
50 COMMAND=$1
51 shift 1
52
48 echo "Running..." 53 echo "Running..."
49 perf record -R \ 54 perf record -R \
50 -e $EVENT_TYPE \ 55 -e $EVENT_TYPE \
51 -c $SAMPLE_EVERY_N_CYCLES \ 56 -c $SAMPLE_EVERY_N_CYCLES \
52 --call-graph $CALL_GRAPH_METHOD \ 57 --call-graph $CALL_GRAPH_METHOD \
53 -i $@ --perf_basic_prof 58 -i "$COMMAND" --perf_basic_prof "$@"
OLDNEW
« 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