Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v9]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 19:47:55 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v9]

2025-06-11 Thread Phil Race
On Wed, 11 Jun 2025 19:47:55 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v9]

2025-06-11 Thread Kevin Rushforth
> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin > rasterizer with FFM. > > I broke this up into the following commits. The bulk of the work is in the > first two: > > 1. Encapsulate all off-heap access in OffHeapArray -- All of the memory > allocation and managem

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-11 Thread Kevin Rushforth
On Mon, 9 Jun 2025 19:42:07 GMT, Kevin Rushforth wrote: >> modules/javafx.graphics/src/main/java/com/sun/marlin/MaskMarlinAlphaConsumer.java >> line 110: >> >>> 108: >>> 109: for (int i = 0; i < _ALPHA_MAP.length; i++) { >>> 110: ALPHA_MAP_OFF_HEAP.putByte(i, _ALPHA_MAP[i])

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-11 Thread Kevin Rushforth
On Mon, 9 Jun 2025 15:34:31 GMT, Kevin Rushforth wrote: >> modules/javafx.graphics/src/main/java/com/sun/marlin/OffHeapArray.java line >> 79: >> >>> 77: * @return number of used bytes >>> 78: */ >>> 79: int getUsed() { >> >> wait, length is `long`, but used is `int`? > > I notice

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 18:39:25 GMT, Kevin Rushforth wrote: >> it's a minor thing; we could do it later if you plan a follow-up - I more >> dislike the idea of having an unused array... > > I'll file a few cleanup bugs before I integrate and note them in comments. I decided to fix the constructor

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v7]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 15:17:59 GMT, Kevin Rushforth wrote: >> modules/javafx.graphics/src/main/java/com/sun/marlin/MaskMarlinAlphaConsumer.java >> line 111: >> >>> 109: byte[] _ALPHA_MAP = buildAlphaMap(MarlinConst.MAX_AA_ALPHA); >>> 110: ALPHA_MAP = _ALPHA_MAP; // Keep alive the

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 19:40:09 GMT, Kevin Rushforth wrote: >> It doesn't really matter, but personally I try to use the built in >> functionality. > > ~~I decided to fix the constructor now (simple cleanup without any behavior > change).~~ I removed the explicit check. - PR Review

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v9]

2025-06-11 Thread Andy Goryachev
On Wed, 11 Jun 2025 19:45:19 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 17:44:58 GMT, Nir Lisker wrote: >> Kevin Rushforth has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Use the global arena for the ALPHA_MASK arrays. >> - Revert "Initialize alpha maps in constructor to ensure they ar

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 18:33:57 GMT, Nir Lisker wrote: >> Right. I could remove it if you like, although it isn't hurting anything >> leaving it there. > > It doesn't really matter, but personally I try to use the built in > functionality. ~~I decided to fix the constructor now (simple cleanup wi

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 16:54:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Nir Lisker
On Wed, 11 Jun 2025 16:54:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 17:52:18 GMT, Andy Goryachev wrote: >> Although... there is only one use now of the default constructor, so it >> would be trivial to change it and dispense with the first constructor. > > it's a minor thing; we could do it later if you plan a follow-up - I more > dislike t

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 17:30:48 GMT, Andy Goryachev wrote: >> Kevin Rushforth has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Use the global arena for the ALPHA_MASK arrays. >> - Revert "Initialize alpha maps in constructor to ensure the

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Andy Goryachev
On Wed, 11 Jun 2025 16:54:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 17:32:51 GMT, Phil Race wrote: >> modules/javafx.graphics/src/main/java/com/sun/marlin/OffHeapArray.java line >> 165: >> >>> 163: >>> 164: void free() { >>> 165: if (global) { >> >> Trying to close the global arena results in an UnsupportedOperationException >

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Laurent Bourgès
On Wed, 11 Jun 2025 16:54:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Phil Race
On Wed, 11 Jun 2025 17:23:56 GMT, Nir Lisker wrote: >> Kevin Rushforth has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Use the global arena for the ALPHA_MASK arrays. >> - Revert "Initialize alpha maps in constructor to ensure they ar

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Nir Lisker
On Wed, 11 Jun 2025 16:54:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Nir Lisker
On Wed, 11 Jun 2025 17:37:04 GMT, Kevin Rushforth wrote: >> true > > Right. I could remove it if you like, although it isn't hurting anything > leaving it there. It doesn't really matter, but personally I try to use the built in functionality. - PR Review Comment: https://git.ope

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Phil Race
On Wed, 11 Jun 2025 16:54:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Andy Goryachev
On Wed, 11 Jun 2025 17:44:54 GMT, Kevin Rushforth wrote: >> Since global is the special case, it seemed easier to keep the existing >> constructor and only pass "global=true" in the one place that's needed -- >> the static initializer of `MaskMarlinAlphaConsumer`. > > Although... there is only

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v7]

2025-06-11 Thread Kevin Rushforth
On Tue, 10 Jun 2025 15:31:22 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Andy Goryachev
On Wed, 11 Jun 2025 16:54:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Kevin Rushforth
> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin > rasterizer with FFM. > > I broke this up into the following commits. The bulk of the work is in the > first two: > > 1. Encapsulate all off-heap access in OffHeapArray -- All of the memory > allocation and managem

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v8]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 17:43:10 GMT, Kevin Rushforth wrote: >> modules/javafx.graphics/src/main/java/com/sun/marlin/OffHeapArray.java line >> 59: >> >>> 57: */ >>> 58: OffHeapArray(final Object parent, final long len) { >>> 59: this(parent, len, false); >> >> I would suggest to r

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v7]

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 14:24:50 GMT, Andy Goryachev wrote: >> Kevin Rushforth has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Initialize alpha maps in constructor to ensure they are created on the >> right thread (QuantumRenderer) > > modu

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-11 Thread Nir Lisker
On Wed, 11 Jun 2025 14:16:19 GMT, Kevin Rushforth wrote: > > > > If there is no performance penalty for accessing data from a memory > > > > segment created using the global arena, then we could switch to that > > > > for JavaFX as well. > > > > > > > > > Using memory from the Global arena ca

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v7]

2025-06-11 Thread Andy Goryachev
On Tue, 10 Jun 2025 15:31:22 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-11 Thread Kevin Rushforth
On Wed, 11 Jun 2025 13:38:36 GMT, Nir Lisker wrote: > > > If there is no performance penalty for accessing data from a memory > > > segment created using the global arena, then we could switch to that for > > > JavaFX as well. > > > > > > Using memory from the Global arena can actually be _fa

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-11 Thread Nir Lisker
On Wed, 11 Jun 2025 05:40:22 GMT, Per Minborg wrote: > > If there is no performance penalty for accessing data from a memory segment > > created using the global arena, then we could switch to that for JavaFX as > > well. > > Using memory from the Global arena can actually be _faster_ as we do

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v7]

2025-06-11 Thread Kevin Rushforth
On Tue, 10 Jun 2025 15:31:22 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-10 Thread Per Minborg
On Tue, 10 Jun 2025 17:51:02 GMT, Kevin Rushforth wrote: > If there is no performance penalty for accessing data from a memory segment > created using the global arena, then we could switch to that for JavaFX as > well. Using memory from the Global arena can actually be _faster_ as we do not h

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-10 Thread Kevin Rushforth
On Tue, 10 Jun 2025 16:13:10 GMT, Laurent Bourgès wrote: > These alpha masks are constant (static), so reused in marlin java2d where > multiple threads & rendering contexts can work in parallel. With FFM, the > global arena could be used, but the current patch is good enough as javafx > uses o

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-10 Thread Laurent Bourgès
On Mon, 9 Jun 2025 22:09:44 GMT, Kevin Rushforth wrote: > > > I'd looked at that but it was not obvious. And it definitely is not > > > obvious that it will be the same thread that initialises the > > > MaskMarlinAlphaConsumer.java class > > > > Yes, I see what you are saying. The `ALPHA_MASK_

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v7]

2025-06-10 Thread Andy Goryachev
On Tue, 10 Jun 2025 15:31:22 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v7]

2025-06-10 Thread Laurent Bourgès
On Tue, 10 Jun 2025 15:31:22 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v7]

2025-06-10 Thread Kevin Rushforth
> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin > rasterizer with FFM. > > I broke this up into the following commits. The bulk of the work is in the > first two: > > 1. Encapsulate all off-heap access in OffHeapArray -- All of the memory > allocation and managem

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-10 Thread Kevin Rushforth
On Mon, 2 Jun 2025 20:22:28 GMT, Laurent Bourgès wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-10 Thread Kevin Rushforth
On Mon, 9 Jun 2025 17:55:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-09 Thread Andy Goryachev
On Mon, 9 Jun 2025 22:57:20 GMT, Kevin Rushforth wrote: > Really, though, the simplest thing to do for now is to use shared I agree. - PR Comment: https://git.openjdk.org/jfx/pull/1814#issuecomment-2957289771

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 22:24:08 GMT, Andy Goryachev wrote: > the `MaskMarlinAlphaConsumer` field in `RendererContext` is created/resized > in DMarlinRasterizer:102 > > perhaps we could refactor this code to hide the public field and ensure the > single threaded access? That would get into the sor

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-09 Thread Andy Goryachev
On Mon, 9 Jun 2025 17:55:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 21:38:22 GMT, Kevin Rushforth wrote: > > I'd looked at that but it was not obvious. And it definitely is not obvious > > that it will be the same thread that initialises the > > MaskMarlinAlphaConsumer.java class > > Yes, I see what you are saying. The `ALPHA_MASK_XXX` array

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 21:25:18 GMT, Andy Goryachev wrote: > > I don't quite see how you guarantee a static field of a class is never > > accessed by another thread. > > Wouldn't a WrongThreadException be thrown if that happens? Yes. If we had 100% complete test coverage for all possible use cases

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 21:23:47 GMT, Phil Race wrote: > > > Multi-threaded access in the sense of the not being used concurrently by > > > different threads ? What FFM means is that the thread that creates the > > > Arena is the only thread ever allowed to use the Arena or any memory > > > allocat

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-09 Thread Andy Goryachev
On Mon, 9 Jun 2025 21:23:47 GMT, Phil Race wrote: > I don't quite see how you guarantee a static field of a class is never > accessed by another thread. Wouldn't a WrongThreadException be thrown if that happens? - PR Comment: https://git.openjdk.org/jfx/pull/1814#issuecomment-2957

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-09 Thread Phil Race
On Mon, 9 Jun 2025 21:15:08 GMT, Kevin Rushforth wrote: > > Multi-threaded access in the sense of the not being used concurrently by > > different threads ? What FFM means is that the thread that creates the > > Arena is the only thread ever allowed to use the Arena or any memory > > allocated

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 20:06:22 GMT, Phil Race wrote: > Multi-threaded access in the sense of the not being used concurrently by > different threads ? What FFM means is that the thread that creates the Arena > is the only thread ever allowed to use the Arena or any memory allocated by > it. I don'

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-09 Thread Phil Race
On Fri, 6 Jun 2025 11:57:09 GMT, Kevin Rushforth wrote: > > If it helps at this point, we did an initial prototype in the sandbox: > > https://github.com/openjdk/jfx-sandbox/tree/Marlin_FFM with several commits > > and reverts, so might need to go through them. > > Thanks. I took a look at it,

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 19:15:35 GMT, Phil Race wrote: >> Kevin Rushforth has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove unneeded "length" field, using segment,byteSize() instead >> Fix description of resize method. >> Minor white

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 17:55:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-09 Thread Laurent Bourgès
On Mon, 9 Jun 2025 17:55:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-09 Thread Phil Race
On Mon, 9 Jun 2025 17:55:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-09 Thread Andy Goryachev
On Mon, 9 Jun 2025 17:55:21 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 17:43:21 GMT, Andy Goryachev wrote: >> Thanks for confirming. > > Question: can the number of bytes to be copied depend on memory layout (BE vs > LE)? No - PR Review Comment: https://git.openjdk.org/jfx/pull/1814#discussion_r2136195319

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 15:44:08 GMT, Per Minborg wrote: >> Kevin Rushforth has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comments > > modules/javafx.graphics/src/main/java/com/sun/marlin/OffHeapArray.java line > 47: > >> 45: /

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Andy Goryachev
On Mon, 9 Jun 2025 17:36:55 GMT, Kevin Rushforth wrote: > --enable-native-access=javafx.graphics I did indeed forget. The `sun.misc.Unsafe` warning is no longer printed. - PR Comment: https://git.openjdk.org/jfx/pull/1814#issuecomment-2956505509

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

2025-06-09 Thread Kevin Rushforth
> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin > rasterizer with FFM. > > I broke this up into the following commits. The bulk of the work is in the > first two: > > 1. Encapsulate all off-heap access in OffHeapArray -- All of the memory > allocation and managem

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 15:25:22 GMT, Andy Goryachev wrote: >> Kevin Rushforth has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comments > > modules/javafx.graphics/src/main/java/com/sun/marlin/OffHeapArray.java line > 47: > >> 45:

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Andy Goryachev
On Fri, 6 Jun 2025 11:49:56 GMT, Kevin Rushforth wrote: >> True. > > Thanks for confirming. Question: can the number of bytes to be copied depend on memory layout (BE vs LE)? - PR Review Comment: https://git.openjdk.org/jfx/pull/1814#discussion_r2136180694

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 15:37:27 GMT, Andy Goryachev wrote: > ``` > ... > WARNING: Use --enable-native-access=javafx.graphics to avoid a warning for > callers in this module > WARNING: Restricted methods will be blocked in a future release unless native > access is enabled > ``` > > why? Because y

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Andy Goryachev
On Mon, 9 Jun 2025 15:13:49 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Per Minborg
On Mon, 9 Jun 2025 15:13:49 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Andy Goryachev
On Mon, 9 Jun 2025 15:13:49 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Andy Goryachev
On Mon, 9 Jun 2025 15:13:49 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Andy Goryachev
On Mon, 9 Jun 2025 15:13:49 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v4]

