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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 23
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: