<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 27/07/2023 17:20, Gavin Ray wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAFtvWZMe_YYFhO+gvUyQJW8_u_8WhwZScZqWXM0-UQKwJfQ9_g@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">Amazing, congrats to all involved!
<div><br>
</div>
<div>What are the odds that "RecordMapper" and "Improve
ability to visualize MemorySegments" will be available in
the stable release?</div>
</div>
</div>
</blockquote>
<p>I think our thinking around the mapper is in constant evolution,
and we're now considering a bi-directional mapper that does both
get AND set.</p>
<p>This allows applications to e.g. read bytes in a buffer as
records, then to some work in the record domain, then commit all
the records back to the buffer. We believe such an usage would
unlock many serialization-like use cases.</p>
<p>Also, such a feature would work in harmony with some of the
proposed enhancements to records, such as ability to create
immutable copies:</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/openjdk/amber-docs/blob/master/eg-drafts/reconstruction-records-and-classes.md">https://github.com/openjdk/amber-docs/blob/master/eg-drafts/reconstruction-records-and-classes.md</a></p>
<p>I believe this work is important enough that it would be better
off separated from the main FFM API JEP, and proceed orthogonally.</p>
<p>Cheers<br>
Maurizio<br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:CAFtvWZMe_YYFhO+gvUyQJW8_u_8WhwZScZqWXM0-UQKwJfQ9_g@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>
<div><a href="https://urldefense.com/v3/__https://github.com/openjdk/panama-foreign/pull/833__;!!ACWV5N9M2RV99hQ!NVtXVaZhncXaAXyT8ZvSUvYj4JS-DdoRrvH53UvEwHHiwsmD1EOAsaplsPSoIYbU0PVju2k1m39S9IdnJ2utUlqIiQcx$" moz-do-not-send="true">https://github.com/openjdk/panama-foreign/pull/833</a></div>
<div><a href="https://urldefense.com/v3/__https://github.com/openjdk/panama-foreign/pull/695__;!!ACWV5N9M2RV99hQ!NVtXVaZhncXaAXyT8ZvSUvYj4JS-DdoRrvH53UvEwHHiwsmD1EOAsaplsPSoIYbU0PVju2k1m39S9IdnJ2utUrZJMyxQ$" moz-do-not-send="true">https://github.com/openjdk/panama-foreign/pull/695</a></div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Jul 27, 2023 at
10:25 AM Chris Vest <<a href="mailto:mr.chrisvest@gmail.com" moz-do-not-send="true" class="moz-txt-link-freetext">mr.chrisvest@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">This is excellent news.
<div>Congratulations to the team on the big milestone!</div>
<div><br>
</div>
<div>Chris</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Jul 27, 2023 at
6:58 AM Maurizio Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">maurizio.cimadamore@oracle.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hi all,<br>
As you know, the FFM API has been a Preview API since Java
19 [1]. The <br>
API was then re-previewed in 20 [2] and 21 [3]. Some of
enhancements <br>
delivered in this timeframe were:<br>
<br>
* Unification of memory segments and memory addresses [4]<br>
* Treat arenas as "capabilities", so that memory segments
can be safely <br>
shared [5, 6]<br>
* Allow for custom arenas [5, 6]<br>
* Add ways to customize linkage requests [7]<br>
* Add fallback linker, to facilitate porting FFM API to
all platforms [8]<br>
<br>
We now believe that the FFM API is largely stable, and
that, modulo <br>
disasters :-), it should exit preview in the next Java SE
release:<br>
<br>
<a href="https://openjdk.org/jeps/8310626" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://openjdk.org/jeps/8310626</a><br>
<br>
We have already started accumulating some changes in the
panama <br>
repository which aim at polishing some minor edges in the
API:<br>
<br>
* Add better support for "wide" native strings [9]<br>
* Make var handles derived from layouts more composable
[10]<br>
* Add a linker method that can be used to discover
platform-dependent <br>
mapping between C types and layouts [11]<br>
<br>
These changes are fairly minor, and should not have a big
impact (if any <br>
at all) on existing code using the FFM API.<br>
<br>
Of course, the fact that FFM API is headed for
finalization doesn't mean <br>
that development on FFM API will stop. There are several
enhancements <br>
(aside from "regular" performance fixes) that we have been
discussing <br>
over the years which can be delivered as follow-up JEPs:<br>
<br>
* Support for unsigned/complex types (needs Valhalla)<br>
* Mapping between structs and records [12]<br>
* Integration between Linker and JNI [13]<br>
* Structured arenas (depends on finalization of
StructuredTaskScope) [14]<br>
* Pinning of heap segments<br>
<br>
(Of course, we have made sure that all the above
enhancement can be <br>
delivered in an additive fashion, e.g. without the need to
make <br>
incompatible changes to the FFM API)<br>
<br>
Finally, we'd like to thank all the developers who, over
the years, have <br>
taken the time to take the API for a spin, try to build
something with <br>
it and report feedback. This has been a long journey, and
we wouldn't be <br>
where we are now without your help.<br>
<br>
Cheers<br>
Maurizio<br>
<br>
[1] - <a href="https://openjdk.org/jeps/424" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://openjdk.org/jeps/424</a><br>
[2] - <a href="https://openjdk.org/jeps/434" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://openjdk.org/jeps/434</a><br>
[3] - <a href="https://openjdk.org/jeps/442" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://openjdk.org/jeps/442</a><br>
[4] - <a href="https://cr.openjdk.org/~mcimadamore/panama/segment_address.html" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://cr.openjdk.org/~mcimadamore/panama/segment_address.html</a><br>
[5] - <a href="https://cr.openjdk.org/~mcimadamore/panama/session_arenas.html" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://cr.openjdk.org/~mcimadamore/panama/session_arenas.html</a><br>
[6] - <a href="https://cr.openjdk.org/~mcimadamore/panama/scoped_arenas.html" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://cr.openjdk.org/~mcimadamore/panama/scoped_arenas.html</a><br>
[7] - <a href="https://git.openjdk.org/panama-foreign/pull/734" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://git.openjdk.org/panama-foreign/pull/734</a><br>
[8] - <a href="https://git.openjdk.org/panama-foreign/pull/770" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://git.openjdk.org/panama-foreign/pull/770</a><br>
[9] - <a href="https://git.openjdk.org/panama-foreign/pull/836" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://git.openjdk.org/panama-foreign/pull/836</a><br>
[10] - <a href="https://urldefense.com/v3/__https://github.com/openjdk/panama-foreign/pull/840__;!!ACWV5N9M2RV99hQ!NVtXVaZhncXaAXyT8ZvSUvYj4JS-DdoRrvH53UvEwHHiwsmD1EOAsaplsPSoIYbU0PVju2k1m39S9IdnJ2utUnrcyI8a$" rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/openjdk/panama-foreign/pull/840</a><br>
[11] - <a href="https://git.openjdk.org/panama-foreign/pull/839" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://git.openjdk.org/panama-foreign/pull/839</a><br>
[12] - <a href="https://urldefense.com/v3/__https://github.com/openjdk/panama-foreign/pull/833__;!!ACWV5N9M2RV99hQ!NVtXVaZhncXaAXyT8ZvSUvYj4JS-DdoRrvH53UvEwHHiwsmD1EOAsaplsPSoIYbU0PVju2k1m39S9IdnJ2utUlqIiQcx$" rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/openjdk/panama-foreign/pull/833</a><br>
[13] - <a href="https://mail.openjdk.org/pipermail/panama-dev/2023-May/019079.html" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://mail.openjdk.org/pipermail/panama-dev/2023-May/019079.html</a><br>
[14] - <a href="https://cr.openjdk.org/~mcimadamore/panama/session_arenas.html" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://cr.openjdk.org/~mcimadamore/panama/session_arenas.html</a><br>
<br>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</body>
</html>