8168662: Intrinsic support for event based tracing needs explicit control dependency
authormgronlun
Thu, 27 Oct 2016 11:14:30 +0200
changeset 42069 4bf36a6af07b
parent 42065 6032b31e3719
child 42070 494ac4982e60
8168662: Intrinsic support for event based tracing needs explicit control dependency Reviewed-by: kvn, rehn
hotspot/src/share/vm/opto/library_call.cpp
--- a/hotspot/src/share/vm/opto/library_call.cpp	Thu Oct 13 14:49:34 2016 +0200
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Thu Oct 27 11:14:30 2016 +0200
@@ -3213,24 +3213,23 @@
   Node* test_jobj_eq_null  = _gvn.transform( new BoolNode(jobj_cmp_null, BoolTest::eq) );
 
   IfNode* iff_jobj_null =
-    create_and_map_if(control(), test_jobj_eq_null, PROB_NEVER, COUNT_UNKNOWN);
-
-   enum { _normal_path = 1,
-          _null_path = 2,
-          PATH_LIMIT };
+    create_and_map_if(control(), test_jobj_eq_null, PROB_MIN, COUNT_UNKNOWN);
+
+  enum { _normal_path = 1,
+         _null_path = 2,
+         PATH_LIMIT };
 
   RegionNode* result_rgn = new RegionNode(PATH_LIMIT);
   PhiNode*    result_val = new PhiNode(result_rgn, TypePtr::BOTTOM);
-  record_for_igvn(result_rgn);
-
-  Node* jobj_is_null = _gvn.transform( new IfTrueNode(iff_jobj_null) );
+
+  Node* jobj_is_null = _gvn.transform(new IfTrueNode(iff_jobj_null));
   result_rgn->init_req(_null_path, jobj_is_null);
   result_val->init_req(_null_path, null());
 
-  Node* jobj_is_not_null = _gvn.transform( new IfFalseNode(iff_jobj_null) );
+  Node* jobj_is_not_null = _gvn.transform(new IfFalseNode(iff_jobj_null));
   result_rgn->init_req(_normal_path, jobj_is_not_null);
 
-  Node* res = make_load(NULL, jobj, TypeInstPtr::BOTTOM, T_OBJECT, MemNode::unordered);
+  Node* res = make_load(jobj_is_not_null, jobj, TypeInstPtr::NOTNULL, T_OBJECT, MemNode::unordered);
   result_val->init_req(_normal_path, res);
 
   set_result(result_rgn, result_val);