2025-06-09 Thread Kevin Rushforth
On Mon, 9 Jun 2025 15:00:27 GMT, Nir Lisker wrote: > Do you think it's worth asking someone on the Panama team to take a look? > It's the first FFM introduction into JavaFX, they might have worthwhile > comments. Memory leaks can hide in native memory in a way that's hard to > find, such as fr

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Laurent Bourgès
On Mon, 9 Jun 2025 15:13:49 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v5]

2025-06-09 Thread Kevin Rushforth
> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin > rasterizer with FFM. > > I broke this up into the following commits. The bulk of the work is in the > first two: > > 1. Encapsulate all off-heap access in OffHeapArray -- All of the memory > allocation and managem

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v4]

2025-06-09 Thread Nir Lisker
On Fri, 6 Jun 2025 14:37:40 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v4]

2025-06-09 Thread Kevin Rushforth
On Sun, 8 Jun 2025 12:37:01 GMT, Marius Hanl wrote: >> Kevin Rushforth has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Request alignment when reallocating segment > > modules/javafx.graphics/src/main/java/com/sun/marlin/OffHeapArray.java

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v4]

2025-06-08 Thread Marius Hanl
On Fri, 6 Jun 2025 14:37:40 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v4]

2025-06-06 Thread Kevin Rushforth
> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin > rasterizer with FFM. > > I broke this up into the following commits. The bulk of the work is in the > first two: > > 1. Encapsulate all off-heap access in OffHeapArray -- All of the memory > allocation and managem

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v3]

2025-06-06 Thread Kevin Rushforth
> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin > rasterizer with FFM. > > I broke this up into the following commits. The bulk of the work is in the > first two: > > 1. Encapsulate all off-heap access in OffHeapArray -- All of the memory > allocation and managem

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-06 Thread Kevin Rushforth
On Wed, 21 May 2025 15:46:36 GMT, Andy Goryachev wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-06 Thread Kevin Rushforth
On Wed, 21 May 2025 13:24:32 GMT, Kevin Rushforth wrote: > PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin > rasterizer with FFM. > > I broke this up into the following commits. The bulk of the work is in the > first two: > > 1. Encapsulate all off-heap access in

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v2]

2025-06-06 Thread Kevin Rushforth
> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin > rasterizer with FFM. > > I broke this up into the following commits. The bulk of the work is in the > first two: > > 1. Encapsulate all off-heap access in OffHeapArray -- All of the memory > allocation and managem

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-06 Thread Laurent Bourgès
On Wed, 21 May 2025 14:07:28 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v2]

2025-06-06 Thread Kevin Rushforth
On Fri, 6 Jun 2025 12:13:19 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-06 Thread Kevin Rushforth
On Wed, 21 May 2025 14:04:55 GMT, Kevin Rushforth wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acc

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-06 Thread Kevin Rushforth
On Mon, 2 Jun 2025 20:11:20 GMT, Laurent Bourgès wrote: >> modules/javafx.graphics/src/main/java/com/sun/marlin/OffHeapArray.java line >> 46: >> >>> 44: // FFM stuff >>> 45: private static final ValueLayout.OfByte BYTE_LAYOUT = >>> ValueLayout.JAVA_BYTE; >>> 46: private static fina

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-06 Thread Andy Goryachev
On Wed, 21 May 2025 13:24:32 GMT, Kevin Rushforth wrote: > PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin > rasterizer with FFM. > > I broke this up into the following commits. The bulk of the work is in the > first two: > > 1. Encapsulate all off-heap access in

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-06 Thread Nir Lisker
On Mon, 2 Jun 2025 20:22:28 GMT, Laurent Bourgès wrote: >> PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin >> rasterizer with FFM. >> >> I broke this up into the following commits. The bulk of the work is in the >> first two: >> >> 1. Encapsulate all off-heap acce

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-06 Thread Kevin Rushforth
On Tue, 3 Jun 2025 22:52:27 GMT, Nir Lisker wrote: > If it helps at this point, we did an initial prototype in the sandbox: > https://github.com/openjdk/jfx-sandbox/tree/Marlin_FFM with several commits > and reverts, so might need to go through them. Thanks. I took a look at it, and one of the

Re: RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-06 Thread Laurent Bourgès
On Wed, 21 May 2025 13:24:32 GMT, Kevin Rushforth wrote: > PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin > rasterizer with FFM. > > I broke this up into the following commits. The bulk of the work is in the > first two: > > 1. Encapsulate all off-heap access in

RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

2025-06-06 Thread Kevin Rushforth
PR to replace the use of sun.misc.Unsafe memory access methods in the Marlin rasterizer with FFM. I broke this up into the following commits. The bulk of the work is in the first two: 1. Encapsulate all off-heap access in OffHeapArray -- All of the memory allocation and management was already