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

C2: Only emit one trailing barrier for chain of parent constructors.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 23
    • hotspot
    • None
    • generic
    • generic

      ```
      class Foo extends Bar {
        public Foo() { super(); }
      }
      ```

      When compiling `Foo::Foo()` and inlining `Bar::Bar()`, we emit a barrier for both methods. https://github.com/openjdk/jdk/blob/279ed0ddd505fb3052b818f755b4b220ed5557e6/src/hotspot/share/opto/parse1.cpp#L1015. According to the cookbook, we only need to emit one barrier for each object https://gee.cs.oswego.edu/dl/jmm/cookbook.html.

            jcao Joshua Cao
            jcao Joshua Cao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: