Mercurial > hg > truffle
diff graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java @ 7558:223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 25 Jan 2013 16:05:11 +0100 |
parents | a77f22f2759d |
children | 0b646334c5f7 7d66682cc901 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Fri Jan 25 15:31:54 2013 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Fri Jan 25 16:05:11 2013 +0100 @@ -48,6 +48,13 @@ private static final DebugMetric metricInliningTailDuplication = Debug.metric("InliningTailDuplication"); private static final String inliningDecisionsScopeString = "InliningDecisions"; + /** + * Meters the size (in bytecodes) of all methods processed during compilation (i.e., top level and all + * inlined methods), irrespective of how many bytecodes in each method are actually parsed + * (which may be none for methods whose IR is retrieved from a cache). + */ + public static final DebugMetric InlinedBytecodes = Debug.metric("InlinedBytecodes"); + public interface InliningCallback { StructuredGraph buildGraph(final ResolvedJavaMethod method); @@ -243,6 +250,7 @@ if (calleeGraph == null) { calleeGraph = getGraph(concrete, callback); } + InlinedBytecodes.add(concrete.getCodeSize()); assumptions.recordMethodContents(concrete); InliningUtil.inline(invoke, calleeGraph, receiverNullCheck); }