gpu: nvgpu: unit: force gcov.sh to use a single thread

On some host OSes, the OS may allocate virtual addresses that are
larger than can be handled by NVGPU. As a workaround, we noticed
that the host OS will not allocate such large addresses when
running single threaded. There is no other way to prevent this
issue nor is there any guarantee that this workaround will always
work...

JIRA NVGPU-1246

Change-Id: I8c89cf6be9f80bd6fb18fd1688037b9144d2d21c
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2135370
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Nicolas Benech
2019-06-12 18:32:01 -04:00
committed by mobile promotions
parent 93e7bb67b5
commit f09d19d5a3
2 changed files with 3 additions and 2 deletions

View File

@@ -60,7 +60,7 @@ find . -name "*.gcda" -exec rm {} +
find $NVGPU_SRC_ROOT -name "*.gcda" -exec rm {} +
#Run unit tests
./unit.sh -j 2
./unit.sh
OUT=$?
if [ ! $OUT -eq 0 ]; then
echo "ERROR: Unit test run failed."

View File

@@ -41,7 +41,8 @@ if [ -f nvgpu_unit ]; then
else
# running on host
LD_LIBRARY_PATH="build:build/units"
NVGPU_UNIT=build/nvgpu_unit
# On host, must run single-threaded to avoid high VAs
NVGPU_UNIT="./build/nvgpu_unit --num-threads 1"
fi
export LD_LIBRARY_PATH