< prev index next >
src/hotspot/share/runtime/heapMonitoring.hpp
Print this page
rev 47590 : [mq]: heap8
rev 47591 : [mq]: heap10a
rev 47592 : [mq]: heap14_rebased
rev 47593 : [mq]: heap15
*** 46,59 ****
// Returns the next prng value.
// pRNG is: aX+b mod c with a = 0x5DEECE66D, b = 0xB, c = 1<<48
// This is the lrand64 generator.
static inline uint64_t next_random(uint64_t rnd) {
const uint64_t PrngMult = 0x5DEECE66DLL;
! const uint64_t prng_add = 0xB;
! const uint64_t prng_mod_power = 48;
! const uint64_t prng_mod_mask = right_n_bits(prng_mod_power);
! return (PrngMult * rnd + prng_add) & prng_mod_mask;
}
static inline double fast_log2(const double & d) {
assert(d>0, "bad value passed to assert");
uint64_t x = 0;
--- 46,59 ----
// Returns the next prng value.
// pRNG is: aX+b mod c with a = 0x5DEECE66D, b = 0xB, c = 1<<48
// This is the lrand64 generator.
static inline uint64_t next_random(uint64_t rnd) {
const uint64_t PrngMult = 0x5DEECE66DLL;
! const uint64_t PrngAdd = 0xB;
! const uint64_t PrngModPower = 48;
! const uint64_t PrngModMask = right_n_bits(PrngModPower);
! return (PrngMult * rnd + PrngAdd) & PrngModMask;
}
static inline double fast_log2(const double & d) {
assert(d>0, "bad value passed to assert");
uint64_t x = 0;
< prev index next >