-
Notifications
You must be signed in to change notification settings - Fork 721
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
Disable safe point OSR if sampled object allocate hook is used #17314
Conversation
Use of the can_generate_sampled_object_alloc_events JVMTI capability must disable safe point OSR because the event would be sent when not at an OSR safe point, leading to assertions or hangs. Fixes: eclipse-openj9#16480 Signed-off-by: Graham Chapman <[email protected]>
jenkins test sanity win jdk8 |
jenkins test sanity alinux64 jdk19 |
What does "safe point OSR" mean exactly ? From the JIT perspective we are either in "voluntary OSR" mode (e.g. when HCR is enabled, i.e. our current default) or "involuntary OSR" mode (e.g. used when debug is enabled). Are we saying that this change will put us into involuntary OSR mode (where previously we would have been in voluntary OSR mode) if the relevant allocate hook mentioned earlier is used, or does it mean something else ? |
The safe point optimization means we can not OSR at an object allocation point - it has nothing to do with voluntary or not. I gather it was a savings on OSR code / metadata. |
Having fewer program points where OSR is allowed is indeed a savings in code/metadata size and also better in terms of JIT code quality (leads to better throughput). I think I agree that having allocations be (additional) OSR points probably won't result in much performance degradation and so can be done if we need to for that JVMTI capability. I hope that the JIT is set up to check for changes in what is or isn't an OSR point, i.e. that there won't be any functional concerns @hzongaro |
There's a command line option to disable this already, but we don't run any testing with it, so it's possible that errors might creep into that path. |
Also, this determination is made before any code generation and will not change throughout the run. |
Can this be merged? |
Use of the
can_generate_sampled_object_alloc_events
JVMTI capability must disable safe point OSR because the event would be sent when not at an OSR safe point, leading to assertions or hangs.Fixes: #16480