Skip to content

Loom Pinning: Manage J9VMThread->callOutCount - #15496

Merged
gacholio merged 1 commit into
eclipse-openj9:masterfrom
babsingh:loom_pin_support_v2
Jul 15, 2022
Merged

Loom Pinning: Manage J9VMThread->callOutCount#15496
gacholio merged 1 commit into
eclipse-openj9:masterfrom
babsingh:loom_pin_support_v2

Conversation

@babsingh

@babsingh babsingh commented Jul 6, 2022

Copy link
Copy Markdown
Contributor

In order to support if a Continuation is pinned, callOutCount is

  • incremented when a frame of a below type is build.
  • decremented when a frame of a below type is removed.

Frame types, which have been accounted:

  • J9SF_FRAME_TYPE_JNI_NATIVE_METHOD
  • J9SF_FRAME_TYPE_NATIVE_METHOD
  • Call-in frame

TODOs for the JIT (#15175):

  • Increment callOutCount in JNILinkage::buildJNICallOutFrame.
  • Decrement callOutCount in JNILinkage::restoreJNICallOutFrame.
  • Related frame type: J9SF_FRAME_TYPE_JIT_JNI_CALLOUT.

Related: #15174

Signed-off-by: Babneet Singh sbabneet@ca.ibm.com

@babsingh
babsingh force-pushed the loom_pin_support_v2 branch 2 times, most recently from e7f4551 to fba9759 Compare July 6, 2022 16:35
@babsingh
babsingh marked this pull request as ready for review July 7, 2022 16:58
@babsingh
babsingh requested a review from gacholio July 7, 2022 16:58
@gacholio

gacholio commented Jul 7, 2022

Copy link
Copy Markdown
Contributor

I'd prefer that the counter be managed in the places that need it, rather than testing the frame type in the common helper. I can think of two places that will need this - JNI callout and the call to JNI_OnLoad in the loadLibrary INL.

Also, anywhere that calls back in to java to do a resolve (MH, ConstantValue, etc) should be considered a callout for now.

@babsingh
babsingh force-pushed the loom_pin_support_v2 branch from fba9759 to 4c57cfc Compare July 7, 2022 21:51
@babsingh

babsingh commented Jul 7, 2022

Copy link
Copy Markdown
Contributor Author

I'd prefer that the counter be managed in the places that need it ...

Feedback addressed. Also, accounted for call-ins.

Comment thread runtime/vm/BytecodeInterpreter.hpp Outdated
Comment thread runtime/vm/BytecodeInterpreter.hpp Outdated
Comment thread runtime/vm/callin.cpp Outdated
@babsingh
babsingh force-pushed the loom_pin_support_v2 branch from 4c57cfc to 72af9eb Compare July 12, 2022 14:10
In order to support if a Continuation is pinned, callOutCount is
- incremented when a frame of a below type is build.
- decremented when a frame of a below type is removed.

Frame types, which have been accounted:
- J9SF_FRAME_TYPE_JNI_NATIVE_METHOD
- J9SF_FRAME_TYPE_NATIVE_METHOD
- Call-in frame

TODOs for the JIT (eclipse-openj9#15175):
- Increment callOutCount in JNILinkage::buildJNICallOutFrame.
- Decrement callOutCount in JNILinkage::restoreJNICallOutFrame.
- Related frame type: J9SF_FRAME_TYPE_JIT_JNI_CALLOUT.

Related: eclipse-openj9#15174

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@babsingh
babsingh force-pushed the loom_pin_support_v2 branch from 72af9eb to 34f82f1 Compare July 14, 2022 14:52
@gacholio

Copy link
Copy Markdown
Contributor

jenkins compile win jdk8

@gacholio

Copy link
Copy Markdown
Contributor

jenkins test sanity zlinux jdknext

@gacholio

Copy link
Copy Markdown
Contributor

Lots of (likely unrelated) test failures.

@babsingh

Copy link
Copy Markdown
Contributor Author

Lots of (likely unrelated) test failures.

jdknext built JDK20 instead of JDK19. The failures are for JDK20. E.g. jvmtitests_excludes_20.xml is missing. Updated PR build cmd: jenkins test sanity zlinux jdk19.

@gacholio

Copy link
Copy Markdown
Contributor

jenkins test sanity zlinux jdk19

@gacholio
gacholio merged commit 2e4e8f9 into eclipse-openj9:master Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants