Skip to content

Use genLoadProfiledClassAddressConstant in Z codegen - #14932

Merged
joransiu merged 1 commit into
eclipse-openj9:masterfrom
Spencer-Comin:profiled-address-snippet
May 24, 2023
Merged

Use genLoadProfiledClassAddressConstant in Z codegen#14932
joransiu merged 1 commit into
eclipse-openj9:masterfrom
Spencer-Comin:profiled-address-snippet

Conversation

@Spencer-Comin

Copy link
Copy Markdown
Contributor

Replaces this sort of idiom:

if (cg->needClassAndMethodPointerRelocations())
   temp = generateRegLitRefInstruction(cg, TR::InstOpCode::getLoadOpCode(), node, arbitraryClassReg1, (uintptr_t) profiledClassesList[numPICs].profiledClass, TR_ClassPointer, NULL, NULL, NULL);
else
   temp = generateRILInstruction(cg, TR::InstOpCode::LARL, node, arbitraryClassReg1, profiledClassesList[numPICs].profiledClass);

if (fej9->isUnloadAssumptionRequired((TR_OpaqueClassBlock *)(profiledClassesList[numPICs].profiledClass), comp->getCurrentMethod()))
   comp->getStaticPICSites()->push_front(temp);
if (cg->wantToPatchClassPointer(profiledClassesList[numPICs].profiledClass, node))
   comp->getStaticHCRPICSites()->push_front(temp);

with a call to the genLoadProfiledClassAddressConstant helper.

See the OMR PR for the implementation of genLoadProfiledClassAddressConstant.

@r30shah

r30shah commented Apr 21, 2022

Copy link
Copy Markdown
Contributor

@Spencer-Comin Can you confirm if the replacement adds the PICSites to HCRPICSites list as well?

@Spencer-Comin

Copy link
Copy Markdown
Contributor Author

@Spencer-Comin Can you confirm if the replacement adds the PICSites to HCRPICSites list as well?

It does not, I will change it to include that

@Spencer-Comin

Copy link
Copy Markdown
Contributor Author

Once eclipse-omr/omr#6596 goes through, the PICSites will be added to the HCRPICSites list

@Spencer-Comin

Copy link
Copy Markdown
Contributor Author

FYI @joransiu @r30shah

@r30shah r30shah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Spencer-Comin This change looks good to me, as this would be dependent OMR, can you mark this one WIP.

@Spencer-Comin
Spencer-Comin marked this pull request as draft April 11, 2023 14:44
@Spencer-Comin
Spencer-Comin marked this pull request as ready for review May 12, 2023 13:52
@r30shah

r30shah commented May 18, 2023

Copy link
Copy Markdown
Contributor

Hi @joransiu would it be possible to launch jenkins test on this PR that depends on eclipse-omr/omr#6596, OMR one is good to merge and I expect it to get merged today

@joransiu

Copy link
Copy Markdown
Member

Jenkins test sanity zlinux jdk17,jdk20 depends eclipse-omr/omr#6596

@r30shah

r30shah commented May 18, 2023

Copy link
Copy Markdown
Contributor

@Spencer-Comin both JDK17 and JDK20 build seemed to failed building jIT can you check ?

@Spencer-Comin

Copy link
Copy Markdown
Contributor Author

It looks unrelated to my changes. I'll rebase and hopefully that resolves it.

This commit replaces the idiom of manually creating LARL, data snippet,
or regLitRefInstruction and adding it to staticPICSites for profiled
class address constants with a call to the
genLoadProfiledClassAddressConstant helper function.

Signed-off-by: Spencer Comin <spencer.comin@ibm.com>
@Spencer-Comin
Spencer-Comin force-pushed the profiled-address-snippet branch from 43f7bfc to 54d9bae Compare May 18, 2023 18:33
@joransiu

Copy link
Copy Markdown
Member

Jenkins test sanity zlinux jdk17,jdk20 depends eclipse-omr/omr#6596

@joransiu

Copy link
Copy Markdown
Member

Yeah, it's odd... the line number flagged matches the latest version of ValueTypeHelpers.hpp, and the use of the variable is there later on in the method: https://github.com/eclipse-openj9/openj9/blob/master/runtime/vm/ValueTypeHelpers.hpp#L646.

@joransiu

Copy link
Copy Markdown
Member

Jenkins compile zlinux jdk11

@joransiu
joransiu merged commit 1220e36 into eclipse-openj9:master May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants