From Alan.Bateman at oracle.com Fri Sep 24 06:41:24 2021 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Fri, 24 Sep 2021 07:41:24 +0100 Subject: Porting Loom to additional architectures Message-ID: <4116f462-0e0a-3ffc-930f-1379b072c820@oracle.com> Porters, In Project Loom we expect to have one, maybe two, draft JEPs in the coming months to propose the Virtual Threads feature. We think the current implementation is far enough along, and stable enough, to start ports to other architectures. As things stands, the repo has ports to x64 and aarch64 on the usual operating systems (Linux, macOS, and Windows). Oracle engineers are not planning to work on 32-bit x86 or other architectures. It's too early to talk about dates or releases but we think the underlying implementation is stable enough to make progress on additional ports. A port to 32-bit x86 is not required to go into the main line but it will lead to build breakage if it isn't contributed in advance.? I think with Project Panama that some ports (32-bit ARM?) were done after the initial integration, and that can work here too. In terms of size, there are currently ~4200 lines of x64 specific code, and ~1800 lines of aarch64 specific code. There is more x64 code because it has an oopmap stub generator. The tests run in the existing tiers. This is just a heads-up up for now, it's probably best to follow up on loom-dev with questions. -Alan. From shade at redhat.com Fri Sep 24 09:50:39 2021 From: shade at redhat.com (Aleksey Shipilev) Date: Fri, 24 Sep 2021 11:50:39 +0200 Subject: Porting Loom to additional architectures In-Reply-To: <4116f462-0e0a-3ffc-930f-1379b072c820@oracle.com> References: <4116f462-0e0a-3ffc-930f-1379b072c820@oracle.com> Message-ID: On 9/24/21 8:41 AM, Alan Bateman wrote: > In Project Loom we expect to have one, maybe two, draft JEPs in the > coming months to propose the Virtual Threads feature. We think the > current implementation is far enough along, and stable enough, to start > ports to other architectures. Okay, good. I can take a look at x86_32. What is the usual criteria for "passing" Loom implementation? In other words, what tests should pass to say that the port is good? -- Thanks, -Aleksey From Alan.Bateman at oracle.com Fri Sep 24 11:08:08 2021 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Fri, 24 Sep 2021 12:08:08 +0100 Subject: Porting Loom to additional architectures In-Reply-To: References: <4116f462-0e0a-3ffc-930f-1379b072c820@oracle.com> Message-ID: <221aa01a-3433-c760-f562-9a02baa32d7c@oracle.com> On 24/09/2021 10:50, Aleksey Shipilev wrote: > > Okay, good. > > I can take a look at x86_32. > > What is the usual criteria for "passing" Loom implementation? In other > words, what tests should pass to say that the port is good? > Eventually all tests should pass. A more targetted subset to run is test/jdk/:jdk_lang test/hotspot/jtreg/runtime/vthread test/hotspot/jtreg/serviceability/jvmti/vthread and maybe test/jdk/jdk/internal/vm/Continuation for the initial runs once you have something running. -Alan From shade at redhat.com Fri Sep 24 17:07:43 2021 From: shade at redhat.com (Aleksey Shipilev) Date: Fri, 24 Sep 2021 19:07:43 +0200 Subject: Porting Loom to additional architectures In-Reply-To: <221aa01a-3433-c760-f562-9a02baa32d7c@oracle.com> References: <4116f462-0e0a-3ffc-930f-1379b072c820@oracle.com> <221aa01a-3433-c760-f562-9a02baa32d7c@oracle.com> Message-ID: On 9/24/21 1:08 PM, Alan Bateman wrote: > On 24/09/2021 10:50, Aleksey Shipilev wrote: >> I can take a look at x86_32. >> >> What is the usual criteria for "passing" Loom implementation? In other >> words, what tests should pass to say that the port is good? >> > Eventually all tests should pass. A more targetted subset to run is > > test/jdk/:jdk_lang > test/hotspot/jtreg/runtime/vthread > test/hotspot/jtreg/serviceability/jvmti/vthread > > and maybe test/jdk/jdk/internal/vm/Continuation for the initial runs > once you have something running. All right, thanks. I doing x86_32 here: https://github.com/openjdk/loom/pull/65 x86_32 is basically a gateway for 32/64 bit cleanliness, as you can see from the multiple format string changes. If we do ARM32 port, most of this should be fixed anyway. I also see there is plenty of commented code in the Loom files, long lines, especially around logging and asserts, etc. Since porting work would probably copy-paste some of that, I think cleaning up x86_64 code would be beneficial for everyone. -- Thanks, -Aleksey From shade at redhat.com Sat Sep 25 16:38:50 2021 From: shade at redhat.com (Aleksey Shipilev) Date: Sat, 25 Sep 2021 18:38:50 +0200 Subject: Porting Loom to additional architectures In-Reply-To: References: <4116f462-0e0a-3ffc-930f-1379b072c820@oracle.com> <221aa01a-3433-c760-f562-9a02baa32d7c@oracle.com> Message-ID: <16a364ff-f6f1-311f-7e3f-09bc9139fc51@redhat.com> On 9/24/21 9:26 PM, Ron Pressler wrote: > I?ll get to cleaning up the code soon. > > There?s no need to implement oopMapStubGenerator. It is not currently used, and will likely be deleted > unless we find some use for it (it?s the result of an early implementation, abandoned once we switched > to stack chunks). OK, that's good to know. That is one major source of x86_32 build failures. If you don't use it, could you please "#if 0" it? -- Thanks, -Aleksey From shade at redhat.com Mon Sep 27 06:13:12 2021 From: shade at redhat.com (Aleksey Shipilev) Date: Mon, 27 Sep 2021 08:13:12 +0200 Subject: Porting Loom to additional architectures In-Reply-To: <16a364ff-f6f1-311f-7e3f-09bc9139fc51@redhat.com> References: <4116f462-0e0a-3ffc-930f-1379b072c820@oracle.com> <221aa01a-3433-c760-f562-9a02baa32d7c@oracle.com> <16a364ff-f6f1-311f-7e3f-09bc9139fc51@redhat.com> Message-ID: <53f2fe81-e192-0134-7492-bdfb577eb5c8@redhat.com> On 9/25/21 6:38 PM, Aleksey Shipilev wrote: > On 9/24/21 9:26 PM, Ron Pressler wrote: >> I?ll get to cleaning up the code soon. >> >> There?s no need to implement oopMapStubGenerator. It is not currently used, and will likely be deleted >> unless we find some use for it (it?s the result of an early implementation, abandoned once we switched >> to stack chunks). > > OK, that's good to know. That is one major source of x86_32 build failures. If you don't use it, > could you please "#if 0" it? Here: https://github.com/openjdk/loom/pull/66 -- Thanks, -Aleksey