diff --git a/scripts/perf.sh b/scripts/perf.sh index c3ee231..18d1bb2 100755 --- a/scripts/perf.sh +++ b/scripts/perf.sh @@ -9,6 +9,10 @@ ARGS="$@" echo "Running as $(whoami)" HHVM_PID="$(pgrep -xn 'hhvm')" +PREV_PID=`expr $HHVM_PID - 1` +if [ ! -f /tmp/perf-$HHVM_PID.map ] && [ -f /tmp/perf-$PREV_PID.map ]; then + HHVM_PID=$PREV_PID +fi OSS_DIR=$(pwd) echo "The first arg is the output directory."