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

Handle monitor enter/exit on value based instances (X86) #11358

Merged
merged 2 commits into from
Dec 17, 2020

Conversation

a7ehuo
Copy link
Contributor

@a7ehuo a7ehuo commented Dec 3, 2020

Add areValueBasedMonitorChecksEnabled which calls VM to check if value based class monitor check is enabled.

Add isValueBasedClass and isMonitorValueBased to determine if a monitor object is a value based class instance.

If the monitor object type is value based class, VM will either issue a warning or throw an exception
based on -XX:ValueBasedClassCheck option.

If the monitor object type is unkonwn, insert a runtime memory check in monitor enter/exit on the class flag J9ClassIsValueBased.

If the monitor object type is not value based class, proceed as how it is handled today.

Related to JEP390 #10620

@a7ehuo
Copy link
Contributor Author

a7ehuo commented Dec 3, 2020

@hzongaro Henry, could you help review this one? Thanks!

Copy link
Member

@hzongaro hzongaro left a comment

Choose a reason for hiding this comment

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

Looks pretty good. Just a couple of comments.

runtime/compiler/codegen/J9CodeGenerator.hpp Outdated Show resolved Hide resolved
runtime/compiler/codegen/J9CodeGenerator.cpp Show resolved Hide resolved
runtime/compiler/env/J9ObjectModel.hpp Show resolved Hide resolved
runtime/compiler/x/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/x/codegen/J9TreeEvaluator.hpp Outdated Show resolved Hide resolved
@a7ehuo a7ehuo force-pushed the jep390-valuedbased-x86-2 branch 3 times, most recently from ea1a96f to a9e5929 Compare December 9, 2020 16:46
@a7ehuo
Copy link
Contributor Author

a7ehuo commented Dec 9, 2020

Henry @hzongaro All comments addressed. Ready for another review. Thanks!

Copy link
Member

@hzongaro hzongaro left a comment

Choose a reason for hiding this comment

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

Looks good!

@a7ehuo
Copy link
Contributor Author

a7ehuo commented Dec 11, 2020

@0xdaryl May I ask you to review this one? Thanks!

@0xdaryl 0xdaryl self-assigned this Dec 14, 2020
runtime/compiler/codegen/J9CodeGenerator.cpp Outdated Show resolved Hide resolved
runtime/compiler/env/J9ClassEnv.cpp Outdated Show resolved Hide resolved
runtime/compiler/x/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
Add `areValueBasedMonitorChecksEnabled` which calls VM
to check if value based class monitor check is enabled.
Add `isValueBasedClass` and `isMonitorValueBased` to
determine if a monitor object is a value based class
instance.

Related to JEP390

Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
If the monitor object type is value based class, VM
will either issue a warning or throw an exception
based on -XX:ValueBasedClassCheck option.

If the monitor object type is unkonwn, insert a runtime
memory check in monitor enter/exit on the class flag
J9ClassIsValueBased.

If the monitor object type is not value based class,
proceed as how it is handled today.

Value based class and value type are mutually exclusive.

Related to JEP390

Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
@0xdaryl
Copy link
Contributor

0xdaryl commented Dec 16, 2020

Jenkins test sanity,extended xlinuxval jdknext

@0xdaryl
Copy link
Contributor

0xdaryl commented Dec 16, 2020

Jenkins test sanity all jdknext

@0xdaryl 0xdaryl merged commit 1541ca6 into eclipse-openj9:master Dec 17, 2020
@a7ehuo a7ehuo deleted the jep390-valuedbased-x86-2 branch February 4, 2021 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants