Add assertion to ensure all AOT mapped heap roots have valid classes

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • 27
    • Affects Version/s: None
    • Component/s: hotspot
    • In Review

      Since JDK-8350550, we have the property that:

      Every live heap object that can be found by the garbage collector have a valid class (*), even if the object originates from the AOT cache.

      This allows the following check to be removed from ClaimMetadataVisitingOopIterateClosure::do_klass()

      https://github.com/openjdk/jdk/commit/fd30ae988bc512b5d2a5a3fd1bc1ed351af974c7#diff-9512406aa5bffbef807aa26007f54e2bfb6b0635e1829aa77bf483bdfd342c8cL54-L59

      * valid class means: the class has be loaded and Klass::class_loader_data() is not null

      We should add an assertion in debug builds to validate this property for the AOTMappedHeapLoader.

            Assignee:
            Ioi Lam
            Reporter:
            Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: