Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8335059

Consider renaming ClassLoaderData::keep_alive

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 24
    • None
    • hotspot
    • b10

    Description

      When iterating over the ClassLoaderDataGraph and handing out CLDs, you sometimes need to make sure that the CLD and its oops are kept alive. I think it would be easy to think that you should call ClassLoaderData::keep_alive() to do that, just like we have CollectedHeap::keep_alive(oop). However, ClassLoaderData::keep_alive already exists and returns whether the CLD is forcefully kept alive or not. So, what you need to do today is to call ClassLoaderData::holder(), and that will keep the CLD alive.

      I propose that we rename the current ClassLoaderData::keep_alive() to something else, and then use ClassLoaderData to apply the "keep alive" property.

      Attachments

        Issue Links

          Activity

            People

              coleenp Coleen Phillimore
              stefank Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: