8227676: Shenandoah: More consistent naming of LRB entry points
authorrkennke
Mon, 15 Jul 2019 15:27:06 +0200
changeset 55679 aa96c53c592b
parent 55678 296560a21cea
child 55680 cd48f8f260c8
child 57474 0af70fb03853
8227676: Shenandoah: More consistent naming of LRB entry points Reviewed-by: shade
src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp
src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp
src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp
src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp
src/hotspot/share/gc/shenandoah/shenandoahRuntime.cpp
src/hotspot/share/gc/shenandoah/shenandoahRuntime.hpp
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp	Mon Jul 15 12:31:35 2019 +0200
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp	Mon Jul 15 15:27:06 2019 +0200
@@ -572,7 +572,7 @@
 
   __ push_call_clobbered_registers();
 
-  __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_JRT));
+  __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier));
   __ blrt(lr, 1, 0, MacroAssembler::ret_type_integral);
   __ mov(rscratch1, r0);
   __ pop_call_clobbered_registers();
--- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp	Mon Jul 15 12:31:35 2019 +0200
+++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp	Mon Jul 15 15:27:06 2019 +0200
@@ -943,7 +943,7 @@
 
   save_vector_registers(cgen->assembler());
   __ movptr(rdi, rax);
-  __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_JRT), rdi);
+  __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier), rdi);
   restore_vector_registers(cgen->assembler());
 
 #ifdef _LP64
--- a/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp	Mon Jul 15 12:31:35 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp	Mon Jul 15 15:27:06 2019 +0200
@@ -194,7 +194,8 @@
     args->append(result);
     BasicTypeList signature;
     signature.append(T_OBJECT);
-    LIR_Opr call_result = gen->call_runtime(&signature, args, CAST_FROM_FN_PTR(address, ShenandoahRuntime::oop_load_from_native_barrier),
+    LIR_Opr call_result = gen->call_runtime(&signature, args,
+                                            CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_native),
                                             objectType, NULL);
     __ move(call_result, result);
     return;
@@ -245,8 +246,8 @@
 }
 
 const char* ShenandoahBarrierSetC1::rtcall_name_for_address(address entry) {
-  if (entry == CAST_FROM_FN_PTR(address, ShenandoahRuntime::oop_load_from_native_barrier)) {
-    return "ShenandoahRuntime::oop_load_from_native_barrier";
+  if (entry == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_native)) {
+    return "ShenandoahRuntime::load_reference_barrier_native";
   }
   return NULL;
 }
--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp	Mon Jul 15 12:31:35 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp	Mon Jul 15 15:27:06 2019 +0200
@@ -297,7 +297,7 @@
 
 bool ShenandoahBarrierSetC2::is_shenandoah_lrb_call(Node* call) {
   return call->is_CallLeaf() &&
-         call->as_CallLeaf()->entry_point() == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_JRT);
+          call->as_CallLeaf()->entry_point() == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier);
 }
 
 bool ShenandoahBarrierSetC2::is_shenandoah_marking_if(PhaseTransform *phase, Node* n) {
@@ -561,8 +561,8 @@
     GraphKit* kit = static_cast<C2ParseAccess &>(access).kit();
     Node* call = kit->make_runtime_call(GraphKit::RC_LEAF,
                                         oop_load_from_native_barrier_Type(),
-                                        CAST_FROM_FN_PTR(address, ShenandoahRuntime::oop_load_from_native_barrier),
-                                        "ShenandoahRuntime::oop_load_from_native_barrier",
+                                        CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_native),
+                                        "ShenandoahRuntime::load_reference_barrier_native",
                                         NULL, load);
     Node* proj = kit->gvn().transform(new ProjNode(call, TypeFunc::Parms+0));
     return kit->gvn().transform(new CheckCastPPNode(kit->control(), proj, load->bottom_type()));
@@ -750,7 +750,7 @@
   return strcmp(call->_name, "shenandoah_clone_barrier") == 0 ||
          strcmp(call->_name, "shenandoah_cas_obj") == 0 ||
          strcmp(call->_name, "shenandoah_wb_pre") == 0 ||
-         strcmp(call->_name, "ShenandoahRuntime::oop_load_from_native_barrier") == 0;
+         strcmp(call->_name, "ShenandoahRuntime::load_reference_barrier_native") == 0;
 }
 
 Node* ShenandoahBarrierSetC2::step_over_gc_barrier(Node* c) const {
@@ -1183,7 +1183,7 @@
       conn_graph->add_local_var_and_edge(n, PointsToNode::NoEscape, n->in(ShenandoahLoadReferenceBarrierNode::ValueIn), delayed_worklist);
       return true;
     case Op_CallLeaf:
-      if (strcmp(n->as_CallLeaf()->_name, "ShenandoahRuntime::oop_load_from_native_barrier") == 0) {
+      if (strcmp(n->as_CallLeaf()->_name, "ShenandoahRuntime::load_reference_barrier_native") == 0) {
         conn_graph->map_ideal_node(n, conn_graph->phantom_obj);
         return true;
       }
--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp	Mon Jul 15 12:31:35 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp	Mon Jul 15 15:27:06 2019 +0200
@@ -211,7 +211,7 @@
       } else if (in->Opcode() == Op_ShenandoahLoadReferenceBarrier ||
                  (in->Opcode() == Op_Proj &&
                   in->in(0)->Opcode() == Op_CallLeaf &&
-                  strcmp(in->in(0)->as_Call()->_name, "ShenandoahRuntime::oop_load_from_native_barrier") == 0)) {
+                  strcmp(in->in(0)->as_Call()->_name, "ShenandoahRuntime::load_reference_barrier_native") == 0)) {
         if (t == ShenandoahOopStore) {
           uint i = 0;
           for (; i < phis.size(); i++) {
@@ -530,7 +530,7 @@
         if (!verify_helper(n->in(TypeFunc::Parms), phis, visited, ShenandoahStore, trace, barriers_used)) {
           report_verify_failure("Shenandoah verification: _fill should have barriers", n);
         }
-      } else if (!strcmp(call->_name, "shenandoah_wb_pre") || !strcmp(call->_name, "ShenandoahRuntime::oop_load_from_native_barrier")) {
+      } else if (!strcmp(call->_name, "shenandoah_wb_pre") || !strcmp(call->_name, "ShenandoahRuntime::load_reference_barrier_native")) {
         // skip
       } else {
         const int calls_len = sizeof(calls) / sizeof(calls[0]);
@@ -1096,7 +1096,9 @@
   mm->set_memory_at(Compile::AliasIdxRaw, raw_mem);
   phase->register_new_node(mm, ctrl);
 
-  Node* call = new CallLeafNode(ShenandoahBarrierSetC2::shenandoah_load_reference_barrier_Type(), CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_JRT), "shenandoah_load_reference_barrier", TypeRawPtr::BOTTOM);
+  Node* call = new CallLeafNode(ShenandoahBarrierSetC2::shenandoah_load_reference_barrier_Type(),
+                                CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier),
+                                "shenandoah_load_reference_barrier", TypeRawPtr::BOTTOM);
   call->init_req(TypeFunc::Control, ctrl);
   call->init_req(TypeFunc::I_O, phase->C->top());
   call->init_req(TypeFunc::Memory, mm);
--- a/src/hotspot/share/gc/shenandoah/shenandoahRuntime.cpp	Mon Jul 15 12:31:35 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahRuntime.cpp	Mon Jul 15 15:27:06 2019 +0200
@@ -55,7 +55,7 @@
   ShenandoahThreadLocalData::satb_mark_queue(thread).enqueue_known_active(orig);
 JRT_END
 
-JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_JRT(oopDesc* src))
+JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier(oopDesc * src))
   oop result = ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src);
   return (oopDesc*) result;
 JRT_END
@@ -66,6 +66,6 @@
   ShenandoahBarrierSet::barrier_set()->write_region(MemRegion((HeapWord*) obj, obj->size()));
 JRT_END
 
-JRT_LEAF(oopDesc*, ShenandoahRuntime::oop_load_from_native_barrier(oopDesc* src))
+JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_native(oopDesc * src))
   return (oopDesc*) ShenandoahBarrierSet::barrier_set()->oop_load_from_native_barrier(oop(src));
 JRT_END
--- a/src/hotspot/share/gc/shenandoah/shenandoahRuntime.hpp	Mon Jul 15 12:31:35 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahRuntime.hpp	Mon Jul 15 15:27:06 2019 +0200
@@ -37,9 +37,8 @@
   static void write_ref_array_post_entry(HeapWord* dst, size_t length);
   static void write_ref_field_pre_entry(oopDesc* orig, JavaThread* thread);
 
-  static oopDesc* load_reference_barrier_JRT(oopDesc* src);
-
-  static oopDesc* oop_load_from_native_barrier(oopDesc* src);
+  static oopDesc* load_reference_barrier(oopDesc *src);
+  static oopDesc* load_reference_barrier_native(oopDesc *src);
 
   static void shenandoah_clone_barrier(oopDesc* obj);
 };