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

Enable Field Watch Support for Power (doc) #6234

Merged
merged 2 commits into from
Jul 4, 2019

Conversation

AlenBadel
Copy link
Contributor

This commit enables support for field watch on Power, and proposes some minor clean up.

Signed-off-by: Alen Badel [email protected]

@AlenBadel
Copy link
Contributor Author

AlenBadel commented Jun 21, 2019

Issue: #3422

Prerequisite: eclipse-omr/omr#4068

@AlenBadel
Copy link
Contributor Author

FYI: @gita-omr @zl-wang @fjeremic @dchopra001

Still working on some final formatting. I've put this up for review for discussion.

@gita-omr
Copy link
Contributor

Jenkins test sanity aix,plinux jdk8,jdk11

runtime/compiler/x/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/z/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/z/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/p/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/p/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
@AlenBadel AlenBadel force-pushed the fieldwatch_rel branch 3 times, most recently from 94c2aaa to e9031a8 Compare June 22, 2019 02:43
runtime/compiler/x/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/z/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/codegen/J9WatchedStaticFieldSnippet.cpp Outdated Show resolved Hide resolved
runtime/compiler/p/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/p/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/p/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/p/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/p/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
@AlenBadel AlenBadel force-pushed the fieldwatch_rel branch 2 times, most recently from fb25f8c to 68894cd Compare June 22, 2019 19:22
@gita-omr
Copy link
Contributor

Jenkins test sanity plinux jdk8

runtime/compiler/aarch64/codegen/J9TreeEvaluator.hpp Outdated Show resolved Hide resolved
runtime/compiler/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/codegen/J9TreeEvaluator.hpp Outdated Show resolved Hide resolved
runtime/compiler/control/J9Options.cpp Outdated Show resolved Hide resolved
runtime/compiler/p/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/p/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/p/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
runtime/compiler/p/codegen/J9TreeEvaluator.hpp Outdated Show resolved Hide resolved
runtime/compiler/z/codegen/J9TreeEvaluator.cpp Outdated Show resolved Hide resolved
@dchopra001
Copy link
Contributor

Along with some questions/suggestions about the code, I've left comments suggesting some form and general cleanup. I'll take another pass once @AlenBadel gets a chance to address the current batch.

@gita-omr The changes made here affects X and Z codgens as well, should we run tests on those platforms as well?

@gita-omr
Copy link
Contributor

gita-omr commented Jun 22, 2019

@gita-omr The changes made here affects X and Z codgens as well, should we run tests on those platforms as well?

Yes, it was just a sniff test on pLinux. Thanks a lot for all the comments! I think I agree with most of them. I am not sure about the inlining though. I think even if function is called only once it makes the logic much more clear in the caller.

@AlenBadel AlenBadel force-pushed the fieldwatch_rel branch 2 times, most recently from 9fa33f4 to 67d5e0c Compare June 23, 2019 02:48
Copy link
Contributor

@fjeremic fjeremic left a comment

Choose a reason for hiding this comment

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

Approving assuming we'll do a final squash.

@dchopra001
Copy link
Contributor

dchopra001 commented Jun 27, 2019

Quick question: are we going to be running the tests after #6257 has merged? Or will we be running the tests locally?

@gita-omr
Copy link
Contributor

Quick question: are we going to be running the tests after this: #6257 has merged? Or will we be running the tests locally?

Both. While Jenkins is running on tests, @AlenBadel is working on running locally.

@fjeremic
Copy link
Contributor

Jenkins test extended all jdk8,jdk11

@AlenBadel
Copy link
Contributor Author

Thanks for the feedback during the review. Everything looks to be resolved, so I'm squashing the commits.

@AlenBadel AlenBadel force-pushed the fieldwatch_rel branch 3 times, most recently from a87dba1 to c38be2a Compare June 28, 2019 01:24
@pshipton
Copy link
Member

Jenkins test sanity,extended all jdk8,jdk11

@AlenBadel
Copy link
Contributor Author

AlenBadel commented Jun 28, 2019

Taking a look at the aix failure.

@gita-omr
Copy link
Contributor

in runtime/codert_vm/pnathelp.m4:

SLOW_PATH_ONLY_HELPER_NO_RETURN_VALUE(jitReportInstanceFieldWrite,3)

