8033145: Runtime1::arraycopy_count_address uses wrong _oop_arraycopy_cnt variable
authorthartmann
Tue, 10 Jun 2014 08:53:22 +0200
changeset 24944 5b01505efb7a
parent 24939 6c994cc056ef
child 24945 6df48e563632
8033145: Runtime1::arraycopy_count_address uses wrong _oop_arraycopy_cnt variable Summary: The method Runtime1::arraycopy_count_address(..) returns the address of Runtime::_oop_arraycopy_cnt instead of the the file static variable _oop_arraycopy_cnt. Reviewed-by: roland, kvn, twisti
hotspot/src/share/vm/c1/c1_Runtime1.cpp
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Mon Jun 09 15:42:31 2014 -0700
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Tue Jun 10 08:53:22 2014 +0200
@@ -123,24 +123,24 @@
 int Runtime1::_throw_array_store_exception_count = 0;
 int Runtime1::_throw_count = 0;
 
-static int _byte_arraycopy_cnt = 0;
-static int _short_arraycopy_cnt = 0;
-static int _int_arraycopy_cnt = 0;
-static int _long_arraycopy_cnt = 0;
-static int _oop_arraycopy_cnt = 0;
+static int _byte_arraycopy_stub_cnt = 0;
+static int _short_arraycopy_stub_cnt = 0;
+static int _int_arraycopy_stub_cnt = 0;
+static int _long_arraycopy_stub_cnt = 0;
+static int _oop_arraycopy_stub_cnt = 0;
 
 address Runtime1::arraycopy_count_address(BasicType type) {
   switch (type) {
   case T_BOOLEAN:
-  case T_BYTE:   return (address)&_byte_arraycopy_cnt;
+  case T_BYTE:   return (address)&_byte_arraycopy_stub_cnt;
   case T_CHAR:
-  case T_SHORT:  return (address)&_short_arraycopy_cnt;
+  case T_SHORT:  return (address)&_short_arraycopy_stub_cnt;
   case T_FLOAT:
-  case T_INT:    return (address)&_int_arraycopy_cnt;
+  case T_INT:    return (address)&_int_arraycopy_stub_cnt;
   case T_DOUBLE:
-  case T_LONG:   return (address)&_long_arraycopy_cnt;
+  case T_LONG:   return (address)&_long_arraycopy_stub_cnt;
   case T_ARRAY:
-  case T_OBJECT: return (address)&_oop_arraycopy_cnt;
+  case T_OBJECT: return (address)&_oop_arraycopy_stub_cnt;
   default:
     ShouldNotReachHere();
     return NULL;
@@ -1479,13 +1479,13 @@
   tty->print_cr(" _ic_miss_cnt:                    %d", SharedRuntime::_ic_miss_ctr);
   tty->print_cr(" _generic_arraycopy_cnt:          %d", _generic_arraycopy_cnt);
   tty->print_cr(" _generic_arraycopystub_cnt:      %d", _generic_arraycopystub_cnt);
-  tty->print_cr(" _byte_arraycopy_cnt:             %d", _byte_arraycopy_cnt);
-  tty->print_cr(" _short_arraycopy_cnt:            %d", _short_arraycopy_cnt);
-  tty->print_cr(" _int_arraycopy_cnt:              %d", _int_arraycopy_cnt);
-  tty->print_cr(" _long_arraycopy_cnt:             %d", _long_arraycopy_cnt);
+  tty->print_cr(" _byte_arraycopy_cnt:             %d", _byte_arraycopy_stub_cnt);
+  tty->print_cr(" _short_arraycopy_cnt:            %d", _short_arraycopy_stub_cnt);
+  tty->print_cr(" _int_arraycopy_cnt:              %d", _int_arraycopy_stub_cnt);
+  tty->print_cr(" _long_arraycopy_cnt:             %d", _long_arraycopy_stub_cnt);
   tty->print_cr(" _primitive_arraycopy_cnt:        %d", _primitive_arraycopy_cnt);
   tty->print_cr(" _oop_arraycopy_cnt (C):          %d", Runtime1::_oop_arraycopy_cnt);
-  tty->print_cr(" _oop_arraycopy_cnt (stub):       %d", _oop_arraycopy_cnt);
+  tty->print_cr(" _oop_arraycopy_cnt (stub):       %d", _oop_arraycopy_stub_cnt);
   tty->print_cr(" _arraycopy_slowcase_cnt:         %d", _arraycopy_slowcase_cnt);
   tty->print_cr(" _arraycopy_checkcast_cnt:        %d", _arraycopy_checkcast_cnt);
   tty->print_cr(" _arraycopy_checkcast_attempt_cnt:%d", _arraycopy_checkcast_attempt_cnt);