Merge pull request #5428 from kumpera/wasm-support-p2
[mono.git] / mono / mini / mini.c
index 608b4a32a0007b85e635e9cd11db6355d8778abf..4cfe898b0a085c284912893fd16961e504021ee3 100644 (file)
@@ -1380,9 +1380,8 @@ mono_allocate_stack_slots2 (MonoCompile *cfg, gboolean backward, guint32 *stack_
                                printf ("LAST: %s\n", mono_method_full_name (cfg->method, TRUE));
                        if (count > atoi (g_getenv ("COUNT3")))
                                slot = 0xffffff;
-                       else {
+                       else
                                mono_print_ins (inst);
-                               }
                }
 #endif
 
@@ -1614,20 +1613,19 @@ mono_allocate_stack_slots (MonoCompile *cfg, gboolean backward, guint32 *stack_s
                        }
                }
 
+#if 0
                {
                        static int count = 0;
                        count ++;
 
-                       /*
                        if (count == atoi (g_getenv ("COUNT")))
                                printf ("LAST: %s\n", mono_method_full_name (cfg->method, TRUE));
                        if (count > atoi (g_getenv ("COUNT")))
                                slot = 0xffffff;
-                       else {
+                       else
                                mono_print_ins (inst);
-                               }
-                       */
                }
+#endif
 
                if (inst->flags & MONO_INST_LMF) {
                        /*
@@ -3877,8 +3875,8 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
 
        /* collect statistics */
 #ifndef DISABLE_PERFCOUNTERS
-       mono_perfcounters->jit_methods++;
-       mono_perfcounters->jit_bytes += header->code_size;
+       InterlockedIncrement (&mono_perfcounters->jit_methods);
+       InterlockedAdd (&mono_perfcounters->jit_bytes, header->code_size);
 #endif
        mono_jit_stats.allocated_code_size += cfg->code_len;
        code_size_ratio = cfg->code_len;