Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2008-12-09 23:14:00 +0300
committerZoltan Varga <vargaz@gmail.com>2008-12-09 23:14:00 +0300
commit9fe47f55e3ae10c547e4263870c8cd1761a4d991 (patch)
tree67af0f674f02c57cd72f7842eff71218b2b34ff3
parent657e5df41923e27e37860c18cca32d381f0c185e (diff)
2008-12-09 Zoltan Varga <vargaz@gmail.com>
Backport of r121150. * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info while holding the aot lock. svn path=/branches/mono-2-2/mono/; revision=121152
-rw-r--r--mono/mini/ChangeLog7
-rw-r--r--mono/mini/aot-runtime.c11
2 files changed, 14 insertions, 4 deletions
diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog
index 3bd8c10a354..791a7d3333f 100644
--- a/mono/mini/ChangeLog
+++ b/mono/mini/ChangeLog
@@ -1,5 +1,12 @@
2008-12-09 Zoltan Varga <vargaz@gmail.com>
+ Backport of r121150.
+
+ * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
+ while holding the aot lock.
+
+2008-12-09 Zoltan Varga <vargaz@gmail.com>
+
Backport of r121103.
* aot-runtime.c (decode_exception_debug_info): Acquire the domain
diff --git a/mono/mini/aot-runtime.c b/mono/mini/aot-runtime.c
index a5bdb0dde55..2cdc9c10b58 100644
--- a/mono/mini/aot-runtime.c
+++ b/mono/mini/aot-runtime.c
@@ -1329,6 +1329,9 @@ mono_aot_get_class_from_name (MonoImage *image, const char *name_space, const ch
return TRUE;
}
+/*
+ * LOCKING: Acquires the domain lock.
+ */
static MonoJitInfo*
decode_exception_debug_info (MonoAotModule *aot_module, MonoDomain *domain,
MonoMethod *method, guint8* ex_info, guint8 *code)
@@ -2016,10 +2019,6 @@ load_method (MonoDomain *domain, MonoAotModule *aot_module, MonoImage *image, Mo
mono_mempool_destroy (mp);
}
- mono_aot_lock ();
-
- mono_jit_stats.methods_aot++;
-
if (mono_trace_is_traced (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT)) {
char *full_name;
@@ -2037,6 +2036,10 @@ load_method (MonoDomain *domain, MonoAotModule *aot_module, MonoImage *image, Mo
g_free (full_name);
}
+ mono_aot_lock ();
+
+ mono_jit_stats.methods_aot++;
+
aot_module->methods_loaded [method_index / 32] |= 1 << (method_index % 32);
init_plt (aot_module);