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

Fixes to IProfiler fanin data collection #20961

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
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
16 changes: 9 additions & 7 deletions runtime/compiler/runtime/IProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4313,18 +4313,20 @@ UDATA TR_IProfiler::parseBuffer(J9VMThread * vmThread, const U_8* dataStart, UDA
if (fanInDisabled)
break;
J9ConstantPool* ramCP = J9_CP_FROM_METHOD(caller);
uint16_t cpIndex = readU16(pc + 1);
// Read the cpIndex (or the index into the split table) and extend it to UDATA.
// The extension is needed because J9_STATIC_SPLIT_TABLE_INDEX_FLAG and
// J9_SPECIAL_SPLIT_TABLE_INDEX_FLAG do not fit on 16 bits.
UDATA cpIndex = readU16(pc + 1);

if (JBinvokestaticsplit == cpIndex)
// For split bytecodes, the cpIndex is actually the index into the split table.
if (JBinvokestaticsplit == *pc)
cpIndex |= J9_STATIC_SPLIT_TABLE_INDEX_FLAG;
if (JBinvokespecialsplit == cpIndex)
if (JBinvokespecialsplit == *pc)
cpIndex |= J9_SPECIAL_SPLIT_TABLE_INDEX_FLAG;
J9Method * callee = jitGetJ9MethodUsingIndex(vmThread, ramCP, cpIndex);
J9Method *callee = jitGetJ9MethodUsingIndex(vmThread, ramCP, cpIndex);

if (callee == NULL)
{
if (!callee)
break;
}

uint32_t offset = (uint32_t) (pc - caller->bytecodes);
findOrCreateMethodEntry(caller, callee , true ,offset);
Expand Down