Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-12-02 Thread Per Minborg
On Mon, 2 Dec 2024 14:26:08 GMT, Maurizio Cimadamore wrote: >> As this is an internal API, I tried to keep it as similar as possible to the >> other bulk operations. But as you say, the value used here for the last >> parameter is always `segment.byteSize()`. We could easily change it. What's

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v7]

2024-12-02 Thread Per Minborg
On Mon, 2 Dec 2024 14:24:25 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve docs > > test/jdk/java/foreign/TestStringEncoding.java line 263: > >> 261: for (var arena: a

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v8]

2024-12-02 Thread Maurizio Cimadamore
On Mon, 2 Dec 2024 15:40:18 GMT, Per Minborg wrote: >> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, >> fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != >> 0`). >> >> This PR also improves performance on modern hardware, as there is no need

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-12-02 Thread Maurizio Cimadamore
On Mon, 2 Dec 2024 10:14:54 GMT, Per Minborg wrote: >> src/java.base/share/classes/jdk/internal/foreign/StringSupport.java line 128: >> >>> 126: */ >>> 127: @ForceInline >>> 128: public static int strlenByte(final AbstractMemorySegmentImpl >>> segment, >> >> Note: clients of this

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v6]

2024-12-02 Thread Martin Doerr
On Mon, 2 Dec 2024 13:10:54 GMT, Per Minborg wrote: >> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, >> fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != >> 0`). >> >> This PR also improves performance on modern hardware, as there is no need

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v8]

2024-12-02 Thread Per Minborg
> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, > fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != > 0`). > > This PR also improves performance on modern hardware, as there is no need for > pre-looping alignment. Removing this improves perfo

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v7]

2024-12-02 Thread Per Minborg
> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, > fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != > 0`). > > This PR also improves performance on modern hardware, as there is no need for > pre-looping alignment. Removing this improves perfo

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v7]

2024-12-02 Thread Maurizio Cimadamore
On Mon, 2 Dec 2024 13:56:59 GMT, Per Minborg wrote: >> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, >> fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != >> 0`). >> >> This PR also improves performance on modern hardware, as there is no need

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v6]

2024-12-02 Thread Per Minborg
On Mon, 2 Dec 2024 13:32:34 GMT, Martin Doerr wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add zero detection method for quad words > > Thanks for the notification. The java/foreign suite has passed on linux on

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v6]

2024-12-02 Thread Amit Kumar
On Mon, 2 Dec 2024 13:10:54 GMT, Per Minborg wrote: >> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, >> fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != >> 0`). >> >> This PR also improves performance on modern hardware, as there is no need

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v6]

2024-12-02 Thread Per Minborg
> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, > fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != > 0`). > > This PR also improves performance on modern hardware, as there is no need for > pre-looping alignment. Removing this improves perfo

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-12-02 Thread Per Minborg
On Fri, 29 Nov 2024 12:44:53 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix imports > > test/jdk/java/foreign/TestStringEncoding.java line 2: > >> 1: /* >> 2: * Copyright (c) 2021, 2

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-12-02 Thread Per Minborg
On Fri, 29 Nov 2024 09:46:55 GMT, Per Minborg wrote: >> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, >> fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != >> 0`). >> >> This PR also improves performance on modern hardware, as there is no nee

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v5]

2024-12-02 Thread Per Minborg
> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, > fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != > 0`). > > This PR also improves performance on modern hardware, as there is no need for > pre-looping alignment. Removing this improves perfo

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v4]

2024-12-02 Thread Per Minborg
> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, > fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != > 0`). > > This PR also improves performance on modern hardware, as there is no need for > pre-looping alignment. Removing this improves perfo

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-12-02 Thread Per Minborg
On Fri, 29 Nov 2024 18:29:57 GMT, Jorn Vernee wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix imports > > src/java.base/share/classes/jdk/internal/foreign/SegmentBulkOperations.java > line 205: > >> 203:

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-12-02 Thread Per Minborg
On Fri, 29 Nov 2024 12:43:28 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/jdk/internal/foreign/StringSupport.java line 187: >> >>> 185: // Prevent over scanning as we step by 2 >>> 186: final long endScan = toOffset & ~1; // The last bit is zero >>> 187:

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-12-02 Thread Per Minborg
On Fri, 29 Nov 2024 12:19:52 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix imports > > src/java.base/share/classes/jdk/internal/foreign/StringSupport.java line 128: > >> 126: */

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-11-29 Thread Jorn Vernee
On Fri, 29 Nov 2024 09:46:55 GMT, Per Minborg wrote: >> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, >> fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != >> 0`). >> >> This PR also improves performance on modern hardware, as there is no nee

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-11-29 Thread Maurizio Cimadamore
On Fri, 29 Nov 2024 12:36:19 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix imports > > src/java.base/share/classes/jdk/internal/foreign/StringSupport.java line 187: > >> 185:

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-11-29 Thread Maurizio Cimadamore
On Fri, 29 Nov 2024 09:46:55 GMT, Per Minborg wrote: >> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, >> fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != >> 0`). >> >> This PR also improves performance on modern hardware, as there is no nee

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-11-29 Thread Maurizio Cimadamore
On Fri, 29 Nov 2024 09:46:55 GMT, Per Minborg wrote: >> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, >> fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != >> 0`). >> >> This PR also improves performance on modern hardware, as there is no nee

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-11-29 Thread Maurizio Cimadamore
On Fri, 29 Nov 2024 09:46:55 GMT, Per Minborg wrote: >> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, >> fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != >> 0`). >> >> This PR also improves performance on modern hardware, as there is no nee

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-11-29 Thread Maurizio Cimadamore
On Fri, 29 Nov 2024 09:46:55 GMT, Per Minborg wrote: >> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, >> fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != >> 0`). >> >> This PR also improves performance on modern hardware, as there is no nee

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-11-29 Thread Per Minborg
On Fri, 29 Nov 2024 09:01:35 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix imports > > src/java.base/share/classes/jdk/internal/foreign/SegmentBulkOperations.java > line 400: > >> 3

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v3]

2024-11-29 Thread Per Minborg
> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods, > fixing a bug in the `short_strlen` variant for odd offsets (`offset % 2 != > 0`). > > This PR also improves performance on modern hardware, as there is no need for > pre-looping alignment. Removing this improves perfo

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort [v2]

2024-11-29 Thread Per Minborg
> This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods and > move them to the class `SegmentBulkOperations` where other bulk operations > reside. > > This PR fixes a bug in the `short_strlen` variant for offsets that were odd > (`offset % 2 != 0`). > > This PR also improves

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort

2024-11-29 Thread Maurizio Cimadamore
On Fri, 29 Nov 2024 07:55:25 GMT, Per Minborg wrote: > This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods and > move them to the class `SegmentBulkOperations` where other bulk operations > reside. > > This PR fixes a bug in the `short_strlen` variant for offsets that were

Re: RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort

2024-11-29 Thread Per Minborg
On Fri, 29 Nov 2024 07:55:25 GMT, Per Minborg wrote: > This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods and > move them to the class `SegmentBulkOperations` where other bulk operations > reside. > > This PR fixes a bug in the `short_strlen` variant for offsets that were

RFR: 8345120: A likely bug in StringSupport::chunkedStrlenShort

2024-11-29 Thread Per Minborg
This PR proposes to rewrite the `StringSupport::chunkedStrlen*` methods and move them to the class `SegmentBulkOperations` where other bulk operations reside. This PR fixes a bug in the `short_strlen` variant for offsets that were odd (`offset % 2 != 0`). This PR also improves performance on