RFR(S) 8244764 Improve assertion for CPP_VTABLE_PATCH_TYPES_DO

Ioi Lam ioi.lam at oracle.com
Wed Jun 24 00:09:19 UTC 2020


When a new subtype of MetaData is added, CPP_VTABLE_PATCH_TYPES_DO must 
to be
updated. However, there was no assertion check for this. In the past, 
like Valhalla and Loom would get weird crashes with CDS after they added new
subclassesof Klass.

With this patch, you will get a fatal error like this:

# fatal error: Cannot find C++ vtable for 0x000000080002ec40 -- you
   probably added a new subtype of Klass or MetaData without updating

(The code is getting messy. I will clean it up in a subtask:
JDK-8248186 Move CDS C++ vtable code to cppVtables.cpp)

- Ioi

More information about the hotspot-runtime-dev mailing list