diff --git a/src/hotspot/share/oops/methodData.hpp b/src/hotspot/share/oops/methodData.hpp index 5e2f89b8ba..850f333f3e 100644 --- a/src/hotspot/share/oops/methodData.hpp +++ b/src/hotspot/share/oops/methodData.hpp @@ -139,7 +139,7 @@ public: // // 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 }; diff --git a/src/hotspot/share/runtime/threadHeapSampler.cpp b/src/hotspot/share/runtime/threadHeapSampler.cpp index abe6773a7d..1c8406ab6c 100644 --- a/src/hotspot/share/runtime/threadHeapSampler.cpp +++ b/src/hotspot/share/runtime/threadHeapSampler.cpp @@ -47,7 +47,7 @@ static 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); + 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; diff --git a/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.c b/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.c index 5c6a83a116..a4d6271ac7 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.c +++ b/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.c @@ -52,7 +52,7 @@ static jvmtiEnv *second_jvmti = NULL; typedef struct _ObjectTrace{ jweak object; - size_t size; + jlong size; jvmtiFrameInfo* frames; size_t frame_count; jthread thread;