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

Reduce allocations in ValueStack copying constructor

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • 14
    • hotspot
    • b19

      A typical C1 compilation copies ValueStacks objects 100+ times. Each time we create _locals and _stack Values in the initializer, only to often replace those with newly allocated Values to fit the number of _locals and _stack entries to copy.

      By ensuring we initialize _locals and _stack to the needed amount in the initializer, we reduce transient memory use and instruction count of C1 compilations.

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: