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 OffHeap Query in J9VM #20187

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions runtime/compiler/env/VMJ9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2439,6 +2439,27 @@ TR_J9VMBase::isHotReferenceFieldRequired()
return TR::Compiler->om.isHotReferenceFieldRequired();
}

bool
TR_J9VMBase::isIndexableDataAddrPresent()
{
#if defined(J9VM_ENV_DATA64)
return FALSE != _jitConfig->javaVM->isIndexableDataAddrPresent;
#else
return false;
#endif /* defined(J9VM_ENV_DATA64) */
}

/**
* Query if off-heap large array allocation is enabled
*
* @return true if off-heap large array allocation is enabled, false otherwise
*/
bool
TR_J9VMBase::isOffHeapAllocationEnabled()
{
return TR::Compiler->om.isOffHeapAllocationEnabled();
}

bool
TR_J9VMBase::scanReferenceSlotsInClassForOffset(TR::Compilation * comp, TR_OpaqueClassBlock * classPointer, int32_t offset)
{
Expand Down
2 changes: 2 additions & 0 deletions runtime/compiler/env/VMJ9.h
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,8 @@ class TR_J9VMBase : public TR_FrontEnd
virtual void markHotField( TR::Compilation *, TR::SymbolReference *, TR_OpaqueClassBlock *, bool);
virtual void reportHotField(int32_t reducedCpuUtil, J9Class* clazz, uint8_t fieldOffset, uint32_t reducedFrequency);
virtual bool isHotReferenceFieldRequired();
virtual bool isIndexableDataAddrPresent();
virtual bool isOffHeapAllocationEnabled();
virtual void markClassForTenuredAlignment( TR::Compilation *comp, TR_OpaqueClassBlock *opclazz, uint32_t alignFromStart);

virtual bool shouldDelayAotLoad() { return false; }
Expand Down