[jit] Kill more of mdb.
authorRodrigo Kumpera <kumpera@gmail.com>
Mon, 25 Nov 2013 22:00:13 +0000 (17:00 -0500)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 26 Nov 2013 19:24:20 +0000 (14:24 -0500)
mono/mini/debug-mini.c
mono/mini/debug-mini.h
mono/mini/mini-trampolines.c
mono/mini/mini.c

index 25f77b22f4da48452e60c6c8cabc463cd930951b..412f53db02fba8f9ead97c50d23160eb73344d48 100644 (file)
@@ -844,121 +844,6 @@ mono_debugger_breakpoint_callback (MonoMethod *method, guint32 index)
        mono_debugger_event (MONO_DEBUGGER_EVENT_JIT_BREAKPOINT, (guint64) (gsize) method, index);
 }
 
-void
-mono_debugger_thread_created (gsize tid, MonoThread *thread, MonoJitTlsData *jit_tls, gpointer func)
-{
-#ifdef MONO_DEBUGGER_SUPPORTED
-       size_t stsize = 0;
-       guint8 *staddr = NULL;
-       MonoDebuggerThreadInfo *info;
-
-       if (mono_debug_format == MONO_DEBUG_FORMAT_NONE)
-               return;
-
-       mono_debugger_lock ();
-
-       mono_thread_get_stack_bounds (&staddr, &stsize);
-
-       info = g_new0 (MonoDebuggerThreadInfo, 1);
-       info->tid = tid;
-       info->thread = thread->internal_thread;
-       info->stack_start = (guint64) (gsize) staddr;
-       info->signal_stack_start = (guint64) (gsize) jit_tls->signal_stack;
-       info->stack_size = stsize;
-       info->signal_stack_size = jit_tls->signal_stack_size;
-       info->end_stack = (guint64) (gsize) GC_mono_debugger_get_stack_ptr ();
-       info->lmf_addr = (guint64) (gsize) mono_get_lmf_addr ();
-       info->jit_tls = jit_tls;
-
-       if (func)
-               info->thread_flags = MONO_DEBUGGER_THREAD_FLAGS_INTERNAL;
-       if (thread->internal_thread->threadpool_thread)
-               info->thread_flags |= MONO_DEBUGGER_THREAD_FLAGS_THREADPOOL;
-
-       info->next = mono_debugger_thread_table;
-       mono_debugger_thread_table = info;
-
-       mono_debugger_event (MONO_DEBUGGER_EVENT_THREAD_CREATED,
-                            tid, (guint64) (gsize) info);
-
-       mono_debugger_unlock ();
-#endif /* MONO_DEBUGGER_SUPPORTED */
-}
-
-void
-mono_debugger_thread_cleanup (MonoJitTlsData *jit_tls)
-{
-#ifdef MONO_DEBUGGER_SUPPORTED
-       MonoDebuggerThreadInfo **ptr;
-
-       if (mono_debug_format == MONO_DEBUG_FORMAT_NONE)
-               return;
-
-       mono_debugger_lock ();
-
-       for (ptr = &mono_debugger_thread_table; *ptr; ptr = &(*ptr)->next) {
-               MonoDebuggerThreadInfo *info = *ptr;
-
-               if (info->jit_tls != jit_tls)
-                       continue;
-
-               mono_debugger_event (MONO_DEBUGGER_EVENT_THREAD_CLEANUP,
-                                    info->tid, (guint64) (gsize) info);
-
-               *ptr = info->next;
-               g_free (info);
-               break;
-       }
-
-       mono_debugger_unlock ();
-#endif
-}
-
-void
-mono_debugger_extended_notification (MonoDebuggerEvent event, guint64 data, guint64 arg)
-{
-#ifdef MONO_DEBUGGER_SUPPORTED
-       MonoDebuggerThreadInfo **ptr;
-       MonoInternalThread *thread = mono_thread_internal_current ();
-
-       if (!mono_debug_using_mono_debugger ())
-               return;
-
-       mono_debugger_lock ();
-
-       for (ptr = &mono_debugger_thread_table; *ptr; ptr = &(*ptr)->next) {
-               MonoDebuggerThreadInfo *info = *ptr;
-
-               if (info->thread != thread)
-                       continue;
-
-               if ((info->extended_notifications & (int) event) == 0)
-                       continue;
-
-               mono_debugger_event (event, data, arg);
-       }
-
-       mono_debugger_unlock ();
-#endif
-}
-
-void
-mono_debugger_trampoline_compiled (const guint8 *trampoline, MonoMethod *method, const guint8 *code)
-{
-#ifdef MONO_DEBUGGER_SUPPORTED
-       struct {
-               const guint8 * trampoline;
-               MonoMethod *method;
-               const guint8 *code;
-       } info = { trampoline, method, code };
-
-       mono_debugger_extended_notification (MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE,
-                                            (guint64) (gsize) method, (guint64) (gsize) code);
-       mono_debugger_extended_notification (MONO_DEBUGGER_EVENT_TRAMPOLINE,
-                                            (guint64) (gsize) &info, 0);
-#endif
-}
-
 #if MONO_DEBUGGER_SUPPORTED
 static MonoDebuggerThreadInfo *
 find_debugger_thread_info (MonoInternalThread *thread)
