This is an archive of the discontinued LLVM Phabricator instance.

[TSan] Use max reduction to aggreagate StatThreadMaxAlive
AbandonedPublic

Authored by protze.joachim on Aug 7 2020, 3:39 AM.

Details

Summary

As long as only the initial thread creates all other threads, there is no difference. If different threads spawn threads, they all get a global max count. Sum reduction doesn't make sense for this counter. With fibers around, the value can become #threads * #fibers instead of #threads + #fibers

Diff Detail

Event Timeline

protze.joachim requested review of this revision.Aug 7 2020, 3:39 AM
protze.joachim created this revision.
vitalybuka added inline comments.Aug 18 2020, 8:31 PM
compiler-rt/lib/tsan/rtl/tsan_stat.cpp
22

what about StatThreadMaxTid?

24–25
vitalybuka requested changes to this revision.Aug 27 2020, 2:55 PM
This revision now requires changes to proceed.Aug 27 2020, 2:55 PM
protze.joachim abandoned this revision.Jul 25 2021, 6:57 AM

Abandon, since stats were removed with D106276 anyways.