Skip to content

Commit

Permalink
Merge remote-tracking branch '_prequal_remote/concurrent_map_tests' i…
Browse files Browse the repository at this point in the history
…nto HEAD
  • Loading branch information
stonea committed Jul 1, 2024
2 parents 0e179b4 + 95e3623 commit 48fee2d
Show file tree
Hide file tree
Showing 35 changed files with 202 additions and 24 deletions.
10 changes: 3 additions & 7 deletions modules/packages/LockFreeQueue.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions modules/packages/LockFreeStack.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions test/library/packages/ConcurrentMap/memLeaks/PREDIFF
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

sed -E "s/0x[0-9a-f]*/prediffed/" <$2 >$2.predifftmp
mv $2.predifftmp $2
7 changes: 7 additions & 0 deletions test/library/packages/ConcurrentMap/memLeaks/README
Original file line number Diff line number Diff line change
@@ -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).
24 changes: 24 additions & 0 deletions test/library/packages/ConcurrentMap/memLeaks/testAddSet.good
Original file line number Diff line number Diff line change
@@ -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
=================================================================================================================

23 changes: 23 additions & 0 deletions test/library/packages/ConcurrentMap/memLeaks/testClear.good
Original file line number Diff line number Diff line change
@@ -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
=================================================================================================================

86 changes: 86 additions & 0 deletions test/library/packages/ConcurrentMap/memLeaks/testEquality.good
Original file line number Diff line number Diff line change
@@ -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
=================================================================================================================

26 changes: 26 additions & 0 deletions test/library/packages/ConcurrentMap/memLeaks/testGetRemove.good
Original file line number Diff line number Diff line change
@@ -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
=================================================================================================================

Empty file.
1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testAddSet.future

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testClear.future

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testContains.future

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testEquality.future

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testExtend.future

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testGetRemove.future

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/LockFreeQueue/interleavedTest.future

This file was deleted.

File renamed without changes.
7 changes: 7 additions & 0 deletions test/library/packages/LockFreeQueue/memLeaks/README
Original file line number Diff line number Diff line change
@@ -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).
Original file line number Diff line number Diff line change
@@ -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

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/LockFreeStack/interleavedTest.future

This file was deleted.

File renamed without changes.
7 changes: 7 additions & 0 deletions test/library/packages/LockFreeStack/memLeaks/README
Original file line number Diff line number Diff line change
@@ -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).
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1024 consistencyCheck.chpl:20 1 24 24 Node prediffed
6 consistencyCheck.chpl:9 1 24 24 _token prediffed

0 comments on commit 48fee2d

Please sign in to comment.