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

StackTraceElement::fill_in can use existing Module name and version

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Won't Fix
    • P4
    • None
    • 11, 12, 13
    • hotspot

    Description

      This is a subtask of JDK-8151751.

      It seems that Module version and name are already available in java.lang.Module::version and java.lang.Module::descriptor -> java.lang.module.ModuleDescriptor.Version::version. Accessing those would require drilling a few new holes in VM symbols and Java classes, and that would remove the need to intern them all the time at stack trace creation.

      Prototype patch:
        http://cr.openjdk.java.net/~shade/8216307/webrev.00/

      # 8u192
      StackTraceBench.test 1 avgt 15 10.851 ± 0.075 us/op
      StackTraceBench.test 10 avgt 15 15.325 ± 0.089 us/op
      StackTraceBench.test 100 avgt 15 59.717 ± 0.449 us/op
      StackTraceBench.test 1000 avgt 15 529.020 ± 3.654 us/op

      # jdk/jdk, baseline (with JDK-8216308)
      StackTraceBench.test 1 avgt 15 14.450 ± 0.136 us/op
      StackTraceBench.test 10 avgt 15 20.182 ± 0.088 us/op
      StackTraceBench.test 100 avgt 15 77.107 ± 0.632 us/op
      StackTraceBench.test 1000 avgt 15 647.128 ± 6.159 us/op

      # jdk/jdk, patched
      StackTraceBench.test 1 avgt 15 12.951 ± 0.083 us/op
      StackTraceBench.test 10 avgt 15 18.770 ± 0.111 us/op
      StackTraceBench.test 100 avgt 15 75.909 ± 0.449 us/op
      StackTraceBench.test 1000 avgt 15 640.916 ± 4.088 us/op

      The improvement is not much, because the original benchmark does not have lots of frames that go through the named module.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: