eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 721 forks source link

Implement monitor enter/exit VM helper call for value types on Power #9122

Closed IBMJimmyk closed 4 years ago

IBMJimmyk commented 4 years ago

This is for the Power implementation of https://github.com/eclipse/openj9/pull/8976 and https://github.com/eclipse/openj9/issues/9110.

@fjeremic Already wrote a good summary so I'm just copying it here for convenience:

In #8976 we implemented support for value types in monitor enter/exit IL evaluators on x86. Value types cannot participate in synchronization. As outlined in #8976 we need to handle the three cases:

1. Object is known to be a value type at compile time

   * Call VM helper unconditionally

2. Object is known not to be a value type at compile time

   * Proceed as we do today

3. Unknown until runtime whether an object is a value type

   * Check at runtime whether object is a value type and if so call the VM helper

We should aim to have the same APIs as x86 and to be as close as possible in implementation to reduce any platform differences.

IBMJimmyk commented 4 years ago

@gita-omr You probably want to know about this.

gita-omr commented 4 years ago

@AlenBadel fyi

andrewcraik commented 4 years ago

@gita-omr I think you and others on your team have done this? Just trying to clean-up the issues for the release...

gita-omr commented 4 years ago

Yes, was done here: https://github.com/eclipse/openj9/pull/10214

andrewcraik commented 4 years ago

Closing as completed - thanks!