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

Remove unnecessary char_converter during class loading

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b02

      Description

      During class loading, we create a String object from a Symbol, then swap the '/' for '.' characters, and create another String object. Seems wasteful. I noticed this when looking for where we load java.lang.Throwable to throw OOM, and this also throws OOM.
      It still would throw OOM, just not creating two strings in the process.

          Handle s = java_lang_String::create_from_symbol(class_name, CHECK_NULL);
          // Translate to external class name format, i.e., convert '/' chars to '.'
          Handle string = java_lang_String::externalize_classname(s, CHECK_NULL);

      There's another place that does the same thing.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              coleenp Coleen Phillimore
              Reporter:
              coleenp Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: