MonoConcurrentHashTable *image_to_methods;
+ GHashTable *uncovered_methods;
+
guint32 previous_offset;
};
class_name = mono_type_get_name (mono_class_get_type (klass));
number_of_methods = mono_class_num_methods (klass);
- fully_covered = count_queue (class_methods);
+
+ GHashTable *covered_methods = g_hash_table_new (NULL, NULL);
+ int count = 0;
+ {
+ MonoLockFreeQueueNode *node;
+ guint count = 0;
+
+ while ((node = mono_lock_free_queue_dequeue (class_methods))) {
+ MethodNode *mnode = (MethodNode*)node;
+ g_hash_table_insert (covered_methods, mnode->method, mnode->method);
+ count++;
+ mono_thread_hazardous_try_free (node, g_free);
+ }
+ }
+ fully_covered = count;
+
+ gpointer iter = NULL;
+ MonoMethod *method;
+ while ((method = mono_class_get_methods (klass, &iter))) {
+ if (!g_hash_table_lookup (covered_methods, method))
+ g_hash_table_insert (coverage_profiler.uncovered_methods, method, method);
+ }
+ g_hash_table_destroy (covered_methods);
+
/* We don't handle partial covered yet */
partially_covered = 0;
mono_os_mutex_lock (&coverage_profiler.mutex);
mono_conc_hashtable_foreach (coverage_profiler.assemblies, dump_assembly, NULL);
mono_conc_hashtable_foreach (coverage_profiler.methods, dump_method, NULL);
+ g_hash_table_foreach (coverage_profiler.uncovered_methods, dump_method, NULL);
mono_os_mutex_unlock (&coverage_profiler.mutex);
fprintf (coverage_profiler.file, "</coverage>\n");
coverage_profiler.classes = mono_conc_hashtable_new (NULL, NULL);
coverage_profiler.filtered_classes = mono_conc_hashtable_new (NULL, NULL);
coverage_profiler.image_to_methods = mono_conc_hashtable_new (NULL, NULL);
+ coverage_profiler.uncovered_methods = g_hash_table_new (NULL, NULL);
init_suppressed_assemblies ();
coverage_profiler.filters = filters;