From: Vlad Brezae Date: Thu, 31 Oct 2019 13:32:50 +0000 (+0200) Subject: [interp] Fix interp logging (mono/mono#17636) X-Git-Tag: submit/tizen/20210909.063632~10331^2~5^2~260 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=323eab7c6259f8b034f55f5d9c93a5b07b2688cb;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [interp] Fix interp logging (mono/mono#17636) * [interp] Don't print NOPs during cprop They can become numerous and distracting. * [interp] Fix mono_interp_print_code Regressed after code_size was changed to byte count instead of short count. Commit migrated from https://github.com/mono/mono/commit/1d043a31e7d207739f81b303b7ee2c79ed135859 --- diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c index 81d9dd3..5bd9f54 100644 --- a/src/mono/mono/mini/interp/transform.c +++ b/src/mono/mono/mini/interp/transform.c @@ -1039,7 +1039,7 @@ void mono_interp_print_code (InterpMethod *imethod) { MonoJitInfo *jinfo = imethod->jinfo; - const guint16 *start; + const guint8 *start; if (!jinfo) return; @@ -1048,8 +1048,8 @@ mono_interp_print_code (InterpMethod *imethod) g_print ("Method : %s\n", name); g_free (name); - start = (guint16*) jinfo->code_start; - dump_mint_code (start, start + jinfo->code_size); + start = (guint8*) jinfo->code_start; + dump_mint_code ((const guint16*)start, (const guint16*)(start + jinfo->code_size)); } @@ -6896,7 +6896,7 @@ retry: } // The instruction pops some values then pushes some other get_inst_stack_usage (td, ins, &pop, &push); - if (td->verbose_level) { + if (td->verbose_level && ins->opcode != MINT_NOP) { dump_interp_inst (ins); g_print (", sp %d, (pop %d, push %d)\n", sp - stack, pop, push); }