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

Remove unnecessary char_converter during class loading

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 17
    • hotspot
    • b02

      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.

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

              Created:
              Updated:
              Resolved: