Mercurial > hg > graal-compiler
changeset 22690:fd2a8e6da876
HotSpotInstructionProfiling: Add comment about increment patching
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Tue, 25 Aug 2015 17:42:38 +0200 |
parents | 87c6d0fe96e9 |
children | 54d85a1b4188 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotInstructionProfiling.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotInstructionProfiling.java Wed Sep 23 13:09:38 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotInstructionProfiling.java Tue Aug 25 17:42:38 2015 +0200 @@ -92,6 +92,8 @@ for (int i = 0; i < instructionsToProfile.length; i++) { names[i] = compilationUnitName; groups[i] = COUNTER_GROUP + " " + instructionsToProfile[i]; + // Default is zero; this value is patched to the real instruction count after + // assembly in method HotSpotInstructionProfiling.countInstructions increments[i] = new ConstantValue(target.getLIRKind(JavaKind.Int), JavaConstant.INT_0); } HotSpotCounterOp op = (HotSpotCounterOp) counterFactory.createMultiBenchmarkCounter(names, groups, increments); @@ -105,7 +107,7 @@ /** * After assembly the {@link HotSpotBackend#profileInstructions(LIR, CompilationResultBuilder)} - * calls this method for patching the instruction counts into the coutner increment code. + * calls this method for patching the instruction counts into the counter increment code. */ public static void countInstructions(LIR lir, Assembler asm) { InstructionCounterOp lastOp = null;