{
InterlockedWrite (&runtime_inited, 1);
- start_writer_thread (profiler);
- start_dumper_thread (profiler);
-
register_counter ("Sample events allocated", &sample_allocations_ctr);
register_counter ("Log buffers allocated", &buffer_allocations_ctr);
counters_init (profiler);
+ /*
+ * We must start the helper thread before the writer thread. This is
+ * because the helper thread sets up the command port which is written to
+ * the log header by the writer thread.
+ */
start_helper_thread (profiler);
+ start_writer_thread (profiler);
+ start_dumper_thread (profiler);
}
static MonoProfiler*