1 #!/bin/sh 2 3 # Determine the session directory to use for oprofile. 4 [ "$OPROFILE_SESSION_DIR" ] || OPROFILE_SESSION_DIR=/tmp/oprofv8 5 6 # If no executable passed as the first parameter assume V8 release mode shell. 7 if [[ -x $1 ]] 8 then 9 shell_exec=`readlink -f "$1"` 10 # Any additional parameters are for the oprofile command. 11 shift 12 else 13 oprofile_tools_path=`cd $(dirname "$0");pwd` 14 [ "$V8_SHELL_DIR" ] || V8_SHELL_DIR=$oprofile_tools_path/../.. 15 shell_exec=$V8_SHELL_DIR/shell 16 fi 17 18 alias sudo_opcontrol='sudo opcontrol --session-dir="$OPROFILE_SESSION_DIR"' 19 20