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

Elide more final field's write memory barrier with escape analysis result

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Environment:

      aarch64 development board

    • Subcomponent:
    • Resolved In Build:
      b89
    • CPU:
      aarch64
    • OS:
      generic
    • Verification:
      Fix failed

      Backports

        Description

        MemBarRelease for final field write can be removed when its allocation doesn't escape thread, allocation node can be acquired from its MemBarNode::Precedent input.
        Currently, MemBarRelase's Precedent input is only added when eliminate_boxing is true and its owning object is primitive Box (see Parse::do_put_xxx and Parse::do_exits). Checking OpenJDK log, this is added for autoboxing elimination early. Now I suggest turn on this optimization for general object type, this can benefit RMO platform (like aarch64) performance.

        Enhancement try removing constraints for set_alloc_with_final(obj) in do_put_xxx (parse3.cpp). This leads to adding Precedent input for all kind object's final field writes' MemBarRelase node. Then they have opportunities to get optimized.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hshi Hui Shi
                  Reporter:
                  hshi Hui Shi
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: