Skip to content

Commit 8141c6f

Browse files
committed
Getting OSR frame size from ROMMethod
osrFrameSizeRomMethod is introduced to return the OSR frame size for the ROMMethod. This is needed to reduce the messages in the JITaaS. Also removed the unused function "TR_J9MethodBase::osrFrameSize". Signed-off-by: Satbir Singh <satbir.singh1@ibm.com>
1 parent 05b4a2b commit 8141c6f

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

runtime/codert_vm/decomp.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -1765,6 +1765,20 @@ UDATA
17651765
osrFrameSize(J9Method *method)
17661766
{
17671767
J9ROMMethod *romMethod = J9_ROM_METHOD_FROM_RAM_METHOD(method);
1768+
return osrFrameSizeRomMethod(romMethod);
1769+
}
1770+
1771+
1772+
/**
1773+
* Compute the number of bytes required for a single OSR frame.
1774+
*
1775+
* @param[in] *romMethod the J9ROMMethod for which to compute the OSR frame size
1776+
*
1777+
* @return byte size of the OSR frame
1778+
*/
1779+
UDATA
1780+
osrFrameSizeRomMethod(J9ROMMethod *romMethod)
1781+
{
17681782
U_32 numberOfLocals = J9_ARG_COUNT_FROM_ROM_METHOD(romMethod) + J9_TEMP_COUNT_FROM_ROM_METHOD(romMethod);
17691783
U_32 maxStack = J9_MAX_STACK_FROM_ROM_METHOD(romMethod);
17701784

runtime/compiler/env/j9method.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -790,13 +790,6 @@ TR_J9MethodBase::isBigDecimalConvertersMethod(TR::Compilation * comp)
790790
}
791791

792792

793-
uintptr_t
794-
TR_J9MethodBase::osrFrameSize(J9Method* j9Method)
795-
{
796-
return ::osrFrameSize(j9Method);
797-
}
798-
799-
800793
J9ROMConstantPoolItem *
801794
TR_ResolvedJ9MethodBase::romLiterals()
802795
{

runtime/compiler/env/j9method.h

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ class TR_J9MethodBase : public TR_Method
121121

122122
virtual bool isUnsafeWithObjectArg( TR::Compilation * comp = NULL);
123123
virtual bool isUnsafeCAS(TR::Compilation * = NULL);
124-
static uintptr_t osrFrameSize(J9Method* j9Method);
125124
virtual uint32_t numberOfExplicitParameters();
126125
virtual TR::DataType parmType(uint32_t parmNumber); // returns the type of the parmNumber'th parameter (0-based)
127126

runtime/oti/jitprotos.h

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ void * setUpForDLT(J9VMThread * currentThread, J9StackWalkState * walkState);
4141

4242
extern J9_CFUNC void induceOSROnCurrentThread(J9VMThread * currentThread);
4343
extern J9_CFUNC UDATA osrFrameSize(J9Method *method);
44+
extern J9_CFUNC UDATA osrFrameSizeRomMethod(J9ROMMethod *romMethod);
4445
extern J9_CFUNC UDATA ensureOSRBufferSize(J9JavaVM *vm, UDATA osrFramesByteSize, UDATA osrScratchBufferByteSize, UDATA osrStackFrameByteSize);
4546
extern J9_CFUNC void jitStackLocalsModified (J9VMThread * currentThread, J9StackWalkState * walkState);
4647
#if (defined(J9VM_INTERP_HOT_CODE_REPLACEMENT)) /* priv. proto (autogen) */

0 commit comments

Comments
 (0)