[mono] Make mono_inst_name less misleading#91042
Conversation
|
LGTM - we'll have to wait for another review too. |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@sayeedkhannabil I ran the |
|
@ivanpovazan I am looking into the build failures. Is it possible to have a 15 minute chat about the runtime-extra-platforms errors? I am new to automated testing. If you can give me some guideline about this, it would be really great for me. |
Sure, you can reach me out on Discord. My Discord ID is: |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
After our offline discussion I reran the failing pipeline since it expired and logs were removed from AzDO. To reach the link I posted above by yourself, you can follow these steps:
The error indicates there is an issue around Let me know if you need any help or/and if you have any additional questions with resolving the CI/CD errors. |
So one problem with changing I took a look, and So what about doing something like this: make a new printf specifier macro that is // in mini.h
#ifndef DISABLE_LOGGING
#define M_PRI_INST "%s"
const char * mono_inst_name(int opcode);
#else
#define M_PRI_INST "%d"
static inline int
mono_inst_name(int opcode)
{
return opcode;
}
#endifand then for call sites, change them like this: - g_assertf (op >= 0 && op < OP_LAST, "unknown opcode %s in function %s", mono_inst_name (op), __FUNCTION__);
+ g_assertf (op >= 0 && op < OP_LAST, "unknown opcode " M_PRI_INST " in function %s", mono_inst_name (op), __FUNCTION__);That way we still get useful assertions or warnings, but if we disabled logging we'll just get a number instead of the opcode mnemonic. |
Fixes dotnet#83545 Co-authored-by: Aleksey Kliger (λgeek) <[email protected]> Co-authored-by: Steve Pfister <[email protected]> Co-authored-by: Alexander Köplinger <[email protected]>




Fixes #83545