Consider renaming ClassLoaderData::keep_alive

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 24
    • Affects Version/s: None
    • Component/s: hotspot
    • b10

      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.

            Assignee:
            Coleen Phillimore
            Reporter:
            Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: