[runtime] Make quick message-passing system for global flight recorder
commitf9c4740f592afb4eb7f1ff5d4b15e3cb74a26680
authorAlexander Kyte <alkyte@microsoft.com>
Tue, 26 Jun 2018 20:22:25 +0000 (26 16:22 -0400)
committerAlexander Kyte <alkyte@microsoft.com>
Fri, 6 Jul 2018 18:42:07 +0000 (6 14:42 -0400)
tree6933d87196906302fce82b66f9d7c4bd35626ff7
parent0146210751a01a413152965551e7bec406375fac
[runtime] Make quick message-passing system for global flight recorder

The previous system was a nice prototype, but it ran into the problem of
taking a global lock on every thread doing logging. A fully lockless
implementation of a data structure with so much state would have been
madness to debug, and I really didn't want to spend much time in the future
debugging this.

What I did is to make a thread that reads from a lockless queue and logs the
message from the queue.

Most of the rest of this code is to address the fact that hazard
pointers depend on state that is initialized after logging is expected
to come up.
mono/mini/debugger-state-machine.c
mono/mini/driver.c
mono/mini/mini-posix.c
mono/utils/mono-flight-recorder.c
mono/utils/mono-flight-recorder.h
mono/utils/mono-log-flight-recorder.c
mono/utils/mono-logger-internals.h
mono/utils/mono-logger.c
mono/utils/mono-threads.c
mono/utils/mono-threads.h