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

Remove unnecessary char_converter during class loading

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 17
    • 18
    • hotspot
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: