Skip to content

Commit 2a68c8d

Browse files
committed
Add OffHeap Query in J9VM
Signed-off-by: Abdulrahman Alattas <rmnattas@gmail.com>
1 parent 32046b3 commit 2a68c8d

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

runtime/compiler/env/VMJ9.cpp

+21
Original file line numberDiff line numberDiff line change
@@ -2439,6 +2439,27 @@ TR_J9VMBase::isHotReferenceFieldRequired()
24392439
return TR::Compiler->om.isHotReferenceFieldRequired();
24402440
}
24412441

2442+
bool
2443+
TR_J9VMBase::isIndexableDataAddrPresent()
2444+
{
2445+
#if defined(J9VM_ENV_DATA64)
2446+
return FALSE != _jitConfig->javaVM->isIndexableDataAddrPresent;
2447+
#else
2448+
return false;
2449+
#endif /* defined(J9VM_ENV_DATA64) */
2450+
}
2451+
2452+
/**
2453+
* Query if off-heap large array allocation is enabled
2454+
*
2455+
* @return true if off-heap large array allocation is enabled, false otherwise
2456+
*/
2457+
bool
2458+
TR_J9VMBase::isOffHeapAllocationEnabled()
2459+
{
2460+
return TR::Compiler->om.isOffHeapAllocationEnabled();
2461+
}
2462+
24422463
bool
24432464
TR_J9VMBase::scanReferenceSlotsInClassForOffset(TR::Compilation * comp, TR_OpaqueClassBlock * classPointer, int32_t offset)
24442465
{

runtime/compiler/env/VMJ9.h

+2
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,8 @@ class TR_J9VMBase : public TR_FrontEnd
14521452
virtual void markHotField( TR::Compilation *, TR::SymbolReference *, TR_OpaqueClassBlock *, bool);
14531453
virtual void reportHotField(int32_t reducedCpuUtil, J9Class* clazz, uint8_t fieldOffset, uint32_t reducedFrequency);
14541454
virtual bool isHotReferenceFieldRequired();
1455+
virtual bool isIndexableDataAddrPresent();
1456+
virtual bool isOffHeapAllocationEnabled();
14551457
virtual void markClassForTenuredAlignment( TR::Compilation *comp, TR_OpaqueClassBlock *opclazz, uint32_t alignFromStart);
14561458

14571459
virtual bool shouldDelayAotLoad() { return false; }

0 commit comments

Comments
 (0)