Skip to content

Commit 08d8f1a

Browse files
committed
[OpenMP][Tools] Cleanup memory pool used in Archer
The main motivation for reusing objects is that it helps to avoid creating and leaking synchronization clocks in TSan. The reused object will reuse the synchronization clock in TSan. Before, new and delete operators were overloaded to get and return memory for the object from/to the object pool. This patch replaces the operator overloading with explicit static New/Delete functions. Objects for parallel regions and implicit tasks will always be recruited and returned to the thread-local object pool. Only for explicit task, there is a chance that an other thread completes the task and will free the object. This patch optimizes the thread-local New/Delete calls by avoiding locks and only lock if the pool is empty. Remote threads return the object into a separate queue. The chunk size for allocations is now decided based on page size. The objects will also be aligned to cache lines avoiding false sharing. This is the first patch in a series to provide better tasking support. Differential Revision: https://reviews.llvm.org/D103606
1 parent 82e4e50 commit 08d8f1a

File tree

3 files changed

+239
-145
lines changed

3 files changed

+239
-145
lines changed

openmp/tools/archer/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,15 @@ statement in main!)</td>
131131
</tr>
132132
</tbody>
133133

134+
<tbody>
135+
<tr>
136+
<td class="org-left">report&#95;data&#95;leak</td>
137+
<td class="org-right">0</td>
138+
<td class="org-left">Report leaking OMPT data for execution under
139+
Archer. Used for testing and debugging Archer if errors occur.</td>
140+
</tr>
141+
</tbody>
142+
134143
<tbody>
135144
<tr>
136145
<td class="org-left">verbose</td>

0 commit comments

Comments
 (0)