From 1230a4046e1858103a02768703d2a1e0fb4f2d63 Mon Sep 17 00:00:00 2001 From: Rodrigo Kumpera Date: Thu, 20 Nov 2014 18:33:33 -0500 Subject: [PATCH] [profiler] Use the new hidden API to attach the helper thread as a tools thread. This makes JI lookup work more reliably. --- mono/profiler/proflog.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mono/profiler/proflog.c b/mono/profiler/proflog.c index 882a17f678e..8ce18359101 100644 --- a/mono/profiler/proflog.c +++ b/mono/profiler/proflog.c @@ -2459,6 +2459,10 @@ new_filename (const char* filename) } #ifndef DISABLE_HELPER_THREAD + +//this is exposed by the JIT, but it's not meant to be a supported API for now. +extern void mono_threads_attach_tools_thread (void); + static void* helper_thread (void* arg) { @@ -2468,6 +2472,7 @@ helper_thread (void* arg) char buf [64]; MonoThread *thread = NULL; + mono_threads_attach_tools_thread (); //fprintf (stderr, "Server listening\n"); command_socket = -1; while (1) { -- 2.11.4.GIT