RFR(S) 8246546 Simplify SystemDictionary::is_shared_class_visible
ioi.lam at oracle.com
Tue Jun 16 22:53:43 UTC 2020
The current implementation of SystemDictionary::is_shared_class_visible
has grown more and more complex over time. Now it has checks for many
special cases and the code is hard to understand.
I have simplified the logic to:
Between dump time and run time, if a class:
- has the same class loader
- belongs to the same module
- is loaded from the same location
... then this class is visible at run time.
The new check should be more robust and faster.
For validation, I kept the old implementation and assert that the new
code produces the exact same result. I will remove
SystemDictionaryShared::is_shared_class_visible_for_classloader() when I
do the actual push.
Testing -- all CDS tests passed locally. Running mach5 tiers 1-4 now.
More information about the hotspot-runtime-dev