```
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.
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.
- duplicates
-
JDK-8032218 Emit single post-constructor barrier for chain of superclass constructors
- Open