Reland "Update test to not trace thread start / join"
This reverts commit 89fae872b0aa0c7186ee11bdf1f5732de3f66030.
Reason for revert: Reland after some fixes and improvements
1. The actual reason for failures is a bug introduced in a different CL
(https://android-review.git.corp.google.com/c/platform/art/+/2561890).
This CL fixes the bug where break was used instead of continue
2. Update the test to check only events corresponding to the expected
thread. Though the origianl CL was to prevent thread join and thread
start events to prevent races across threads it wasn't quite accurate.
There were still events corresponding to thread join. So this CL
updates the checks for a particular thread.
3. A small cleanup to use local the_trace in trace.cc for consistency.
4. A small cleanup to properly delete temporary files.
Bug: 259258187
Test: art/test.py -t 2246
Change-Id: Ida21433a7040217bd2da2231cc8ce475e413b1df
6 files changed