< prev index next >

src/share/vm/opto/parse2.cpp

Print this page
rev 10293 : 8150720: Cleanup code around PrintOptoStatistics
Reviewed-by: TBD

@@ -42,12 +42,14 @@
 #include "opto/parse.hpp"
 #include "opto/runtime.hpp"
 #include "runtime/deoptimization.hpp"
 #include "runtime/sharedRuntime.hpp"
 
+#ifndef PRODUCT
 extern int explicit_null_checks_inserted,
            explicit_null_checks_elided;
+#endif
 
 //---------------------------------array_load----------------------------------
 void Parse::array_load(BasicType elem_type) {
   const Type* elem = Type::TOP;
   Node* adr = array_addressing(elem_type, 0, &elem);

@@ -995,11 +997,11 @@
       next_block->next_path_num();
     }
     return;
   }
 
-  explicit_null_checks_inserted++;
+  NOT_PRODUCT(explicit_null_checks_inserted++);
 
   // Generate real control flow
   Node   *tst = _gvn.transform( new BoolNode( c, btest ) );
 
   // Sanity check the probability value

@@ -1011,11 +1013,11 @@
   { PreserveJVMState pjvms(this);
     Node* iftrue  = _gvn.transform( new IfTrueNode (iff) );
     set_control(iftrue);
 
     if (stopped()) {            // Path is dead?
-      explicit_null_checks_elided++;
+      NOT_PRODUCT(explicit_null_checks_elided++);
       if (C->eliminate_boxing()) {
         // Mark the successor block as parsed
         branch_block->next_path_num();
       }
     } else {                    // Path is live.

@@ -1031,11 +1033,11 @@
   // False branch
   Node* iffalse = _gvn.transform( new IfFalseNode(iff) );
   set_control(iffalse);
 
   if (stopped()) {              // Path is dead?
-    explicit_null_checks_elided++;
+    NOT_PRODUCT(explicit_null_checks_elided++);
     if (C->eliminate_boxing()) {
       // Mark the successor block as parsed
       next_block->next_path_num();
     }
   } else  {                     // Path is live.
< prev index next >