Refactor AOT class exclusion code

XMLWordPrintable

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

      [1] We currently have should_be_excluded(Klass*) and is_excluded_class(Klass*) in SystemDictionaryShared. For consistency, we should replace all uses of the second function with the first one.

      [2] AOTConstantPoolResolver needs to decide if can AOT-resolve a constant pool entry in class A refers to class B. Some of the decisions need to be done outside of a safepoint.

      For example, AOTConstantPoolResolver::is_indy_resolution_deterministic() calls check_methodtype_signature(), which should call
      AOTConstantPoolResolver::is_class_resolution_deterministic(A, B).

      However, is_class_resolution_deterministic() calls AOTLinker::add_candidate(), which works only inside a safepoint. Therefore, check_methodtype_signature currently calls SystemDictionaryShared::should_be_excluded(B), which works fine now, but may not work in the future when we support more complex use cases.

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

              Created:
              Updated: