Fix a race when dumping thread list for tracing
We may miss recording information about thread if a thread exits after
resetting the the_trace_ but before dumping the thread information. We
record the information about exiting threads when the_trace_ is active
but not after resetting the_trace_. So record the list of threads before
resetting the_trace_.
Use Put instead of Overwrite to record thread id -> thread name mapping.
Earlier due to the race we allowed overwrite which is no longer needed.
Also enable the non-stream trace which was failing because of the above
mentioned race.
Bug: 275117853
Test: art/test.py -t 2246
Change-Id: Ic8cab3297b9f9b5815dc080965d0326b42192f05
5 files changed