Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #94 from AmpereComputing/0002-perf-prev-pid
Browse files Browse the repository at this point in the history
Adds robustness to the perf.sh method for finding hhvm pid.
  • Loading branch information
ottoni authored Feb 13, 2019
2 parents 42b24b5 + ab03117 commit aa31148
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/perf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit aa31148

Please sign in to comment.