RFR(M): 8204240: Extend MDO to allow more reasons to be recorded per bci

Roland Westrelin rwestrel at redhat.com
Mon Jun 18 12:26:48 UTC 2018


Hi Martin,

> we just noticed that this change causes a build warning on Windows 32 bit:
> jdk\src\hotspot\share\oops/methodData.hpp(142) : warning C4293: '<<' : shift count negative or too big, undefined behavior
>
> I think trap_mask is incorrect for 32 bit and should get fixed.

Thanks for reporting that issue. What about the patch below?

Roland.

diff --git a/src/hotspot/share/oops/methodData.hpp b/src/hotspot/share/oops/methodData.hpp
--- a/src/hotspot/share/oops/methodData.hpp
+++ b/src/hotspot/share/oops/methodData.hpp
@@ -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
   };
 


More information about the hotspot-compiler-dev mailing list