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

[perf] vframeStreamCommon constructor may be optimized

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • hotspot
    • b03
    • x86
    • generic

      The vframeStream constructor does not create a temporary RegisterMap, and pass it (by value) to the vframeStreamCommon constructor. With changes for the vframeStreamCommon constructor to accept the same arguments as the RegisterMap constructor, the vframeStreamCommon’s RegisterMap can be constructed directly.

      This changes leads to the difference in the compiled code for the vframeStream constructor. The original has 2 rep movsq instructions, moving 756 quad words each. The patched version doesn’t. It leads to ~1% performance improvement for the specjvm2008::serial and for specjbb2015 (both, max and critical) mostly due to better L1 cache metrics.
      The JMH test StackWalkBench with depth=1000 report scores improvement from 0 for StackWalkBench.walk_MethodNames to ~20% for StackWalkBench.getCallerClass_withTestStack.

      Possible patch was attached. Maybe it need some rework/ improvements.

            vaivanov Vladimir Ivanov
            vaivanov Vladimir Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: