Skip to content

Commit

Permalink
JIT: don't ask for all write barrer helpers for AOT (#97677)
Browse files Browse the repository at this point in the history
Fixes an issue introduced by #97535. AOT hosts don't support all the
possible write barriers and blow things up if the JIT asks for ones
they don't support.

Also add back the initial semicolon to the metrics line
  • Loading branch information
AndyAyersMS committed Jan 30, 2024
1 parent 7caed53 commit 79cd2ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/coreclr/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,9 @@ void CodeGen::genGenerateCode(void** codePtr, uint32_t* nativeSizeOfCode)
DoPhase(this, PHASE_EMIT_GCEH, &CodeGen::genEmitUnwindDebugGCandEH);

#ifdef DEBUG
if (genWriteBarrierUsed && JitConfig.EnableExtraSuperPmiQueries())
// For R2R/NAOT not all these helpers are implemented. So don't ask for them.
//
if (genWriteBarrierUsed && JitConfig.EnableExtraSuperPmiQueries() && !compiler->opts.IsReadyToRun())
{
void* ignored;
for (int i = CORINFO_HELP_ASSIGN_REF; i <= CORINFO_HELP_ASSIGN_STRUCT; i++)
Expand Down Expand Up @@ -2036,7 +2038,7 @@ void CodeGen::genEmitMachineCode()
printf("\n");
}

printf("Total bytes of code %d, prolog size %d, PerfScore %.2f, instruction count %d, allocated bytes for "
printf("; Total bytes of code %d, prolog size %d, PerfScore %.2f, instruction count %d, allocated bytes for "
"code %d",
codeSize, prologSize, compiler->info.compPerfScore, instrCount,
GetEmitter()->emitTotalHotCodeSize + GetEmitter()->emitTotalColdCodeSize);
Expand Down

0 comments on commit 79cd2ae

Please sign in to comment.