Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contiguous array dataAddr field shadow symbol reference for off heap technology #7150

Conversation

VermaSh
Copy link
Contributor

@VermaSh VermaSh commented Oct 18, 2023

Add ContiguousArrayDataAddrFieldShadowSymRef along with needed getter and setter. This is minimum set of off heap changes needed for eclipse-openj9/openj9#18303.

@VermaSh VermaSh marked this pull request as draft October 18, 2023 19:58
@VermaSh VermaSh force-pushed the offHeapMemoryCommitAndDecommitFinal_base_changes branch from 1fe1e71 to b618479 Compare November 3, 2023 03:19
@VermaSh VermaSh changed the title WIP: Off heap changes Add contiguous array dataAddr field shadow symbol reference for off heap technology Nov 3, 2023
@VermaSh VermaSh marked this pull request as ready for review November 3, 2023 15:00
@VermaSh
Copy link
Contributor Author

VermaSh commented Nov 3, 2023

@0xdaryl @zl-wang @vijaysun-omr Can I please get a review for this PR
cc: @dmitripivkine @amicic

{
if (!element(contiguousArrayDataAddrFieldSymbol))
{
TR::Symbol * sym = TR::Symbol::createShadow(trHeapMemory(), TR::Int32);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why we use Int32 here ? Isn't the data address pointer 64-bits (on 64-bit platforms which may be the only place where off-heap is done) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, that should be TR::Address. I have updated it in my latest commit.

@VermaSh VermaSh force-pushed the offHeapMemoryCommitAndDecommitFinal_base_changes branch from b618479 to 6d97876 Compare November 21, 2023 20:59
@VermaSh
Copy link
Contributor Author

VermaSh commented Dec 1, 2023

@vijaysun-omr can I get another set of review?

TR_ASSERT_FATAL_WITH_NODE(self(), self()->getOpCode().hasSymbolReference(), "parameter error");
retNode = TR::Node::createLoad(self(), self()->getSymbolReference());
}
else if (self()->getReferenceCount() > 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there some assumption that self will be a particular opcode in the else if ? I ask, because duplicateTree can be tricky api to call for complex trees with commoned IL nodes. But if this can only be a direct load for example, then maybe it is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This actually doesn't need to be checked in. We found that it was causing test failures. I have removed it in my latest commit.

@VermaSh VermaSh changed the title Add contiguous array dataAddr field shadow symbol reference for off heap technology WIP: Add contiguous array dataAddr field shadow symbol reference for off heap technology Dec 4, 2023
@VermaSh VermaSh marked this pull request as draft December 4, 2023 15:14
@VermaSh VermaSh changed the title WIP: Add contiguous array dataAddr field shadow symbol reference for off heap technology Add contiguous array dataAddr field shadow symbol reference for off heap technology Dec 4, 2023
@VermaSh VermaSh force-pushed the offHeapMemoryCommitAndDecommitFinal_base_changes branch from 6d97876 to 5fb24f3 Compare January 19, 2024 15:40
@VermaSh VermaSh force-pushed the offHeapMemoryCommitAndDecommitFinal_base_changes branch from 5fb24f3 to afc06e0 Compare January 19, 2024 15:53
@VermaSh
Copy link
Contributor Author

VermaSh commented Jan 19, 2024

Launched an other personal build to verify changes

@VermaSh
Copy link
Contributor Author

VermaSh commented Jan 20, 2024

My personal build passed without any failures. Failure in eclipse.omr (x86-64-macOS) isn't related to my changes. It has been failing for other PRs as well: #7181.

@vijaysun-omr this is ready for review/merge.

@VermaSh VermaSh marked this pull request as ready for review January 20, 2024 00:26
#if defined(J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION)
TR::SymbolReference * findOrCreateContiguousArrayDataAddrFieldShadowSymRef();
#endif // defined(J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION)
TR::SymbolReference * findContiguousArrayDataAddrFieldShadowSymRef();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the findOrCreate inside an ifdef but the find routine is not ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about the delay, I must have missed the email for comment. But findOrCreate routine uses TR::Compiler->om.offsetOfContiguousDataAddrField API which needs to be guarded by ifdef. However, find isn't guarded because it is used by node->isDataAddrPointer(). I left find outside to avoid having ifdef in node->isDataAddrPointer().

@vijaysun-omr
Copy link
Contributor

jenkins build all

@vijaysun-omr
Copy link
Contributor

jenkins build win

@vijaysun-omr vijaysun-omr merged commit 269a3d2 into eclipse-omr:master Jan 23, 2024
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants