RFR (M): 8220301: Remove jbyte use in CardTable (affects all platforms)
Aleksey Shipilev
shade at redhat.com
Mon Mar 11 16:25:41 UTC 2019
On 3/11/19 5:13 PM, Thomas Schatzl wrote:
> There has been some short internal discussion that preferred a typedef
> instead of uint8_t right away. I am somewhat preferring the typedef at
> this point (working in loosely related JDK-8213108) but I am good with
> a straight uint8_t too. Let's see what others think.
>
> The STATIC_ASSERTs are imo better replacements for the existing asserts
> that do the same as they fail on compile and not during runtime.
Right. I don't have a strong preference. My comment was about encoding ClassValue and then
STATIC_ASSERT-ing its size vs. using the type that is guaranteed to be 1-byte.
Nit: I missed this earlier, but can/should we do a single STATIC_ASSERT near CardTable::ClassValue
definition with the explanation that platform-specific code has this assumption? This would provide
additional safeguard from accidentally changing the typedef without changing the commented
STATIC_ASSERT, and that STATIC_ASSERT would definitely fire on all platforms since it would be in
shared code?
> Thanks for getting them through these platforms, fixed in
> http://cr.openjdk.java.net/~tschatzl/8220301/webrev.0_to_1/ (diff)
> http://cr.openjdk.java.net/~tschatzl/8220301/webrev.1/ (full)
Looks okay.
-Aleksey
More information about the hotspot-dev
mailing list