changeset 14713:c8fb80093621

metric for number of implicit null checks in GuardLoweringPhase
author Lukas Stadler <lukas.stadler@oracle.com>
date Fri, 21 Mar 2014 11:51:14 +0100
parents 91ed2ba34b06
children b602356a9cfc
files graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java	Thu Mar 20 14:14:48 2014 +0100
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java	Fri Mar 21 11:51:14 2014 +0100
@@ -55,6 +55,9 @@
  * does the actual control-flow expansion of the remaining {@link GuardNode GuardNodes}.
  */
 public class GuardLoweringPhase extends BasePhase<MidTierContext> {
+
+    private static final DebugMetric metricImplicitNullCheck = Debug.metric("ImplicitNullCheck");
+
     private static class UseImplicitNullChecks extends ScheduledNodeIterator {
 
         private final IdentityHashMap<ValueNode, GuardNode> nullGuarded = new IdentityHashMap<>();
@@ -88,6 +91,7 @@
         private void processAccess(Access access) {
             GuardNode guard = nullGuarded.get(access.object());
             if (guard != null && isImplicitNullCheck(access.nullCheckLocation())) {
+                metricImplicitNullCheck.increment();
                 access.setGuard(guard.getGuard());
                 FixedAccessNode fixedAccess;
                 if (access instanceof FloatingAccessNode) {