ibmruntimes / openj9-openjdk-jdk21

GNU General Public License v2.0
8 stars 40 forks source link

Disable use of method handles for core reflection #187

Closed r30shah closed 2 months ago

r30shah commented 2 months ago

@tajila @keithc-ca Can I get your review on this PR ?

FYI @joransiu / @vijaysun-omr

keithc-ca commented 2 months ago

Please provide a description supporting this change. Unless not appropriate (with good, documented reasons), this should first be proposed for the head stream, then Java 23, and only after those are merged, then should this be considered.

r30shah commented 2 months ago

I am going to summarize my observations with analyzing performance on one of the enterprise java workload with JDK21 here for reference.

In JEP 416 core reflection was re-implemented with Method Handles with the purpose of simplifying adding new language features. I observe some of the large enterprise based application was seeing impact on throughput performance as direct method handle code introduces additional code to be executed at runtime to ensure the accessibility of the the field by the caller. Proposing this change while OpenJ9 JIT compiler team works on closing the gap with use of Direct Method Handle for reflection.

I am going to defer to @tajila for the decision on getting this change to JDK23 first.

keithc-ca commented 2 months ago

getting this change to JDK23 first

Jdk23 would be second, https://github.com/ibmruntimes/openj9-openjdk-jdk would be first.

tajila commented 2 months ago

This change can probably be done in openj9 System::ensureProperties.

r30shah commented 2 months ago

This change can probably be done in openj9 System::ensureProperties.

I see, closing this PR, I have prepared WIP change (https://github.com/r30shah/openj9/commit/3dc041db1153911462e24722398a1712e241bc1b) to do this in OpenJ9. Currently testing the change.