hotspot/src/share/vm/memory/heapInspection.cpp
changeset 18439 725ce18186b3
parent 18025 b7bcf7497f93
child 24424 2658d7834c6e
equal deleted inserted replaced
18438:9ea6bbfe0b83 18439:725ce18186b3
   155     _size = 0;
   155     _size = 0;
   156   }
   156   }
   157 }
   157 }
   158 
   158 
   159 uint KlassInfoTable::hash(const Klass* p) {
   159 uint KlassInfoTable::hash(const Klass* p) {
   160   assert(p->is_metadata(), "all klasses are metadata");
       
   161   return (uint)(((uintptr_t)p - (uintptr_t)_ref) >> 2);
   160   return (uint)(((uintptr_t)p - (uintptr_t)_ref) >> 2);
   162 }
   161 }
   163 
   162 
   164 KlassInfoEntry* KlassInfoTable::lookup(Klass* k) {
   163 KlassInfoEntry* KlassInfoTable::lookup(Klass* k) {
   165   uint         idx = hash(k) % _size;
   164   uint         idx = hash(k) % _size;