Skip to content

Commit ecba691

Browse files
authored
JIT: add hash and tiering name to assert message (#66107)
Now that methods may be jitted multiple times and may have complex names, it is useful to know their hashes and tiering names as part of asserts.
1 parent 1e529bc commit ecba691

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/coreclr/jit/error.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,10 @@ extern "C" void __cdecl assertAbort(const char* why, const char* file, unsigned
280280
if (env->compiler)
281281
{
282282
phaseName = PhaseNames[env->compiler->mostRecentlyActivePhase];
283-
_snprintf_s(buff, BUFF_SIZE, _TRUNCATE, "Assertion failed '%s' in '%s' during '%s' (IL size %d)\n", why,
284-
env->compiler->info.compFullName, phaseName, env->compiler->info.compILCodeSize);
283+
_snprintf_s(buff, BUFF_SIZE, _TRUNCATE,
284+
"Assertion failed '%s' in '%s' during '%s' (IL size %d; hash 0x%08x; %s)\n", why,
285+
env->compiler->info.compFullName, phaseName, env->compiler->info.compILCodeSize,
286+
env->compiler->info.compMethodHash(), env->compiler->compGetTieringName(/* short name */ true));
285287
msg = buff;
286288
}
287289
printf(""); // null string means flush

0 commit comments

Comments
 (0)