Use stringStream.base() instead of as_string() when applicable

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • tbd
    • Affects Version/s: 15
    • Component/s: hotspot

      Goetz Lindenmaier points out[1] that we in some places can skip a ResourceMark needed for ss.as_string() and use ss.base() instead. This is applicable when the string doesn't outlive the stringStream.

      While most usage is in error paths, cleaning this up where applicable could have an impact on code size. Improving usage documentation of stringStream.base() would be welcome.

      [1] https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-March/038858.html

            Assignee:
            Johan Sjölen
            Reporter:
            Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: