Always fire join events for an rjoin (#651)
authorAndy Hanson <anhans@microsoft.com>
Fri, 7 Feb 2020 22:30:39 +0000 (17:30 -0500)
committerGitHub <noreply@github.com>
Fri, 7 Feb 2020 22:30:39 +0000 (14:30 -0800)
commit1275e5f16e5abaccbbe86195c88def54aaaf0353
treec67e491aa782bddeb2cc6446c96586fe1f8307ed
parent7814f9772ce47fe9134658e852023aaa8dc98019
Always fire join events for an rjoin (#651)

Previously, there was an additional check
`if (!join_struct.wait_done)` at the beginning of an rjoin.

This usually had no effect as the join isn't usually done yet. But if
thread A is the first to enter the join and finishes before thread B
starts, then B will never enter the `if`.

The only effect this had was that B would not fire join events in these
rare cases. (After that we check `join_struct.wait_done` again anyway.)
As of this PR we will always fire the events, which makes them easier
to analyze consistently.

Before this PR, looking at the join events for a single thread would show
no traces of the rjoin happening, except for an extra restart event from
the other thread.
src/coreclr/src/gc/gc.cpp