Wait for TraceWriter tasks to finish before stopping workers
We used to wait for tasks to finish after stopping the workers which
actually doesn't let the tasks finish.This meant that we didn't flush
the buffers fully.
Another fix in this CL is to not synchronously flush the current
per-thread buffer when stopping tracing. Synchronous flush would bypass
the tasks in the queue and that would mean the requests are not
processed in order. It is important to process them in order so that the
information about new methods is flushed before the method entry / exits
corresponding to those methods.
Bug: 259258187
Test: art/test.py -t 2246
Change-Id: I6144ed108b72d284b574306b5dace148ad51ac86
1 file changed