diff --git a/modules/packages/LockFreeQueue.chpl b/modules/packages/LockFreeQueue.chpl index 6cb501faed66..7e80afa11fad 100644 --- a/modules/packages/LockFreeQueue.chpl +++ b/modules/packages/LockFreeQueue.chpl @@ -27,13 +27,9 @@ - It relies on Chapel ``extern`` code blocks and so requires that the Chapel compiler is built with LLVM enabled. - - Currently only ``CHPL_TARGET_ARCH=x86_64`` is supported as it uses - the x86-64 instruction: CMPXCHG16B_. - - The implementation relies on ``GCC`` style inline assembly, and so - is restricted to a ``CHPL_TARGET_COMPILER`` value of ``gnu``, - ``clang``, or ``llvm``. - - .. _CMPXCHG16B: https://www.felixcloutier.com/x86/cmpxchg8b:cmpxchg16b + - The implementation relies on using either ``GCC`` style inline assembly + (for x86-64) or a GCC/clang builtin, and so is restricted to a + ``CHPL_TARGET_COMPILER`` value of ``gnu``, ``clang``, or ``llvm``. An implementation of the Michael & Scott [#]_, a lock-free queue. Concurrent safe memory reclamation is handled by an internal :record:`EpochManager`. Usage of the diff --git a/modules/packages/LockFreeStack.chpl b/modules/packages/LockFreeStack.chpl index 44973953c799..c526f1251c4f 100644 --- a/modules/packages/LockFreeStack.chpl +++ b/modules/packages/LockFreeStack.chpl @@ -28,13 +28,9 @@ - It relies on Chapel ``extern`` code blocks and so requires that the Chapel compiler is built with LLVM enabled. - - Currently only ``CHPL_TARGET_ARCH=x86_64`` is supported as it uses - the x86-64 instruction: CMPXCHG16B_. - - The implementation relies on ``GCC`` style inline assembly, and so - is restricted to a ``CHPL_TARGET_COMPILER`` value of ``gnu``, - ``clang``, or ``llvm``. - - .. _CMPXCHG16B: https://www.felixcloutier.com/x86/cmpxchg8b:cmpxchg16b + - The implementation relies on using either ``GCC`` style inline assembly + (for x86-64) or a GCC/clang builtin, and so is restricted to a + ``CHPL_TARGET_COMPILER`` value of ``gnu``, ``clang``, or ``llvm``. An implementation of the Treiber Stack [#]_, a lock-free stack. Concurrent safe memory reclamation is handled by an internal :record:`EpochManager`. Usage of the diff --git a/test/library/packages/ConcurrentMap/EXECOPTS b/test/library/packages/ConcurrentMap/memLeaks/EXECOPTS similarity index 100% rename from test/library/packages/ConcurrentMap/EXECOPTS rename to test/library/packages/ConcurrentMap/memLeaks/EXECOPTS diff --git a/test/library/packages/ConcurrentMap/memLeaks/PREDIFF b/test/library/packages/ConcurrentMap/memLeaks/PREDIFF new file mode 100755 index 000000000000..3762f3755985 --- /dev/null +++ b/test/library/packages/ConcurrentMap/memLeaks/PREDIFF @@ -0,0 +1,4 @@ +#!/bin/bash + +sed -E "s/0x[0-9a-f]*/prediffed/" <$2 >$2.predifftmp +mv $2.predifftmp $2 diff --git a/test/library/packages/ConcurrentMap/memLeaks/README b/test/library/packages/ConcurrentMap/memLeaks/README new file mode 100644 index 000000000000..e055990e8ac8 --- /dev/null +++ b/test/library/packages/ConcurrentMap/memLeaks/README @@ -0,0 +1,7 @@ +This directory is locking down that we currently have a memory leak for +ConcurrentMap. These tests symlink to equivalent correctness tests and can be +removed once this leak is fixed. + +We only symlink to the a subset of these tests where the +allocations/deallocations are deterministic (this should be sufficient for +memory tracking purposes). diff --git a/test/library/packages/ConcurrentMap/memLeaks/testAddSet.chpl b/test/library/packages/ConcurrentMap/memLeaks/testAddSet.chpl new file mode 120000 index 000000000000..8e0a14cc9f70 --- /dev/null +++ b/test/library/packages/ConcurrentMap/memLeaks/testAddSet.chpl @@ -0,0 +1 @@ +../testAddSet.chpl \ No newline at end of file diff --git a/test/library/packages/ConcurrentMap/memLeaks/testAddSet.good b/test/library/packages/ConcurrentMap/memLeaks/testAddSet.good new file mode 100644 index 000000000000..1f271e0be472 --- /dev/null +++ b/test/library/packages/ConcurrentMap/memLeaks/testAddSet.good @@ -0,0 +1,24 @@ +{1: -1} + +================================================= Memory Leaks ================================================== +Allocated Memory (Bytes) Number Size Total Description Address +================================================================================================================= +testAddSet.chpl:5 1 160 160 Bucket(int(64),int(64)) prediffed +testAddSet.chpl:3 1 88 88 Buckets(int(64),int(64)) prediffed +testAddSet.chpl:3 1 128 128 [domain(1,int(64),one)] AtomicObject(unmanaged Base(int(64),int(64))?,false,true)prediffed +testAddSet.chpl:3 1 24 24 _token prediffed +testAddSet.chpl:3 1 24 24 _token prediffed +testAddSet.chpl:3 1 24 24 _token prediffed +testAddSet.chpl:3 1 24 24 _token prediffed +testAddSet.chpl:3 1 24 24 _token prediffed +testAddSet.chpl:3 1 24 24 _token prediffed +testAddSet.chpl:32 1 24 24 _token prediffed +testAddSet.chpl:32 1 24 24 _token prediffed +testAddSet.chpl:32 1 24 24 _token prediffed +testAddSet.chpl:32 1 24 24 _token prediffed +testAddSet.chpl:32 1 24 24 _token prediffed +testAddSet.chpl:32 1 24 24 _token prediffed +testAddSet.chpl:3 1024 8 8192 array elements prediffed +testAddSet.chpl:3 1 72 72 domain(1,int(64),one) prediffed +================================================================================================================= + diff --git a/test/library/packages/ConcurrentMap/memLeaks/testClear.chpl b/test/library/packages/ConcurrentMap/memLeaks/testClear.chpl new file mode 120000 index 000000000000..94d96fdc965c --- /dev/null +++ b/test/library/packages/ConcurrentMap/memLeaks/testClear.chpl @@ -0,0 +1 @@ +../testClear.chpl \ No newline at end of file diff --git a/test/library/packages/ConcurrentMap/memLeaks/testClear.good b/test/library/packages/ConcurrentMap/memLeaks/testClear.good new file mode 100644 index 000000000000..ec8cefb73e69 --- /dev/null +++ b/test/library/packages/ConcurrentMap/memLeaks/testClear.good @@ -0,0 +1,23 @@ +{} + +================================================= Memory Leaks ================================================== +Allocated Memory (Bytes) Number Size Total Description Address +================================================================================================================= +testClear.chpl:4 1 88 88 Buckets(string,int(64)) prediffed +testClear.chpl:4 1 128 128 [domain(1,int(64),one)] AtomicObject(unmanaged Base(string,int(64))?,false,true)prediffed +testClear.chpl:4 1 24 24 _token prediffed +testClear.chpl:4 1 24 24 _token prediffed +testClear.chpl:4 1 24 24 _token prediffed +testClear.chpl:4 1 24 24 _token prediffed +testClear.chpl:4 1 24 24 _token prediffed +testClear.chpl:4 1 24 24 _token prediffed +testClear.chpl:12 1 24 24 _token prediffed +testClear.chpl:12 1 24 24 _token prediffed +testClear.chpl:12 1 24 24 _token prediffed +testClear.chpl:12 1 24 24 _token prediffed +testClear.chpl:12 1 24 24 _token prediffed +testClear.chpl:12 1 24 24 _token prediffed +testClear.chpl:4 1024 8 8192 array elements prediffed +testClear.chpl:4 1 72 72 domain(1,int(64),one) prediffed +================================================================================================================= + diff --git a/test/library/packages/ConcurrentMap/memLeaks/testEquality.chpl b/test/library/packages/ConcurrentMap/memLeaks/testEquality.chpl new file mode 120000 index 000000000000..57d5974d2997 --- /dev/null +++ b/test/library/packages/ConcurrentMap/memLeaks/testEquality.chpl @@ -0,0 +1 @@ +../testEquality.chpl \ No newline at end of file diff --git a/test/library/packages/ConcurrentMap/memLeaks/testEquality.good b/test/library/packages/ConcurrentMap/memLeaks/testEquality.good new file mode 100644 index 000000000000..8d41cb3d40c7 --- /dev/null +++ b/test/library/packages/ConcurrentMap/memLeaks/testEquality.good @@ -0,0 +1,86 @@ +true +false +false +true + +================================================= Memory Leaks ================================================== +Allocated Memory (Bytes) Number Size Total Description Address +================================================================================================================= +testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed +testEquality.chpl:3 1 88 88 Buckets(int(64),int(64)) prediffed +testEquality.chpl:4 1 88 88 Buckets(int(64),int(64)) prediffed +testEquality.chpl:3 1 128 128 [domain(1,int(64),one)] AtomicObject(unmanaged Base(int(64),int(64))?,false,true)prediffed +testEquality.chpl:4 1 128 128 [domain(1,int(64),one)] AtomicObject(unmanaged Base(int(64),int(64))?,false,true)prediffed +testEquality.chpl:3 1 24 24 _token prediffed +testEquality.chpl:3 1 24 24 _token prediffed +testEquality.chpl:3 1 24 24 _token prediffed +testEquality.chpl:3 1 24 24 _token prediffed +testEquality.chpl:3 1 24 24 _token prediffed +testEquality.chpl:3 1 24 24 _token prediffed +testEquality.chpl:4 1 24 24 _token prediffed +testEquality.chpl:4 1 24 24 _token prediffed +testEquality.chpl:4 1 24 24 _token prediffed +testEquality.chpl:4 1 24 24 _token prediffed +testEquality.chpl:4 1 24 24 _token prediffed +testEquality.chpl:4 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:13 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:14 1 24 24 _token prediffed +testEquality.chpl:19 1 24 24 _token prediffed +testEquality.chpl:19 1 24 24 _token prediffed +testEquality.chpl:19 1 24 24 _token prediffed +testEquality.chpl:19 1 24 24 _token prediffed +testEquality.chpl:19 1 24 24 _token prediffed +testEquality.chpl:19 1 24 24 _token prediffed +testEquality.chpl:20 1 24 24 _token prediffed +testEquality.chpl:20 1 24 24 _token prediffed +testEquality.chpl:20 1 24 24 _token prediffed +testEquality.chpl:20 1 24 24 _token prediffed +testEquality.chpl:20 1 24 24 _token prediffed +testEquality.chpl:20 1 24 24 _token prediffed +testEquality.chpl:3 1024 8 8192 array elements prediffed +testEquality.chpl:4 1024 8 8192 array elements prediffed +testEquality.chpl:3 1 72 72 domain(1,int(64),one) prediffed +testEquality.chpl:4 1 72 72 domain(1,int(64),one) prediffed +================================================================================================================= + diff --git a/test/library/packages/ConcurrentMap/memLeaks/testGetRemove.chpl b/test/library/packages/ConcurrentMap/memLeaks/testGetRemove.chpl new file mode 120000 index 000000000000..d103c14f2eea --- /dev/null +++ b/test/library/packages/ConcurrentMap/memLeaks/testGetRemove.chpl @@ -0,0 +1 @@ +../testGetRemove.chpl \ No newline at end of file diff --git a/test/library/packages/ConcurrentMap/memLeaks/testGetRemove.good b/test/library/packages/ConcurrentMap/memLeaks/testGetRemove.good new file mode 100644 index 000000000000..79064eaf2e80 --- /dev/null +++ b/test/library/packages/ConcurrentMap/memLeaks/testGetRemove.good @@ -0,0 +1,26 @@ +1 +{two: 2} + +================================================= Memory Leaks ================================================== +Allocated Memory (Bytes) Number Size Total Description Address +================================================================================================================= +testGetRemove.chpl:11 1 416 416 Bucket(string,int(64)) prediffed +testGetRemove.chpl:7 1 88 88 Buckets(string,int(64)) prediffed +testGetRemove.chpl:7 1 128 128 [domain(1,int(64),one)] AtomicObject(unmanaged Base(string,int(64))?,false,true)prediffed +testGetRemove.chpl:7 1 24 24 _token prediffed +testGetRemove.chpl:7 1 24 24 _token prediffed +testGetRemove.chpl:7 1 24 24 _token prediffed +testGetRemove.chpl:7 1 24 24 _token prediffed +testGetRemove.chpl:7 1 24 24 _token prediffed +testGetRemove.chpl:7 1 24 24 _token prediffed +testGetRemove.chpl:16 1 24 24 _token prediffed +testGetRemove.chpl:16 1 24 24 _token prediffed +testGetRemove.chpl:16 1 24 24 _token prediffed +testGetRemove.chpl:16 1 24 24 _token prediffed +testGetRemove.chpl:16 1 24 24 _token prediffed +testGetRemove.chpl:16 1 24 24 _token prediffed +testGetRemove.chpl:7 1024 8 8192 array elements prediffed +testGetRemove.chpl:7 1 72 72 domain(1,int(64),one) prediffed +testGetRemove.chpl:11 1 8 8 string copy data prediffed +================================================================================================================= + diff --git a/test/library/packages/ConcurrentMap/memLeaks/utilFunctions.chpl b/test/library/packages/ConcurrentMap/memLeaks/utilFunctions.chpl new file mode 120000 index 000000000000..3e9526589b0d --- /dev/null +++ b/test/library/packages/ConcurrentMap/memLeaks/utilFunctions.chpl @@ -0,0 +1 @@ +../utilFunctions.chpl \ No newline at end of file diff --git a/test/library/packages/ConcurrentMap/memLeaks/utilFunctions.good b/test/library/packages/ConcurrentMap/memLeaks/utilFunctions.good new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test/library/packages/ConcurrentMap/testAddSet.future b/test/library/packages/ConcurrentMap/testAddSet.future deleted file mode 100644 index 8c8863fbae7a..000000000000 --- a/test/library/packages/ConcurrentMap/testAddSet.future +++ /dev/null @@ -1 +0,0 @@ -bug: this test leaks memory diff --git a/test/library/packages/ConcurrentMap/testClear.future b/test/library/packages/ConcurrentMap/testClear.future deleted file mode 100644 index 8c8863fbae7a..000000000000 --- a/test/library/packages/ConcurrentMap/testClear.future +++ /dev/null @@ -1 +0,0 @@ -bug: this test leaks memory diff --git a/test/library/packages/ConcurrentMap/testContains.future b/test/library/packages/ConcurrentMap/testContains.future deleted file mode 100644 index 8c8863fbae7a..000000000000 --- a/test/library/packages/ConcurrentMap/testContains.future +++ /dev/null @@ -1 +0,0 @@ -bug: this test leaks memory diff --git a/test/library/packages/ConcurrentMap/testEquality.future b/test/library/packages/ConcurrentMap/testEquality.future deleted file mode 100644 index 8c8863fbae7a..000000000000 --- a/test/library/packages/ConcurrentMap/testEquality.future +++ /dev/null @@ -1 +0,0 @@ -bug: this test leaks memory diff --git a/test/library/packages/ConcurrentMap/testExtend.future b/test/library/packages/ConcurrentMap/testExtend.future deleted file mode 100644 index 8c8863fbae7a..000000000000 --- a/test/library/packages/ConcurrentMap/testExtend.future +++ /dev/null @@ -1 +0,0 @@ -bug: this test leaks memory diff --git a/test/library/packages/ConcurrentMap/testGetRemove.future b/test/library/packages/ConcurrentMap/testGetRemove.future deleted file mode 100644 index 8c8863fbae7a..000000000000 --- a/test/library/packages/ConcurrentMap/testGetRemove.future +++ /dev/null @@ -1 +0,0 @@ -bug: this test leaks memory diff --git a/test/library/packages/LockFreeQueue/consistencyCheck.future b/test/library/packages/LockFreeQueue/consistencyCheck.future deleted file mode 100644 index 8c8863fbae7a..000000000000 --- a/test/library/packages/LockFreeQueue/consistencyCheck.future +++ /dev/null @@ -1 +0,0 @@ -bug: this test leaks memory diff --git a/test/library/packages/LockFreeQueue/interleavedTest.future b/test/library/packages/LockFreeQueue/interleavedTest.future deleted file mode 100644 index 8c8863fbae7a..000000000000 --- a/test/library/packages/LockFreeQueue/interleavedTest.future +++ /dev/null @@ -1 +0,0 @@ -bug: this test leaks memory diff --git a/test/library/packages/LockFreeQueue/EXECOPTS b/test/library/packages/LockFreeQueue/memLeaks/EXECOPTS similarity index 100% rename from test/library/packages/LockFreeQueue/EXECOPTS rename to test/library/packages/LockFreeQueue/memLeaks/EXECOPTS diff --git a/test/library/packages/LockFreeQueue/PREDIFF b/test/library/packages/LockFreeQueue/memLeaks/PREDIFF similarity index 100% rename from test/library/packages/LockFreeQueue/PREDIFF rename to test/library/packages/LockFreeQueue/memLeaks/PREDIFF diff --git a/test/library/packages/LockFreeQueue/memLeaks/README b/test/library/packages/LockFreeQueue/memLeaks/README new file mode 100644 index 000000000000..3565af197078 --- /dev/null +++ b/test/library/packages/LockFreeQueue/memLeaks/README @@ -0,0 +1,7 @@ +This directory is locking down that we currently have a memory leak for this +module. These tests symlink to equivalent correctness tests and can be removed +once this leak is fixed. + +We only symlink to the a subset of these tests where the +allocations/deallocations are deterministic (this should be sufficient for +memory tracking purposes). diff --git a/test/library/packages/LockFreeQueue/memLeaks/consistencyCheck.chpl b/test/library/packages/LockFreeQueue/memLeaks/consistencyCheck.chpl new file mode 120000 index 000000000000..b23fead5b35e --- /dev/null +++ b/test/library/packages/LockFreeQueue/memLeaks/consistencyCheck.chpl @@ -0,0 +1 @@ +../consistencyCheck.chpl \ No newline at end of file diff --git a/test/library/packages/LockFreeQueue/memLeaks/consistencyCheck.good b/test/library/packages/LockFreeQueue/memLeaks/consistencyCheck.good new file mode 100644 index 000000000000..5897995dbfb7 --- /dev/null +++ b/test/library/packages/LockFreeQueue/memLeaks/consistencyCheck.good @@ -0,0 +1,3 @@ +1024 consistencyCheck.chpl:20 1 24 24 Node prediffed + 1 consistencyCheck.chpl:45 1 24 24 Node(int(64)) prediffed + 6 consistencyCheck.chpl:9 1 24 24 _token prediffed diff --git a/test/library/packages/LockFreeStack/consistencyCheck.future b/test/library/packages/LockFreeStack/consistencyCheck.future deleted file mode 100644 index 8c8863fbae7a..000000000000 --- a/test/library/packages/LockFreeStack/consistencyCheck.future +++ /dev/null @@ -1 +0,0 @@ -bug: this test leaks memory diff --git a/test/library/packages/LockFreeStack/interleavedTest.future b/test/library/packages/LockFreeStack/interleavedTest.future deleted file mode 100644 index 8c8863fbae7a..000000000000 --- a/test/library/packages/LockFreeStack/interleavedTest.future +++ /dev/null @@ -1 +0,0 @@ -bug: this test leaks memory diff --git a/test/library/packages/LockFreeStack/EXECOPTS b/test/library/packages/LockFreeStack/memLeaks/EXECOPTS similarity index 100% rename from test/library/packages/LockFreeStack/EXECOPTS rename to test/library/packages/LockFreeStack/memLeaks/EXECOPTS diff --git a/test/library/packages/LockFreeStack/PREDIFF b/test/library/packages/LockFreeStack/memLeaks/PREDIFF similarity index 100% rename from test/library/packages/LockFreeStack/PREDIFF rename to test/library/packages/LockFreeStack/memLeaks/PREDIFF diff --git a/test/library/packages/LockFreeStack/memLeaks/README b/test/library/packages/LockFreeStack/memLeaks/README new file mode 100644 index 000000000000..3565af197078 --- /dev/null +++ b/test/library/packages/LockFreeStack/memLeaks/README @@ -0,0 +1,7 @@ +This directory is locking down that we currently have a memory leak for this +module. These tests symlink to equivalent correctness tests and can be removed +once this leak is fixed. + +We only symlink to the a subset of these tests where the +allocations/deallocations are deterministic (this should be sufficient for +memory tracking purposes). diff --git a/test/library/packages/LockFreeStack/memLeaks/consistencyCheck.chpl b/test/library/packages/LockFreeStack/memLeaks/consistencyCheck.chpl new file mode 120000 index 000000000000..b23fead5b35e --- /dev/null +++ b/test/library/packages/LockFreeStack/memLeaks/consistencyCheck.chpl @@ -0,0 +1 @@ +../consistencyCheck.chpl \ No newline at end of file diff --git a/test/library/packages/LockFreeStack/memLeaks/consistencyCheck.good b/test/library/packages/LockFreeStack/memLeaks/consistencyCheck.good new file mode 100644 index 000000000000..485ff9351f35 --- /dev/null +++ b/test/library/packages/LockFreeStack/memLeaks/consistencyCheck.good @@ -0,0 +1,2 @@ +1024 consistencyCheck.chpl:20 1 24 24 Node prediffed + 6 consistencyCheck.chpl:9 1 24 24 _token prediffed