<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="en-DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">the port passes now the basic continuation tests jdk/jdk/internal/vm/Continuation/Basic.java<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">with UseContinuationFastPath disabled.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Actually all tests in hotspot_loom and jdk_loom succeed except for 2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">of them where the held monitor count is wrong (potentially caused by [1]) and<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">another one with a method that is not compileable.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">The current version can again be found here: https://github.com/reinrich/loom/commits/ppc_port<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Richard.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">[1] https://bugs.openjdk.org/browse/JDK-8286957<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Reingruber, Richard <richard.reingruber@sap.com><br>
<b>Date: </b>Thursday, 2. June 2022 at 13:38<br>
<b>To: </b>jdk-dev <jdk-dev@openjdk.java.net>, porters-dev@openjdk.java.net <porters-dev@openjdk.java.net>, loom-dev@openjdk.java.net <loom-dev@openjdk.java.net><br>
<b>Subject: </b>State of the ppc64le port of JEP 425: Virtual Threads (Preview)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hi,<br>
<br>
I learned today that preview features _must_ be implemented by a port in an<br>
OpenJDK release [1].<br>
<br>
Unfortunately I have to inform you that I don't think the ppc64le port I'm<br>
currently working on will be ready in the JDK19 time frame.<br>
<br>
When I started the work (Jan. or Dec. I think) I expected to finish it before<br>
summer. Even after the last status update [2] I thought I could make it. But<br>
with the difficulties I still experience and being 6-8 weeks out of office in<br>
summer it is now rather unlikely. And until this morning myself (and actually<br>
also my colleagues) assumed this would only be a minor issue.<br>
<br>
Current Status of the Port:<br>
<br>
* UseContinuationFastPath is disabled<br>
<br>
* Basic tests where sequences of interpreted and compiled frames with quite some<br>
  variations are frozen and thawed succeed.<br>
  <br>
* GC with stack chunks on the java heap succeed.<br>
<br>
* Basic exception handling tests succeed.<br>
<br>
* Basic tests exercising compiled java calls with stack arguments succeed but<br>
  need to be revisited because there are issues.<br>
<br>
[3] is a selection of test cases that I use in development.<br>
[4] is the most recent version of the ppc64le port<br>
<br>
Main Technical Problems<br>
<br>
* Shared code makes use of the 'unextended sp' of java frames. This breaks the<br>
  platform abstraction as it makes assumptions on where to find, e.g., stack<br>
  arguments relative to the unextended sp.<br>
  <br>
* There are non-obvious interdependencies in the code which make it difficult to<br>
  fix an issue. In an attempt to fix a problem I often have regressions because<br>
  I missed adaptations of dependent parts. And then it it is extremely tedious<br>
  to find the cause of the regression running tests and analyzing very long<br>
  trace output.<br>
<br>
* Currently I see that the handling of stack arguments of compiled java methods<br>
  works in quite some cases (see [3]) but there are cases where it<br>
  doesn't. Trying alternative approaches means going through the tedious and<br>
  time consuming process described above.<br>
  <br>
* Lack of documentation. Heavily templatized implementation.<br>
<br>
These problems (except the last) could not be foreseen. From a high level the<br>
port simply needs to copy frames between stack and heap and provide some<br>
assembler glue code. As I know now it is actually a high effort to get the<br>
deatils tuned right.<br>
<br>
Thanks, Richard.<br>
<br>
[1] Ports _must_ implement preview features in thread "What should the relationship between ports and developers of large projects be?"<br>
    <a href="https://mail.openjdk.java.net/pipermail/jdk-dev/2022-May/006635.html">
https://mail.openjdk.java.net/pipermail/jdk-dev/2022-May/006635.html</a><br>
[2] State of the ppc64le loom port as of April 14<br>
    <a href="https://mail.openjdk.java.net/pipermail/loom-dev/2022-April/004197.html">
https://mail.openjdk.java.net/pipermail/loom-dev/2022-April/004197.html</a><br>
[3] BasicExp.java tests driving development of the port<br>
    <a href="https://github.com/reinrich/loom/blob/3286bc8b72401dbccac59c994919fc425a51cb52/test/jdk/jdk/internal/vm/Continuation/BasicExp.java">
https://github.com/reinrich/loom/blob/3286bc8b72401dbccac59c994919fc425a51cb52/test/jdk/jdk/internal/vm/Continuation/BasicExp.java</a><br>
[4] Most recent version of the ppc64le loom port<br>
    <a href="https://github.com/reinrich/loom/commits/ppc_port">https://github.com/reinrich/loom/commits/ppc_port</a><o:p></o:p></span></p>
</div>
</div>
</body>
</html>