Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8151751 Stack trace population code can (re-)use cached Strings
  3. JDK-8216308

StackTraceElement::fill_in can use injected Class source-file

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b04

      Backports

        Description

        This is the subtask of JDK-8151751.

        We can inject a "source-file" field into Class, and that would skip interning it all the time during stack trace creation.

        Candidate patch:
         http://cr.openjdk.java.net/~shade/8216308/webrev.01/

        It yields substantial improvements for stack trace generation:

        Benchmark (depth) Mode Cnt Score Error Units

        # baseline
        StackTraceBench.test 1 avgt 15 15.077 ± 0.065 us/op
        StackTraceBench.test 10 avgt 15 21.153 ± 0.123 us/op
        StackTraceBench.test 100 avgt 15 80.758 ± 0.363 us/op
        StackTraceBench.test 1000 avgt 15 674.888 ± 4.985 us/op

        # patched
        StackTraceBench.test 1 avgt 15 8.892 ± 0.064 us/op
        StackTraceBench.test 10 avgt 15 12.010 ± 0.079 us/op
        StackTraceBench.test 100 avgt 15 43.091 ± 0.254 us/op
        StackTraceBench.test 1000 avgt 15 353.194 ± 2.040 us/op

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                shade Aleksey Shipilev
                Reporter:
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: