Skip to content

Commit

Permalink
Add OffHeap Query in J9VM
Browse files Browse the repository at this point in the history
Signed-off-by: Abdulrahman Alattas <rmnattas@gmail.com>
  • Loading branch information
rmnattas committed Sep 18, 2024
1 parent 32046b3 commit 2a68c8d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
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

0 comments on commit 2a68c8d

Please sign in to comment.