[mini] Shut down the profiler after shutting down the major runtime components.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Tue, 5 Apr 2016 22:53:55 +0000 (00:53 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Wed, 6 Apr 2016 00:14:39 +0000 (02:14 +0200)
commit8e6b87f97ab115b7baeb81169839981aa2f8a205
tree15e349ad65a0d0ebc0dccc2b34eae7747c3d730e
parent0ebac113fce97894d0a53844f62c660a27cad7f7
[mini] Shut down the profiler after shutting down the major runtime components.

Previously, we would shut down the profiler so early that it would never see
unload events for threads, domains, etc. This sounds harmless at first, but
since the profiler dumps the remaining data in the thread-local log buffer to
disk from within the thread end callback, we would often miss events near the
end of a thread's lifetime.

Shutting down the profiler after the major runtime components doesn't appear to
have any negative effects, which makes sense as all managed threads should be
stopped by this point.
mono/mini/mini-runtime.c