after tracking backward it seems it eventually calls CALL_C_WITH_VMTHREAD, which is defined as:

define({CALL_C_WITH_VMTHREAD},{
mr r3,J9VMTHREAD
CALL_DIRECT($1)
})

@gacholio will this work with AIX linkage (function pointer has to be dereferenced) and why VMThread?

@gacholio
Copy link
Contributor

Yes, all of this works on AIX (we build it every night). All of the helpers take only the vmThread as the argument, assuming the the register args have been spilled into the ELS save area.

@gita-omr
Copy link
Contributor

@AlenBadel investigated and found that AIX test cases pass with IBM JDK but not with openj9 build. Also, he spoke with Joe, and Joe mentioned that OpenJ9 uses XL C 13.1 while IBM SDK uses 12.

I guess stepping through the debugger is the only way to figure it out.

@AlenBadel
Copy link
Contributor Author

@gacholio
The JIT is successfully reading the fieldClass flags to determine if the field is being watched, and we only branch into into the helper when J9ClassHasWatchedFields is high.
However when entering into the helper on the VM side it's determining that no flags are set.

Inside
void* J9FASTCALL old_slow_jitReportStaticFieldRead(J9VMThread *currentThread)
When evaluating
if (J9_ARE_ANY_BITS_SET(fieldClass->classFlags, J9ClassHasWatchedFields))
The dataBlock address was correctly passed. The fieldClass address was correctly obtained. The flags not so much.
fieldClass->classFlags returns that J9ClassHasWatchedFields was not set.

@AlenBadel
Copy link
Contributor Author

#6234 (comment) is no longer the case. Please ignore.

I've isolated the issue and will be pushing a fix sometime today.

@AlenBadel AlenBadel force-pushed the fieldwatch_rel branch 2 times, most recently from dabbac1 to ea33c64 Compare July 3, 2019 19:53
@pshipton
Copy link
Member

pshipton commented Jul 3, 2019

Jenkins test sanity,extended all jdk8,jdk11

Alen Badel added 2 commits July 3, 2019 21:19
This commit enables support for field watch on Power and performs minor cleanup of Concurrent Scavenger.

Signed-off-by: Alen Badel <[email protected]>
@AlenBadel
Copy link
Contributor Author

The sanity build results from #6234 (comment)
are https://ci.eclipse.org/openj9/job/PullRequest-OpenJ9/685/

All passed other than
Test TestAttachErrorHandling_SE80_0

On AIX Java11/Java8 Fails with:

 Caused by: java.net.SocketTimeoutException: Accept timed out
18:00:54      at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
18:00:54      at java.net.ServerSocket.implAccept(ServerSocket.java:545)
18:00:54      at java.net.ServerSocket.accept(ServerSocket.java:513)
18:00:54      at com.ibm.tools.attach.attacher.OpenJ9VirtualMachine.tryAttachTarget(OpenJ9VirtualMachine.java:478)

It's a known issue on AIX.
See #3081

So this PR is safe to merge.

@gita-omr gita-omr merged commit d95c619 into eclipse-openj9:master Jul 4, 2019
@gita-omr
Copy link
Contributor

gita-omr commented Jul 4, 2019

@DanHeidinga @pshipton considering the PR is merged, do you think it would be too late to include into 0.15? The only reason really is that it would be nice to ship the same feature together with Z. We also wanted to write a blog about it.

@pshipton
Copy link
Member

pshipton commented Jul 4, 2019

@gita-omr given this feature missed the feature complete (branch) date and milestone 1, and there doesn't seem to be a compelling reason to put it in this late, I think it can wait for the next release.

@DanHeidinga
Copy link
Member

@gita-omr I think it's too late. This PR is large and was merged yesterday which doesn't give it a lot of time to for any hard to reproduce or intermittent issues to be found and resolved.

The 0.15.0 milestone 1 build is being prepared now so the window for larger changes has closed. Sorry.

We also wanted to write a blog about it.

This is a great idea regardless of which release it goes in. Looking forward to reading it.

@pshipton pshipton changed the title Enable Field Watch Support for Power Enable Field Watch Support for Power (doc) Jul 10, 2019
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.