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. 7if [[ -x $1 ]] 8then 9 shell_exec=`readlink -f "$1"` 10 # Any additional parameters are for the oprofile command. 11 shift 12else 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 16fi 17 18alias sudo_opcontrol='sudo opcontrol --session-dir="$OPROFILE_SESSION_DIR"' 19 20