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

Add Continuation cleanup API #15876

Merged
merged 2 commits into from
Sep 15, 2022
Merged

Conversation

fengxue-IS
Copy link
Contributor

Signed-off-by: Jack Lu Jack.S.Lu@ibm.com

@fengxue-IS
Copy link
Contributor Author

Running personal build to verify changes, will mark ready when build/test passes

FYI @LinHu2016

@fengxue-IS fengxue-IS added the project:loom Used to track Project Loom related work label Sep 13, 2022
@LinHu2016
Copy link
Contributor

@fengxue-IS LGTM, since #15611 has been merged, Could you please update VM_VMHelpers::cleanupContinuationObject() too, Thanks,
like

static VMINLINE void
cleanupContinuationObject(J9VMThread *vmThread, J9Object *objectPtr)
{
#if JAVA_SPEC_VERSION >= 19
	freeContinuation(vmThread, objectPtr);
#endif /* JAVA_SPEC_VERSION >= 19 */
}

not sure if freeContinuation() can be called directly from VM_VMHelpers.

@fengxue-IS
Copy link
Contributor Author

not sure if freeContinuation() can be called directly from VM_VMHelpers.

I think it will have to use the vm->internalVMFunctions->

@fengxue-IS fengxue-IS marked this pull request as ready for review September 14, 2022 19:06
@fengxue-IS
Copy link
Contributor Author

@tajila can you take a look please

Signed-off-by: Jack Lu <Jack.S.Lu@ibm.com>
Signed-off-by: Jack Lu <Jack.S.Lu@ibm.com>
@fengxue-IS
Copy link
Contributor Author

Fixed merge conflict with #15872

@tajila
Copy link
Contributor

tajila commented Sep 14, 2022

jenkins test sanity win,amac jdk19

freeContinuation(J9VMThread *currentThread, j9object_t continuationObject)
{
J9VMContinuation *continuation = J9VMJDKINTERNALVMCONTINUATION_VMREF(currentThread, continuationObject);
if (NULL != continuation) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible for this to be NULL

Copy link
Contributor Author

@fengxue-IS fengxue-IS Sep 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this continuation is freed after termination, GC can also call free second time when the continuation object is no longer referenced via the VMHelper wrapper.

@tajila tajila merged commit e3cd092 into eclipse-openj9:master Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project:loom Used to track Project Loom related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants