Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -541,10 +541,14 @@ private InstrumentationData getInstrumentationData(VirtualFrame frame, BytecodeN
private void resetInstrumentationData(VirtualFrame frame, BytecodeNode bytecode) {
InstrumentationData current = (InstrumentationData) bytecode.getLocalValue(0, frame, instrumentationDataIndex);
if (current == null) {
current = new InstrumentationData(maxProfileCEventStackSize);
bytecode.setLocalValue(0, frame, instrumentationDataIndex, current);
initInstrumentationData(frame, bytecode);
} else {
current.reset();
}
current.reset();
}

private void initInstrumentationData(VirtualFrame frame, BytecodeNode bytecode) {
bytecode.setLocalValue(0, frame, instrumentationDataIndex, new InstrumentationData(maxProfileCEventStackSize));
}

private void resetInstrumentationDataForResume(VirtualFrame frame, BytecodeNode bytecode, int bci) {
Expand All @@ -558,7 +562,7 @@ public static final class EnterInstrumentedRoot {
public static void doEnter(VirtualFrame frame,
@Bind PBytecodeDSLRootNode root,
@Bind BytecodeNode bytecode) {
root.resetInstrumentationData(frame, bytecode);
root.initInstrumentationData(frame, bytecode);
}
}

Expand Down Expand Up @@ -698,9 +702,7 @@ void startProfileCEventCall(PBytecodeDSLRootNode root, VirtualFrame frame, Bytec

void clearProfileCEventCallableStack() {
if (profileCEventCallables != null) {
for (int i = 0; i < profileCEventStackTop; i++) {
profileCEventCallables[i] = null;
}
PythonUtils.fill(profileCEventCallables, 0, profileCEventStackTop, null);
}
profileCEventStackTop = 0;
profileCEventCallStarted = false;
Expand Down
Loading