src/hotspot/share/classfile/altHashing.cpp
changeset 57777 90ead0febf56
parent 49722 a47d1e21b3f1
child 57811 947252a54b98
equal deleted inserted replaced
57774:21dccfac0ec5 57777:90ead0febf56
    33 // Get the hash code of the classes mirror if it exists, otherwise just
    33 // Get the hash code of the classes mirror if it exists, otherwise just
    34 // return a random number, which is one of the possible hash code used for
    34 // return a random number, which is one of the possible hash code used for
    35 // objects.  We don't want to call the synchronizer hash code to install
    35 // objects.  We don't want to call the synchronizer hash code to install
    36 // this value because it may safepoint.
    36 // this value because it may safepoint.
    37 static intptr_t object_hash(Klass* k) {
    37 static intptr_t object_hash(Klass* k) {
    38   intptr_t hc = k->java_mirror()->mark()->hash();
    38   intptr_t hc = k->java_mirror()->mark().hash();
    39   return hc != markOopDesc::no_hash ? hc : os::random();
    39   return hc != markWord::no_hash ? hc : os::random();
    40 }
    40 }
    41 
    41 
    42 // Seed value used for each alternative hash calculated.
    42 // Seed value used for each alternative hash calculated.
    43 juint AltHashing::compute_seed() {
    43 juint AltHashing::compute_seed() {
    44   jlong nanos = os::javaTimeNanos();
    44   jlong nanos = os::javaTimeNanos();