--- a/src/hotspot/share/oops/methodData.hpp Tue Jun 19 16:14:39 2018 +0200
+++ b/src/hotspot/share/oops/methodData.hpp Tue Jun 19 16:29:48 2018 +0200
@@ -139,7 +139,7 @@
//
// The trap_state is collected only if ProfileTraps is true.
trap_bits = 1+31, // 31: enough to distinguish [0..Reason_RECORDED_LIMIT].
- trap_mask = right_n_bits(trap_bits),
+ trap_mask = -1,
first_flag = 0
};
--- a/src/hotspot/share/runtime/threadHeapSampler.cpp Tue Jun 19 16:14:39 2018 +0200
+++ b/src/hotspot/share/runtime/threadHeapSampler.cpp Tue Jun 19 16:29:48 2018 +0200
@@ -47,7 +47,7 @@
const uint64_t PrngMult = 0x5DEECE66DLL;
const uint64_t PrngAdd = 0xB;
const uint64_t PrngModPower = 48;
- const uint64_t PrngModMask = right_n_bits(PrngModPower);
+ const uint64_t PrngModMask = ((uint64_t)1 << PrngModPower) - 1;
//assert(IS_SAFE_SIZE_MUL(PrngMult, rnd), "Overflow on multiplication.");
//assert(IS_SAFE_SIZE_ADD(PrngMult * rnd, PrngAdd), "Overflow on addition.");
return (PrngMult * rnd + PrngAdd) & PrngModMask;
--- a/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.c Tue Jun 19 16:14:39 2018 +0200
+++ b/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.c Tue Jun 19 16:29:48 2018 +0200
@@ -52,7 +52,7 @@
typedef struct _ObjectTrace{
jweak object;
- size_t size;
+ jlong size;
jvmtiFrameInfo* frames;
size_t frame_count;
jthread thread;