This is an archive of the discontinued LLVM Phabricator instance.

tsan: improve lots_of_threads test
ClosedPublic

Authored by dvyukov on Jul 28 2021, 6:03 AM.

Details

Summary

The current 10 threads is not particularly "lots" and not stressful.
Create 10x300 threads and ensure they all are running at the same time.

Depends on D106953.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Jul 28 2021, 6:03 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2021, 6:03 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
melver accepted this revision.Jul 28 2021, 8:02 AM
melver added inline comments.
compiler-rt/test/tsan/lots_of_threads.c
19–26

constexpr int kIters = 10

?

21

This works because inner i is shadowing outer i, but it'd still be nicer if it was using i and j and not two i.

This revision is now accepted and ready to land.Jul 28 2021, 8:02 AM
dvyukov updated this revision to Diff 362402.Jul 28 2021, 8:32 AM

addressed comments

dvyukov marked 2 inline comments as done.Jul 28 2021, 8:33 AM
This revision was landed with ongoing or failed builds.Jul 28 2021, 8:36 AM
This revision was automatically updated to reflect the committed changes.