X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fseq-points.c;h=f9c0b1f00ececf4f302467b0bd3ea89c981a44b7;hb=fb48a088ce55f95c522ddbd02a0efc74f765c56e;hp=88f732d9fc350b9e8a6e5b8bda942e9670a3b0c9;hpb=91ae1664061e8ac2d370da57c57d450bb00d64de;p=mono.git diff --git a/mono/mini/seq-points.c b/mono/mini/seq-points.c index 88f732d9fc3..f9c0b1f00ec 100644 --- a/mono/mini/seq-points.c +++ b/mono/mini/seq-points.c @@ -230,16 +230,18 @@ mono_save_seq_point_info (MonoCompile *cfg) g_free (next); cfg->seq_point_info = mono_seq_point_info_new (array->len, TRUE, array->data, has_debug_data, &seq_info_size); - mono_jit_stats.allocated_seq_points_size += seq_info_size; + InterlockedAdd (&mono_jit_stats.allocated_seq_points_size, seq_info_size); g_byte_array_free (array, TRUE); // FIXME: dynamic methods if (!cfg->compile_aot) { mono_domain_lock (domain); - // FIXME: How can the lookup succeed ? + // FIXME: The lookup can fail if the method is JITted recursively though a type cctor if (!g_hash_table_lookup (domain_jit_info (domain)->seq_points, cfg->method_to_register)) g_hash_table_insert (domain_jit_info (domain)->seq_points, cfg->method_to_register, cfg->seq_point_info); + else + mono_seq_point_info_free (cfg->seq_point_info); mono_domain_unlock (domain); }