Skip to content

Allow Reference.refersTo to be inlined under AOT - #17568

Merged
dsouzai merged 2 commits into
eclipse-openj9:masterfrom
hzongaro:inline-reference-refersTo-under-AOT
Jun 16, 2023
Merged

Allow Reference.refersTo to be inlined under AOT#17568
dsouzai merged 2 commits into
eclipse-openj9:masterfrom
hzongaro:inline-reference-refersTo-under-AOT

Conversation

@hzongaro

@hzongaro hzongaro commented Jun 9, 2023

Copy link
Copy Markdown
Member

The implementations of TR_J9SharedCacheVM::isGetImplInliningSupported and TR_J9SharedCacheVM::isGetImplAndRefersToInliningSupported return false unconditionally, preventing inlining of java/lang/ref/Reference.refersTo and java/lang/ref/Reference.getImpl under AOT compilation. This change removes the implementations of those methods in TR_J9SharedCacheVM to allow inlining to happen under AOT, with an additional test in TR_J9VM::inlineNativeCall of whether the 'referent' field's offset could not be retrieved - which can occur under AOT with no symbol validation manager.

@hzongaro

hzongaro commented Jun 9, 2023

Copy link
Copy Markdown
Member Author

Irwin @dsouzai, may I ask you to review this change?

Comment thread runtime/compiler/env/VMJ9.cpp Outdated
Comment thread runtime/compiler/env/VMJ9.h Outdated
@hzongaro
hzongaro force-pushed the inline-reference-refersTo-under-AOT branch from c21131c to b03ac95 Compare June 14, 2023 20:23
@hzongaro

Copy link
Copy Markdown
Member Author

Irwin @dsouzai, I've made the requested changes in commit b03ac952857a54bfc3169e631a9d866990949f81. This is ready for a re-review. Thanks!

@hzongaro hzongaro added the comp:jitserver Artifacts related to JIT-as-a-Service project label Jun 14, 2023
@dsouzai

dsouzai commented Jun 15, 2023

Copy link
Copy Markdown
Contributor

jenkins test sanity.functional all jdk17

@dsouzai

dsouzai commented Jun 15, 2023

Copy link
Copy Markdown
Contributor

I'll let the tests complete, but I believe we need to increment JITServer minor version since there could be a miscommunication between the client and the server. I've already spoken to Henry about this offline.

hzongaro added 2 commits June 15, 2023 12:48
The implementations of isGetImplInliningSupported() and
isGetImplAndRefersToInliningSupported() in TR_J9SharedCacheVM and
TR_J9SharedCacheServerVM return false unconditionally, preventing
inlining of Reference.refersTo and Reference.getImpl under AOT
compilation.  This change removes the implementations to allow
inlining to happen, with an additional test in TR_J9VM::inlineNativeCall
of whether the 'referent' field's offset could not be retrieved - which
can occur under AOT with no symbol validation manager.

Signed-off-by: Henry Zongaro <zongaro@ca.ibm.com>
TR_J9SharedCacheServerVM no longer prevents Reference.refersTo and
Reference.getImpl from being inlined under AOT compilation.  Bump the
MINOR_NUMBER to avoid any conflicts between the JITServer and client
versions.

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
@hzongaro
hzongaro force-pushed the inline-reference-refersTo-under-AOT branch from 02b794d to 53364de Compare June 15, 2023 19:50
@hzongaro

hzongaro commented Jun 15, 2023

Copy link
Copy Markdown
Member Author

Irwin @dsouzai, I've updated the MINOR_NUMBER as we discussed. Unfortunately, I had to resolve a merge conflict for the MINOR_NUMBER, so I've rebased and force pushed my commits with the latest versions. There were no other changes.

There was an error in the aarch64 build that appeared to be unrelated to my changes, but the other tests were clean. I'll rerun the tests just to be safe.

@hzongaro

Copy link
Copy Markdown
Member Author

Jenkins test sanity.functional all jdk17

@dsouzai dsouzai self-assigned this Jun 15, 2023
@hzongaro

Copy link
Copy Markdown
Member Author

Irwin @dsouzai, would you like me to squash down the two commits, so that the change to the MINOR_NUMBER is actually with the change to which it applied.

@dsouzai

dsouzai commented Jun 16, 2023

Copy link
Copy Markdown
Contributor

Nah I think it's fine as is, it's all still part of the same PR anyway.

@dsouzai
dsouzai merged commit d253aef into eclipse-openj9:master Jun 16, 2023
@hzongaro
hzongaro deleted the inline-reference-refersTo-under-AOT branch August 25, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:jit:aot comp:jit comp:jitserver Artifacts related to JIT-as-a-Service project perf

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants