Author: zoltan
Date: 2007-07-05 17:36:46 -0400 (Thu, 05 Jul 2007)
New Revision: 81439
Modified:
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/mini-amd64.c
trunk/mono/mono/mini/mini-x86.c
trunk/mono/mono/mini/mini.c
Log:
2007-07-05 Zoltan Varga <[EMAIL PROTECTED]>
* mini.c (mono_codegen): Add an assert.
* mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler
method enter/
leave code.
* mini-amd64.c (mono_arch_emit_prolog): Likewise.
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2007-07-05 21:19:00 UTC (rev 81438)
+++ trunk/mono/mono/mini/ChangeLog 2007-07-05 21:36:46 UTC (rev 81439)
@@ -1,11 +1,18 @@
+2007-07-05 Zoltan Varga <[EMAIL PROTECTED]>
+ * mini.c (mono_codegen): Add an assert.
+
+ * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler
method enter/
+ leave code.
+ * mini-amd64.c (mono_arch_emit_prolog): Likewise.
+
Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <[EMAIL PROTECTED]>
* mini-ppc.c: fixed memory corruption for localloc(0)
(bug #81852).
2007-07-05 Zoltan Varga <[EMAIL PROTECTED]>
-
+
* mini.c: Fix warnings.
Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <[EMAIL PROTECTED]>
Modified: trunk/mono/mono/mini/mini-amd64.c
===================================================================
--- trunk/mono/mono/mini/mini-amd64.c 2007-07-05 21:19:00 UTC (rev 81438)
+++ trunk/mono/mono/mini/mini-amd64.c 2007-07-05 21:36:46 UTC (rev 81439)
@@ -4290,6 +4290,10 @@
gint32 lmf_offset = cfg->arch.lmf_offset;
cfg->code_size = MAX (((MonoMethodNormal *)method)->header->code_size
* 4, 512);
+
+ if (cfg->prof_options & MONO_PROFILE_ENTER_LEAVE)
+ cfg->code_size += 512;
+
code = cfg->native_code = g_malloc (cfg->code_size);
/* Amount of stack space allocated by register saving code */
Modified: trunk/mono/mono/mini/mini-x86.c
===================================================================
--- trunk/mono/mono/mini/mini-x86.c 2007-07-05 21:19:00 UTC (rev 81438)
+++ trunk/mono/mono/mini/mini-x86.c 2007-07-05 21:36:46 UTC (rev 81439)
@@ -3535,6 +3535,10 @@
guint8 *code;
cfg->code_size = MAX (mono_method_get_header (method)->code_size * 4,
256);
+
+ if (cfg->prof_options & MONO_PROFILE_ENTER_LEAVE)
+ cfg->code_size += 512;
+
code = cfg->native_code = g_malloc (cfg->code_size);
x86_push_reg (code, X86_EBP);
@@ -3743,9 +3747,6 @@
if (cfg->method->save_lmf)
max_epilog_size += 128;
-
- if (mono_jit_trace_calls != NULL)
- max_epilog_size += 50;
while (cfg->code_len + max_epilog_size > (cfg->code_size - 16)) {
cfg->code_size *= 2;
Modified: trunk/mono/mono/mini/mini.c
===================================================================
--- trunk/mono/mono/mini/mini.c 2007-07-05 21:19:00 UTC (rev 81438)
+++ trunk/mono/mono/mini/mini.c 2007-07-05 21:36:46 UTC (rev 81439)
@@ -10014,6 +10014,7 @@
code = cfg->native_code + cfg->code_len;
code = mono_arch_instrument_epilog (cfg,
mono_profiler_method_leave, code, FALSE);
cfg->code_len = code - cfg->native_code;
+ g_assert (cfg->code_len < cfg->code_size);
}
mono_arch_emit_epilog (cfg);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches