diff options
author | Lukas Larsson <[email protected]> | 2019-06-28 10:49:06 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2019-06-28 10:49:06 +0200 |
commit | 643ee0a6e0a2085c3c522fdb6e39bc3bd5159a95 (patch) | |
tree | d93d8c640215ba07b93899ff39e68f134098f7b7 /erts/etc | |
parent | 28155a2eb926cc43c498ec8225a8f09e0f71e5ee (diff) | |
parent | c29006892cdddd95f32a7b6fc41eb3d8065c0f39 (diff) | |
download | otp-643ee0a6e0a2085c3c522fdb6e39bc3bd5159a95.tar.gz otp-643ee0a6e0a2085c3c522fdb6e39bc3bd5159a95.tar.bz2 otp-643ee0a6e0a2085c3c522fdb6e39bc3bd5159a95.zip |
Merge branch 'maint'
Diffstat (limited to 'erts/etc')
-rw-r--r-- | erts/etc/unix/cerl.src | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src index 710a7a9ef6..59de9bdec8 100644 --- a/erts/etc/unix/cerl.src +++ b/erts/etc/unix/cerl.src @@ -312,8 +312,11 @@ if [ "x$GDB" = "x" ]; then # on multiple cores (especially with async threads). Valgrind only run one pthread # at a time anyway so there is no point letting it utilize more than one core. # Use $sched_arg to force all schedulers online to emulate multicore. - taskset1="taskset 1" ncpu=`cat /proc/cpuinfo | grep -w processor | wc -l` + # Choose a random core in order to not collide with any other valgrind + # run on the same machine. + taskset1=$((1 << (`shuf -i 1-$ncpu -n 1` - 1) )) + taskset1="taskset $taskset1" sched_arg="-S$ncpu:$ncpu" else taskset1= |