hotspot/src/share/vm/oops/typeArrayKlass.cpp
changeset 30150 d9c940aa42ef
parent 27680 8ecc0871c18e
child 30764 fec48bf5a827
equal deleted inserted replaced
30149:c0f930abe5ed 30150:d9c940aa42ef
    34 #include "memory/universe.inline.hpp"
    34 #include "memory/universe.inline.hpp"
    35 #include "oops/instanceKlass.hpp"
    35 #include "oops/instanceKlass.hpp"
    36 #include "oops/klass.inline.hpp"
    36 #include "oops/klass.inline.hpp"
    37 #include "oops/objArrayKlass.hpp"
    37 #include "oops/objArrayKlass.hpp"
    38 #include "oops/oop.inline.hpp"
    38 #include "oops/oop.inline.hpp"
    39 #include "oops/typeArrayKlass.hpp"
    39 #include "oops/typeArrayKlass.inline.hpp"
    40 #include "oops/typeArrayOop.hpp"
    40 #include "oops/typeArrayOop.hpp"
    41 #include "runtime/handles.inline.hpp"
    41 #include "runtime/handles.inline.hpp"
    42 #include "runtime/orderAccess.inline.hpp"
    42 #include "runtime/orderAccess.inline.hpp"
    43 #include "utilities/macros.hpp"
    43 #include "utilities/macros.hpp"
    44 
    44 
   202   assert(obj->is_typeArray(),"must be a type array");
   202   assert(obj->is_typeArray(),"must be a type array");
   203   typeArrayOop t = typeArrayOop(obj);
   203   typeArrayOop t = typeArrayOop(obj);
   204   return t->object_size();
   204   return t->object_size();
   205 }
   205 }
   206 
   206 
   207 void TypeArrayKlass::oop_follow_contents(oop obj) {
       
   208   assert(obj->is_typeArray(),"must be a type array");
       
   209   // Performance tweak: We skip iterating over the klass pointer since we
       
   210   // know that Universe::TypeArrayKlass never moves.
       
   211 }
       
   212 
       
   213 #if INCLUDE_ALL_GCS
       
   214 void TypeArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj) {
       
   215   assert(obj->is_typeArray(),"must be a type array");
       
   216   // Performance tweak: We skip iterating over the klass pointer since we
       
   217   // know that Universe::TypeArrayKlass never moves.
       
   218 }
       
   219 #endif // INCLUDE_ALL_GCS
       
   220 
       
   221 int TypeArrayKlass::oop_adjust_pointers(oop obj) {
       
   222   assert(obj->is_typeArray(),"must be a type array");
       
   223   typeArrayOop t = typeArrayOop(obj);
       
   224   // Performance tweak: We skip iterating over the klass pointer since we
       
   225   // know that Universe::TypeArrayKlass never moves.
       
   226   return t->object_size();
       
   227 }
       
   228 
       
   229 int TypeArrayKlass::oop_oop_iterate(oop obj, ExtendedOopClosure* blk) {
       
   230   assert(obj->is_typeArray(),"must be a type array");
       
   231   typeArrayOop t = typeArrayOop(obj);
       
   232   // Performance tweak: We skip iterating over the klass pointer since we
       
   233   // know that Universe::TypeArrayKlass never moves.
       
   234   return t->object_size();
       
   235 }
       
   236 
       
   237 int TypeArrayKlass::oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr) {
       
   238   assert(obj->is_typeArray(),"must be a type array");
       
   239   typeArrayOop t = typeArrayOop(obj);
       
   240   // Performance tweak: We skip iterating over the klass pointer since we
       
   241   // know that Universe::TypeArrayKlass never moves.
       
   242   return t->object_size();
       
   243 }
       
   244 
       
   245 #if INCLUDE_ALL_GCS
       
   246 void TypeArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
       
   247   ShouldNotReachHere();
       
   248   assert(obj->is_typeArray(),"must be a type array");
       
   249 }
       
   250 
       
   251 int
       
   252 TypeArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
       
   253   assert(obj->is_typeArray(),"must be a type array");
       
   254   return typeArrayOop(obj)->object_size();
       
   255 }
       
   256 #endif // INCLUDE_ALL_GCS
       
   257 
       
   258 void TypeArrayKlass::initialize(TRAPS) {
   207 void TypeArrayKlass::initialize(TRAPS) {
   259   // Nothing to do. Having this function is handy since objArrayKlasses can be
   208   // Nothing to do. Having this function is handy since objArrayKlasses can be
   260   // initialized by calling initialize on their bottom_klass, see ObjArrayKlass::initialize
   209   // initialized by calling initialize on their bottom_klass, see ObjArrayKlass::initialize
   261 }
   210 }
   262 
   211