Loom Pinning: Manage J9VMThread->ownedMonitorCount - #15487
Merged
Conversation
babsingh
force-pushed
the
loom_pin_support_v1
branch
3 times, most recently
from
July 5, 2022 16:59
e3eb868 to
b56500e
Compare
babsingh
marked this pull request as ready for review
July 5, 2022 22:41
gacholio
reviewed
Jul 6, 2022
Contributor
Author
|
@gacholio The counter updates have been moved closer to modification of the lockword. Below is a summary of all places where the counter is incremented and decremented. Note: New changes have been added as a separate commit. Once the changes are final, the commits will be squashed. monitor entry points:
monitor exit points:
|
babsingh
commented
Jul 12, 2022
gacholio
approved these changes
Jul 14, 2022
Contributor
|
jenkins compile win jdk8 |
Contributor
|
jenkins test sanity xlinux jdknext |
In order to support if a Continuation is pinned, ownedMonitorCount is
- incremented when a monitor is successfully acquired; and
- decremented when a monitor is successfully released.
ownedMonitorCount is updated closer to the lockword modification.
monitor entry points:
1. ObjectMonitor.hpp::inlineFastObjectMonitorEnter
- inlineFastInitAndEnterMonitor: increment counter
2. ObjectMonitor.hpp::objectMonitorEnterNonBlocking
- flat / lock reservation case: increment counter
- spinOnFlatLock
- inlineFastInitAndEnterMonitor: increment counter
- spinOnTryEnter
- inflated case: increment counter
3. ObjectMonitor.hpp::objectMonitorEnterBlocking:
- inflated case: increment counter
- inlineFastInitAndEnterMonitor: increment counter
monitor exit points:
1. ObjectMonitor.hpp::inlineFastObjectMonitorExit: decrement counter
2. monhelpers.c::objectMonitorExit: decrement counter
ownedMonitorCount will be reset when a Continuation is mounted and
unmounted.
Related: eclipse-openj9#15174
Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh
force-pushed
the
loom_pin_support_v1
branch
from
July 15, 2022 00:29
31a91c6 to
4f2e184
Compare
Contributor
Author
|
Squashed the commits. All builds have passed and should still be valid. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to support if a
Continuationis pinned,ownedMonitorCountisownedMonitorCountis updated closer to thelockwordmodification.monitor entry points:
ObjectMonitor.hpp::inlineFastObjectMonitorEnterinlineFastInitAndEnterMonitor: increment counterObjectMonitor.hpp::objectMonitorEnterNonBlockingspinOnFlatLockinlineFastInitAndEnterMonitor: increment counterspinOnTryEnterObjectMonitor.hpp::objectMonitorEnterBlocking:inlineFastInitAndEnterMonitor: increment countermonitor exit points:
ObjectMonitor.hpp::inlineFastObjectMonitorExit: decrement countermonhelpers.c::objectMonitorExit: decrement counterownedMonitorCountwill be reset when aContinuationis mounted andunmounted.
Related: #15174
Signed-off-by: Babneet Singh sbabneet@ca.ibm.com