Skip to content

Commit

Permalink
JIT: remove size contribution to perf score (#97069)
Browse files Browse the repository at this point in the history
Keep the perf score a pure performance metric. Size is emitted as a separate
metric, so clients interested in a metric that is some combination of size
and speed can do their own computations based on these two values.

Resolves #96878.
  • Loading branch information
AndyAyersMS committed Jan 19, 2024
1 parent b8294da commit 24f9706
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
8 changes: 0 additions & 8 deletions src/coreclr/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2002,14 +2002,6 @@ void CodeGen::genEmitMachineCode()
compiler->compCodeGenDone = true;
#endif

#if defined(DEBUG) || defined(LATE_DISASM)
// Add code size information into the Perf Score
// All compPerfScore calculations must be performed using doubles
compiler->info.compPerfScore += ((double)compiler->info.compTotalHotCodeSize * (double)PERFSCORE_CODESIZE_COST_HOT);
compiler->info.compPerfScore +=
((double)compiler->info.compTotalColdCodeSize * (double)PERFSCORE_CODESIZE_COST_COLD);
#endif // DEBUG || LATE_DISASM

if (compiler->opts.disAsm && compiler->opts.disTesting)
{
printf("; END METHOD %s\n", compiler->eeGetMethodFullName(compiler->info.compMethodHnd));
Expand Down
5 changes: 0 additions & 5 deletions src/coreclr/jit/emit.h
Original file line number Diff line number Diff line change
Expand Up @@ -1891,11 +1891,6 @@ class emitter
#define PERFSCORE_MEMORY_WRITE 2
#define PERFSCORE_MEMORY_READ_WRITE 3

#define PERFSCORE_CODESIZE_COST_HOT 0.10f
#define PERFSCORE_CODESIZE_COST_COLD 0.01f

#define PERFSCORE_CALLEE_SPILL_COST 0.75f

struct insExecutionCharacteristics
{
float insThroughput;
Expand Down

0 comments on commit 24f9706

Please sign in to comment.