Skip to content

Commit

Permalink
emit offset for cold codeblock
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak committed Oct 16, 2020
1 parent 30f1e7f commit e760beb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/coreclr/src/jit/emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5048,7 +5048,8 @@ unsigned emitter::emitEndCodeGen(Compiler* comp,
#define DEFAULT_CODE_BUFFER_INIT 0xcc

#ifdef DEBUG
*instrCount = 0;
*instrCount = 0;
bool isColdBlock = false;
#endif
for (insGroup* ig = emitIGlist; ig != nullptr; ig = ig->igNext)
{
Expand All @@ -5060,7 +5061,8 @@ unsigned emitter::emitEndCodeGen(Compiler* comp,
assert(emitCurCodeOffs(cp) == emitTotalHotCodeSize);

assert(coldCodeBlock);
cp = coldCodeBlock;
cp = coldCodeBlock;
isColdBlock = true;
#ifdef DEBUG
if (emitComp->opts.disAsm || emitComp->verbose)
{
Expand Down Expand Up @@ -5097,7 +5099,7 @@ unsigned emitter::emitEndCodeGen(Compiler* comp,
printf("\nG_M%03u_IG%02u:", emitComp->compMethodID, ig->igNum);
if (!emitComp->opts.disDiffable)
{
printf(" ;; offset=%04XH", (cp - codeBlock));
printf(" ;; offset=%04XH", (cp - (isColdBlock ? coldCodeBlock : codeBlock)));
}
printf("\n");
}
Expand Down

0 comments on commit e760beb

Please sign in to comment.