40 |
40 |
41 // Seed value used for each alternative hash calculated. |
41 // Seed value used for each alternative hash calculated. |
42 juint AltHashing::compute_seed() { |
42 juint AltHashing::compute_seed() { |
43 jlong nanos = os::javaTimeNanos(); |
43 jlong nanos = os::javaTimeNanos(); |
44 jlong now = os::javaTimeMillis(); |
44 jlong now = os::javaTimeMillis(); |
45 int SEED_MATERIAL[8] = { |
45 jint SEED_MATERIAL[8] = { |
46 (int) object_hash(SystemDictionary::String_klass()), |
46 (jint) object_hash(SystemDictionary::String_klass()), |
47 (int) object_hash(SystemDictionary::System_klass()), |
47 (jint) object_hash(SystemDictionary::System_klass()), |
48 os::random(), // current thread isn't a java thread |
48 (jint) os::random(), // current thread isn't a java thread |
49 (int) (((julong)nanos) >> 32), |
49 (jint) (((julong)nanos) >> 32), |
50 (int) nanos, |
50 (jint) nanos, |
51 (int) (((julong)now) >> 32), |
51 (jint) (((julong)now) >> 32), |
52 (int) now, |
52 (jint) now, |
53 (int) (os::javaTimeNanos() >> 2) |
53 (jint) (os::javaTimeNanos() >> 2) |
54 }; |
54 }; |
55 |
55 |
56 return murmur3_32(SEED_MATERIAL, 8); |
56 return murmur3_32(SEED_MATERIAL, 8); |
57 } |
57 } |
58 |
58 |