index 649c30c0fb27da51f9bb041ac6020deb245d6127..ce1b12184482b21038d75ac072ed28050ed6ae37 100644 (file)
@@ -9,18 +9,6 @@
 typedef struct _MonoDebuggerThreadInfo MonoDebuggerThreadInfo;
 extern MonoDebuggerThreadInfo *mono_debugger_thread_table;
 
-MONO_API void
-mono_debugger_thread_created (gsize tid, MonoThread *thread, MonoJitTlsData *jit_tls, gpointer func);
-
-MONO_API void
-mono_debugger_thread_cleanup (MonoJitTlsData *jit_tls);
-
-MONO_API void
-mono_debugger_extended_notification (MonoDebuggerEvent event, guint64 data, guint64 arg);
-
-MONO_API void
-mono_debugger_trampoline_compiled (const guint8 *trampoline, MonoMethod *method, const guint8 *code);
-
 MONO_API void
 mono_debugger_call_exception_handler (gpointer addr, gpointer stack, MonoObject *exc);
 
index bc1c4639d2b40a456768cb5847aecea9d99e0607..40b913c212faf9cb99eaabcfbb729ac3acdb8dec 100644 (file)
@@ -577,8 +577,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
        addr = compiled_method = mono_compile_method (m);
        g_assert (addr);
 
-       mono_debugger_trampoline_compiled (code, m, addr);
-
        if (generic_virtual || variant_iface) {
                if (vt->klass->valuetype) /*FIXME is this required variant iface?*/
                        need_unbox_tramp = TRUE;
@@ -809,8 +807,6 @@ mono_generic_virtual_remoting_trampoline (mgreg_t *regs, guint8 *code, MonoMetho
        addr = mono_compile_method (m);
        g_assert (addr);
 
-       mono_debugger_trampoline_compiled (NULL, m, addr);
-
        return addr;
 }
 #endif
@@ -1068,7 +1064,6 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *tramp_data, gui
                        delegate->method_ptr = addr;
                        if (enable_caching && delegate->method_code)
                                *delegate->method_code = delegate->method_ptr;
-                       mono_debugger_trampoline_compiled (NULL, method, delegate->method_ptr);
                }
        } else {
                if (need_rgctx_tramp)
@@ -1094,7 +1089,6 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *tramp_data, gui
        code = mono_compile_method (m);
        code = mini_add_method_trampoline (NULL, m, code, mono_method_needs_static_rgctx_invoke (m, FALSE), FALSE);
        delegate->invoke_impl = mono_get_addr_from_ftnptr (code);
-       mono_debugger_trampoline_compiled (NULL, m, delegate->invoke_impl);
 
        return code;
 }
index 8aed3f413419f9d66fc125328569c8df67ba6557..146d5561493ee178d1902a1748414a13f6dde8ff 100644 (file)
@@ -2838,7 +2838,6 @@ mono_thread_start_cb (intptr_t tid, gpointer stack_start, gpointer func)
        MonoInternalThread *thread;
        void *jit_tls = setup_jit_tls_data (stack_start, mono_thread_abort);
        thread = mono_thread_internal_current ();
-       mono_debugger_thread_created (tid, thread->root_domain_thread, jit_tls, func);
        if (thread)
                thread->jit_data = jit_tls;
 
@@ -2862,7 +2861,6 @@ mono_thread_attach_cb (intptr_t tid, gpointer stack_start)
        MonoInternalThread *thread;
        void *jit_tls = setup_jit_tls_data (stack_start, mono_thread_abort_dummy);
        thread = mono_thread_internal_current ();
-       mono_debugger_thread_created (tid, thread->root_domain_thread, (MonoJitTlsData *) jit_tls, NULL);
        if (thread)
                thread->jit_data = jit_tls;
        if (mono_profiler_get_events () & MONO_PROFILE_STATISTICAL)
@@ -2877,8 +2875,6 @@ mini_thread_cleanup (MonoInternalThread *thread)
        MonoJitTlsData *jit_tls = thread->jit_data;
 
        if (jit_tls) {
-               mono_debugger_thread_cleanup (jit_tls);
-
                /* We can't clean up tls information if we are on another thread, it will clean up the wrong stuff
                 * It would be nice to issue a warning when this happens outside of the shutdown sequence. but it's
                 * not a trivial thing.