The aim of this issue is to track progress on implementing a full JIT for RISC-V architecture.
The OMR part of the JIT is reasonably stable. For the J9 part of the JIT, the idea is to essentially to follow
the path of AArch64 port as it proved successful.
FYI: @ChengJin01 , @0xdaryl
FYI: @DanHeidinga, @tajila, @pshipton, @knn-k, @mstoodle
As first steps, I mean to:
Set up (and document) a development environment, including IDE, to work on J9 JIT. The issue is that there's no CMake support for RISC-V and generally no cross-compilation support for CMake. Some work has been done (#10915, #11054) but I'd probably have to resort to using UMA for compilation and testing and CMake for IDE.
Go over all PRs adding AArch64 port to better understand what has been done and in what order.
Have an initial kick-off hacking session in couple weeks to get more hands-on experience with the code (as opposed to just read existing code)
Thanks for creating this issue @janvrany! As we discussed last week, I'm happy to meet with you regularly (and open it up to anyone else who wants to participate) to help you understand the code, answer questions, and guide your implementation. If interested, ping me on Slack and we'll set something up and announce it here.
Looking at the list of all arch:aarch64-tagged PRs might be a bit overwhelming and the detail too fine-grained to help you understand the bigger picture of what needs to be done and how it all fits together. Which is why I committed to producing a higher-level roadmap like we followed for AArch64. This issue might be the perfect spot for that.
@sxa fyi
Look at the following for the list of PRs that were merged for AArch64 JIT in OpenJ9:
@pshipton Thanks for the tag.
I'd be interested in at least following any progress on this so if you have any calls @0xdaryl I'd appreciate an invite too as I'd love to have a working JIT in OpenJ9 :-)
Hi @janvrany ,
Thanks for this issue, I want to know about the hacking session you said and I will very honoured to have the opportunity to participate in this session.
Is this session a zoom meeting and how can I join this session?
Thanks a lot!
Hi, @zdlgv5
I'm sorry, I did not mean anything big on zoom, merely that I'll lock myself up in the office and play with the code o my own to get better understanding. After that, I hope can have meaningful call with @0xdaryl and anyone interested where we can discuss next steps. Is that OK?
After a discussion with @0xdaryl, we decided to have RISC-V OpenJ9 JIT meeting on Tuesday, Dec 8 2020, 9:30 AM - 11:30 AM EST: https://ibm.webex.com/ibm/j.php?MTID=mdcdaf7a65f60dbf9038484bda47f6245
Everyone interested is welcome to join this meeting.
Also OpenJ9 slack, channel #risc-v for more interactive conversations. Again, everyone interested is welcome to join!
Hello @janvrany! I am having trouble accessing the slack channel, and it appears locked, is there any way I would be able to join it with the email [email protected]?
hi @janvrany ,
Thanks for your reply!
May I be able to join the OpenJ9 slack with the email [email protected]?
Hi @cobyforrester & @zdlgv5 ,
The #risc-v channel in Eclipse OpenJ9 (Slack) is open for public. Please feel free to join with the e-mail you prefer to offer.
Hi @cobyforrester,
I tried to add you in the channel but ended up with error like "already in the workspace". Could you offer another e-mail address for me to try again?
Hi @janvrany , I cowork with @zdlgv5 now, may I join the slack with [email protected]? Thanks!
@mayeths , @cobyforrester , @zdlgv5:
I'm sorry I do not know how I can add you to that channel. You can join the slack instance by clicking to the link on "Join OpenJ9 slack" on https://www.eclipse.org/openj9/
From there, you should be able to join the channel.
Hi @mayeths, I just added you in the channel.
Hi @mayeths, I just added you in the channel.
Received invite, thanks @ChengJin01
@mayeths , @cobyforrester , @zdlgv5:
I'm sorry I do not know how I can add you to that channel. You can join the slack instance by clicking to the link on "Join OpenJ9 slack" on https://www.eclipse.org/openj9/
From there, you should be able to join the channel.
I have joined in the channel, thanks @ChengJin01 @janvrany
Last week I managed to compile openk9-openjdk-11 with openj9 JIT component (libj9jit29.so) using CMake. It is just a skeleton, but it does compile and the VM starts (and segfaults in JIT thread because of lack of private linkage).
It is not much, but at least gives us a defined starting point that compiles.
Some changes to OMR were required, they're reasonably OK so I'll start upstreaming them this and next week.
I'd like to thank to @knn-k , @ChengJin01 and @dnakamura who helped me with this first little step.
@janvrany Great to hear! When you put the changes in can you link to the PRs in this issue too?
@sxa : sure thing!
FYI… Apologies for the late notice, but I need to push the start time of our discussion tomorrow out 30 minutes to 10am EST. I have a scheduling conflict that unfortunately can’t be changed.
Our next scheduled discussion will be Tuesday Jan 12 @ 7am EST. https://ibm.webex.com/ibm/j.php?MTID=m37dc73c6c1ff8e79c39c18364d66df73 All are welcome.
For those interested, here you may find my work-in-progress code on RISC-V JIT:
git checkout -b jv/riscv-devel https://github.com/janvrany/openj9-openjdk-jdk11 openj9-openjdk-jdk11
git checkout -b jv/riscv-devel https://github.com/janvrany/openj9 openj9-openjdk-jdk11/openj9
git checkout -b jv/riscv-devel https://github.com/janvrany/omr openj9-openjdk-jdk11/omr
git checkout -b jv/riscv-devel https://github.com/janvrany/openj9-openjdk-jdk11-devscripts
The above has enough to JIT-compile a simple method like:
public static meaningOfLife() {
return 42;
}
It uses CMake to build OpenJ9 and support cross-compilation (though I have tried only cross-compiling from x86_64 Debian 11).
In next weeks, I'll try to upstream all the changes.
...or slightly more complicated method like:
static double jitDadd(double a, double b) {
return a + b;
}
We are scheduled to have a RISC-V JIT discussion call tomorrow. Given @janvrany's focus on upstreaming the changes he has completed so far we don't have anything to discuss from his perspective tomorrow.
However, I am willing to keep the call if anyone wants to discuss anything or ask any questions. Just reply here...
In the meantime, for those that are interested in contributing to this effort and need more background on general OpenJ9 JIT code generator concepts, there are a couple of videos available (approx 1 hour each) that should help to familiarize you with some of the concepts, terminology, and components you'll need to better understand the code.
https://www.youtube.com/watch?v=PRphJuGg3bs
https://www.youtube.com/watch?v=2r4u0RKPTps
Questions are welcome any time.
No discussion topics or questions have come forward. We’ll cancel this session. I’m happy to schedule a new one when there is interest.
My idea is to first upstream changes to OMR, bit by bit and then start upstreaming OpenJ9 changes. Curently these are in a queue: https://github.com/eclipse/omr/pull/5740 and https://github.com/eclipse/omr/pull/5741.
There's one thing I'd welcome a help. As I said, I use CMake to cross-compile OpenJ9 for RISC-V. I did the initial work to make it working (for me), see:
I'd appreciate if someone would take these as and inspiration and take care of upstreaming these changes. I do not have knowledge of the build system and all the little details and other platform limitations...
Hi @janvrany, I will discuss this with @0xdaryl, @mstoodle and the VM leaders next week how to deal with all these changes on your side.
Theoretically, I will take over all your work from there as I am in charge of this project but some details need be figured out as how to get this working in the scheduled meeting.
Ping
Most helpful comment
Last week I managed to compile openk9-openjdk-11 with openj9 JIT component (
libj9jit29.so) using CMake. It is just a skeleton, but it does compile and the VM starts (and segfaults in JIT thread because of lack of private linkage).It is not much, but at least gives us a defined starting point that compiles.
Some changes to OMR were required, they're reasonably OK so I'll start upstreaming them this and next week.
I'd like to thank to @knn-k , @ChengJin01 and @dnakamura who helped me with this first little step.