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

ClassLoaderData::loader_name() should show consistent values

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
      None

      Description

      If unloading, ClassLoaderData::loader_name() will show loader name if set, otherwise loader class name.

      If not unloading, ClassLoaderData::loader_name() will just show the loader class name.

      This should be consistent.

      Also, I would prefer if we had separate accessors to each thing, so:

      ClassloaderData::loader_name()
        - return cached loader name if unloading, otherwise loader_oop->name

      ClassloaderData::loader_class_name()
        - return cached loader class name if unloading, otherwise loader_oop->klass->name

      And then, if even necessary, a compound version of this:
      ClassloaderData::loader_name_and_class_name()
      which outputs something like "<name> (instance of <classname>)".
      to replace the current existing users of the current loader_name().

      The change looks easy but to ensure that no existing caller of ClasslaoderData::loader_name() trips over the changed output may vbe the real problem.






        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                stuefe Thomas Stuefe
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: