Add some debug logging to lookup_data_table () to help track down why it asserts...
[mono.git] / mono / metadata / boehm-gc.c
index bcb23082d9eb104e5ad71db191eaf53059fa6c30..b7a5c79e5d9be9d7151a5d9fd724a6b18886cfc7 100644 (file)
 #include "private/pthread_support.h"
 #endif
 
+#if defined(PLATFORM_MACOSX) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
+void *pthread_get_stackaddr_np(pthread_t);
+#endif
+
 #define GC_NO_DESCRIPTOR ((gpointer)(0 | GC_DS_LENGTH))
 /*Boehm max heap cannot be smaller than 16MB*/
 #define MIN_BOEHM_MAX_HEAP_SIZE_IN_MB 16
@@ -202,16 +206,18 @@ mono_gc_base_init (void)
 void
 mono_gc_collect (int generation)
 {
-       MONO_PROBE_GC_BEGIN (generation);
+       MONO_GC_BEGIN (generation);
 
+#ifndef DISABLE_PERFCOUNTERS
        mono_perfcounters->gc_induced++;
+#endif
        GC_gcollect ();
        
-       MONO_PROBE_GC_END (generation);
+       MONO_GC_END (generation);
 #if defined(ENABLE_DTRACE) && defined(__sun__)
        /* This works around a dtrace -G problem on Solaris.
           Limit its actual use to when the probe is enabled. */
-       if (MONO_PROBE_GC_END_ENABLED ())
+       if (MONO_GC_END_ENABLED ())
                sleep(0);
 #endif
 }
@@ -406,11 +412,14 @@ on_gc_notification (GCEventType event)
                mono_thread_info_suspend_unlock ();
        
        if (e == MONO_GC_EVENT_START) {
+#ifndef DISABLE_PERFCOUNTERS
                if (mono_perfcounters)
                        mono_perfcounters->gc_collections0++;
-               mono_stats.major_gc_count ++;
+#endif
+               gc_stats.major_gc_count ++;
                gc_start_time = mono_100ns_ticks ();
        } else if (e == MONO_GC_EVENT_END) {
+#ifndef DISABLE_PERFCOUNTERS
                if (mono_perfcounters) {
                        guint64 heap_size = GC_get_heap_size ();
                        guint64 used_size = heap_size - GC_get_free_bytes ();
@@ -419,7 +428,8 @@ on_gc_notification (GCEventType event)
                        mono_perfcounters->gc_reserved_bytes = heap_size;
                        mono_perfcounters->gc_gen0size = heap_size;
                }
-               mono_stats.major_gc_time_usecs += (mono_100ns_ticks () - gc_start_time) / 10;
+#endif
+               gc_stats.major_gc_time_usecs += (mono_100ns_ticks () - gc_start_time) / 10;
                mono_trace_message (MONO_TRACE_GC, "gc took %d usecs", (mono_100ns_ticks () - gc_start_time) / 10);
        }
        mono_profiler_gc_event (e, 0);
@@ -429,11 +439,13 @@ static void
 on_gc_heap_resize (size_t new_size)
 {
        guint64 heap_size = GC_get_heap_size ();
+#ifndef DISABLE_PERFCOUNTERS
        if (mono_perfcounters) {
                mono_perfcounters->gc_committed_bytes = heap_size;
                mono_perfcounters->gc_reserved_bytes = heap_size;
                mono_perfcounters->gc_gen0size = heap_size;
        }
+#endif
        mono_profiler_gc_heap_resize (new_size);
 }
 
@@ -1292,4 +1304,23 @@ mono_gc_register_altstack (gpointer stack, gint32 stack_size, gpointer altstack,
 #endif
 }
 
+int
+mono_gc_get_los_limit (void)
+{
+       return G_MAXINT;
+}
+
+gboolean
+mono_gc_user_markers_supported (void)
+{
+       return FALSE;
+}
+
+void *
+mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker)
+{
+       g_assert_not_reached ();
+       return NULL;
+}
+
 #endif /* no Boehm GC */