From 04aaf3534a05bc640346e87902b5460bd38348ee Mon Sep 17 00:00:00 2001 From: "shravanrn@gmail.com" Date: Sat, 8 Feb 2020 17:05:34 -0800 Subject: [PATCH] Extra check for cgmemtime --- newRunMacroPerfTest | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/newRunMacroPerfTest b/newRunMacroPerfTest index 5f04376eb9..90e45e51d9 100755 --- a/newRunMacroPerfTest +++ b/newRunMacroPerfTest @@ -1,6 +1,7 @@ #!/bin/bash export MOZ_DISABLE_CONTENT_SANDBOX=1 -export TALOS_PROCESS_START_RUNNER=$(realpath ../cgmemtime/cgmemtime) +CGMEMTIME_DIR=$(realpath ../cgmemtime/) +export TALOS_PROCESS_START_RUNNER=$CGMEMTIME_DIR/cgmemtime unset MOZ_RLBOX_SANDBOX_NOLIMIT # set -o xtrace @@ -15,6 +16,11 @@ if [[ -f "$1" ]]; then exit 1; fi +if [ ! -e "/sys/fs/cgroup/memory/cgmemtime" ]; then + echo "cgmemtime not setup since comp restart. Setting up now." + sudo $CGMEMTIME_DIR/cgmemtime --setup -g $(USER) --perm 775; +fi + OUTPUTPATH=$(cd "$(dirname "$1")"; pwd)/$(basename "$1") mkdir -p ${OUTPUTPATH} cd "$(dirname "$0")"