Re: RFR: 8303697: ProcessTools doesn't print last line of process output [v3]

2023-03-15 Thread Thomas Stuefe
On Wed, 15 Mar 2023 22:49:57 GMT, Leonid Mesnik wrote: >> The StreamPumper is fixed to process the last line even it is not finishes >> with '\n' or '\r'. The test included. Testing with tier1-3 also to verify >> that tests are not broken. > > Leonid Mesnik has updated the pull request incremen

Re: jtreg test test/jdk/java/lang/StackWalker/StackWalkTest.java fails after jtreg commit 7903373

2023-03-15 Thread Tobias Hartmann
Hi Kosta, Thanks again for the report! This test is owned by core-libs/java.lang, I'm forwarding to core-libs-dev and CC'ing Leonid, the author of https://bugs.openjdk.org/browse/CODETOOLS-7903373. I can see these failures in our testing as well but no one filed a bug yet. I filed: https://bug

RFR: 8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics

2023-03-15 Thread Serguei Spitsyn
This is needed for performance improvements in support of virtual threads. The update includes the following: 1. Refactored the `VirtualThread` native methods: `notifyJvmtiMountBegin` and `notifyJvmtiMountEnd` => `notifyJvmtiMount` `notifyJvmtiUnmountBegin` and `notifyJvmtiUnmoun

Re: RFR: 8303697: ProcessTools doesn't print last line of process output [v2]

2023-03-15 Thread David Holmes
On Wed, 15 Mar 2023 14:23:43 GMT, Leonid Mesnik wrote: >> Leonid Mesnik has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed test > > test/lib/jdk/test/lib/process/StreamPumper.java line 145: > >> 143: } >> 144:

Re: RFR: 8303697: ProcessTools doesn't print last line of process output [v3]

2023-03-15 Thread David Holmes
On Wed, 15 Mar 2023 22:49:57 GMT, Leonid Mesnik wrote: >> The StreamPumper is fixed to process the last line even it is not finishes >> with '\n' or '\r'. The test included. Testing with tier1-3 also to verify >> that tests are not broken. > > Leonid Mesnik has updated the pull request incremen

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v8]

2023-03-15 Thread Mandy Chung
On Wed, 15 Mar 2023 16:42:53 GMT, Adam Sotona wrote: >> jdk.jlink internal plugins are heavily using ASM >> >> This patch converts ASM calls to Classfile API. >> >> Please review. >> Thanks, >> Adam > > Adam Sotona has updated the pull request incrementally with one additional > commit since t

Integrated: 8303022: "assert(allocates2(pc)) failed: not in CodeBuffer memory" When linking downcall handle

2023-03-15 Thread Jorn Vernee
On Tue, 7 Mar 2023 18:02:41 GMT, Jorn Vernee wrote: > The issue is that the size of the code buffer is not large enough to hold the > whole stub. > > Proposed solution is to scale the size of the stub with the number of > arguments. I've adjusted sizes for both downcall and upcall stubs. I've

Re: RFR: 8303697: ProcessTools doesn't print last line of process output [v3]

2023-03-15 Thread Leonid Mesnik
> The StreamPumper is fixed to process the last line even it is not finishes > with '\n' or '\r'. The test included. Testing with tier1-3 also to verify > that tests are not broken. Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision: c

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v6]

2023-03-15 Thread Mandy Chung
On Wed, 15 Mar 2023 16:37:54 GMT, Adam Sotona wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java >> line 614: >> >>> 612: private void genConstructor(ClassBuilder clb) { >>> 613: clb.withMethod("", MethodTypeDesc.of(CD_void), >>>

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v8]

2023-03-15 Thread Mandy Chung
On Wed, 15 Mar 2023 16:42:53 GMT, Adam Sotona wrote: >> jdk.jlink internal plugins are heavily using ASM >> >> This patch converts ASM calls to Classfile API. >> >> Please review. >> Thanks, >> Adam > > Adam Sotona has updated the pull request incrementally with one additional > commit since t

Re: RFR: 8303018: Unicode Emoji Properties [v3]

2023-03-15 Thread Naoto Sato
On Wed, 15 Mar 2023 20:43:22 GMT, Eirik Bjorsnos wrote: > Unrelated side note: Reviewing this PR inspired me to see if one could > generate more efficient switch expressions for the CharacterDataLatin1 > methods as replacement for the property lookup / masking done today. This > seemed to give

Re: RFR: 8304161: Add TypeKind.from to derive from TypeDescriptor.OfField

2023-03-15 Thread Brian Goetz
On Tue, 14 Mar 2023 17:12:50 GMT, Chen Liang wrote: > Such an API allows creating TypeKind from both Class and ClassDesc than > having to call descriptorString() explicitly at every use site. > > See > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000240.html > for context.

Re: RFR: 8304161: Add TypeKind.from to derive from TypeDescriptor.OfField

2023-03-15 Thread Jorn Vernee
On Tue, 14 Mar 2023 17:12:50 GMT, Chen Liang wrote: > Such an API allows creating TypeKind from both Class and ClassDesc than > having to call descriptorString() explicitly at every use site. > > See > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000240.html > for context.

Re: RFR: 8304180: Constant Descriptors for MethodHandles::classData and classDataAt

2023-03-15 Thread Jorn Vernee
On Wed, 15 Mar 2023 02:18:37 GMT, Chen Liang wrote: > Add Constant Descriptors for DirectMethodHandleDesc of > MethodHandles::classData and classDataAt in ConstantDescs. This facilitates > easier access of class data via condy in Classfile API-generated bytecode. > Most other constant bootstra

Re: RFR: 8304180: Constant Descriptors for MethodHandles::classData and classDataAt

2023-03-15 Thread Jorn Vernee
On Wed, 15 Mar 2023 02:18:37 GMT, Chen Liang wrote: > Add Constant Descriptors for DirectMethodHandleDesc of > MethodHandles::classData and classDataAt in ConstantDescs. This facilitates > easier access of class data via condy in Classfile API-generated bytecode. > Most other constant bootstra

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v16]

2023-03-15 Thread Jorn Vernee
On Tue, 14 Mar 2023 22:52:44 GMT, Martin Doerr wrote: >> Martin Doerr has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix storing 32 bit integers into Java frames. Enable TestArrayStructs. > > Btw. the new cases in which we use int and s

Re: RFR: 8303022: "assert(allocates2(pc)) failed: not in CodeBuffer memory" When linking downcall handle [v3]

2023-03-15 Thread Jorn Vernee
On Fri, 10 Mar 2023 14:14:55 GMT, Jorn Vernee wrote: >> The issue is that the size of the code buffer is not large enough to hold >> the whole stub. >> >> Proposed solution is to scale the size of the stub with the number of >> arguments. I've adjusted sizes for both downcall and upcall stubs.

Re: RFR: 8303018: Unicode Emoji Properties [v3]

2023-03-15 Thread Eirik Bjorsnos
On Wed, 15 Mar 2023 18:21:11 GMT, Naoto Sato wrote: >> Proposing accessor methods to Emoji properties defined in [Unicode Technical >> Standard #51](https://unicode.org/reports/tr51/) in `java.lang.Character` >> class. This is per a request from the client group, as well as refining the >> cur

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v6]

2023-03-15 Thread Doug Simon
On Wed, 15 Mar 2023 19:23:52 GMT, Joe Darcy wrote: > I assume https://bugs.openjdk.org/browse/JDK-8303431 recounts the motivation > behind this change? Yes, it does. Thanks in advance. - PR: https://git.openjdk.org/jdk/pull/12810

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native

2023-03-15 Thread Naoto Sato
On Thu, 23 Feb 2023 09:04:23 GMT, Justin Lu wrote: > This PR converts Unicode sequences to UTF-8 native in .properties file. > (Excluding the Unicode space and tab sequence). The conversion was done using > native2ascii. > > In addition, the build logic is adjusted to support reading in the >

Re: RFR: 8304225: Remove javax/script/Test7.java from ProblemList

2023-03-15 Thread Naoto Sato
On Wed, 15 Mar 2023 06:16:17 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which removes > `javax/script/Test7.java` from the ProblemList? > > As noted in https://bugs.openjdk.org/browse/JDK-8304225, this test no longer > fails and passes just like the other tests in `jav

Re: RFR: 8225641: Calendar.roll(int field) does not work correctly for WEEK_OF_YEAR

2023-03-15 Thread Naoto Sato
On Tue, 14 Mar 2023 22:16:45 GMT, Justin Lu wrote: > This PR fixes the bug which occurred when `Calendar.roll(WEEK_OF_YEAR)` > rolled into a minimal first week with an invalid `WEEK_OF_YEAR` and > `DAY_OF_WEEK` combo. > > For example, Rolling _Monday, 30 December 2019_ by 1 week produced _Mond

Re: RFR: 8291598: Matcher.appendReplacement should not create new StringBuilder instances [v2]

2023-03-15 Thread Raffaello Giulietti
On Wed, 15 Mar 2023 18:55:35 GMT, Roger Riggs wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8291598: Matcher.appendReplacement should not create new StringBuilder >> instances >> >> Fix copyright yea

Re: RFR: 8291598: Matcher.appendReplacement should not create new StringBuilder instances [v3]

2023-03-15 Thread Raffaello Giulietti
> Remove instantiation of `StringBuilder` Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8291598: Matcher.appendReplacement should not create new StringBuilder instances Removed other allocations of StringBuilder when pr

Re: RFR: 8304283: Modernize the switch statements in jdk.internal.foreign

2023-03-15 Thread Jorn Vernee
On Wed, 15 Mar 2023 18:10:29 GMT, Per Minborg wrote: > This PR proposes changing old-type switch statements to newer forms of switch. src/java.base/share/classes/jdk/internal/foreign/abi/CallingSequenceBuilder.java line 219: > 217: case Binding.Cast unused-> true; > 218: };

Re: RFR: 8304283: Modernize the switch statements in jdk.internal.foreign

2023-03-15 Thread Jorn Vernee
On Wed, 15 Mar 2023 19:33:19 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/CallingSequenceBuilder.java >> line 208: >> >>> 206: static boolean isUnbox(Binding binding) { >>> 207: return switch (binding) { >>> 208: case Binding.VMStore un

Re: RFR: 8304283: Modernize the switch statements in jdk.internal.foreign

2023-03-15 Thread Jorn Vernee
On Wed, 15 Mar 2023 18:33:34 GMT, Maurizio Cimadamore wrote: >> This PR proposes changing old-type switch statements to newer forms of >> switch. > > src/java.base/share/classes/jdk/internal/foreign/abi/CallingSequenceBuilder.java > line 208: > >> 206: static boolean isUnbox(Binding bindi

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v6]

2023-03-15 Thread Joe Darcy
On Wed, 15 Mar 2023 18:00:49 GMT, Doug Simon wrote: > @jddarcy would you be able to help review this PR? Based on git log, you are > knowledgeable in `sun.reflect.annotation`. If not, please suggest who else I > can reach out to for a review. I can take a look at this, but it will be at least

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v17]

2023-03-15 Thread Jorn Vernee
On Wed, 15 Mar 2023 18:53:08 GMT, Martin Doerr wrote: >> Implementation of "Foreign Function & Memory API" for linux on Power (Little >> Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". >> >> This PR does not include code for VaList support because it's supposed to >>

Re: RFR: 8303018: Unicode Emoji Properties [v3]

2023-03-15 Thread Roger Riggs
On Wed, 15 Mar 2023 18:21:11 GMT, Naoto Sato wrote: >> Proposing accessor methods to Emoji properties defined in [Unicode Technical >> Standard #51](https://unicode.org/reports/tr51/) in `java.lang.Character` >> class. This is per a request from the client group, as well as refining the >> cur

Re: RFR: 8291598: Matcher.appendReplacement should not create new StringBuilder instances [v2]

2023-03-15 Thread Roger Riggs
On Wed, 15 Mar 2023 18:47:09 GMT, Raffaello Giulietti wrote: >> Remove instantiation of `StringBuilder` > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > 8291598: Matcher.appendReplacement should not create new String

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v17]

2023-03-15 Thread Martin Doerr
> Implementation of "Foreign Function & Memory API" for linux on Power (Little > Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". > > This PR does not include code for VaList support because it's supposed to get > removed by [JDK-8299736](https://bugs.openjdk.org/browse

Re: RFR: 8291598: Matcher.appendReplacement should not create new StringBuilder instances [v2]

2023-03-15 Thread Raffaello Giulietti
> Remove instantiation of `StringBuilder` Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8291598: Matcher.appendReplacement should not create new StringBuilder instances Fix copyright year - Changes: - al

Re: RFR: JDK-8304063: tools/jpackage/share/AppLauncherEnvTest.java fails when checking LD_LIBRARY_PATH

2023-03-15 Thread Alexey Semenyuk
On Wed, 15 Mar 2023 11:46:22 GMT, Matthias Baesken wrote: > The test fails on Alpine Linux 3.17, when checking the environment variable > LD_LIBRARY_PATH; looks like the actual env variable is much longer than the > test expects. It turned out that at least on Linux (probably also on other OS

Re: RFR: 8304283: Modernize the switch statements in jdk.internal.foreign

2023-03-15 Thread Maurizio Cimadamore
On Wed, 15 Mar 2023 18:10:29 GMT, Per Minborg wrote: > This PR proposes changing old-type switch statements to newer forms of switch. Overall looks good. I've added a couple of optional comments for your consideration. src/java.base/share/classes/jdk/internal/foreign/abi/CallingSequenceBuilder

Re: RFR: 8291598: Matcher.appendReplacement should not create new StringBuilder instances

2023-03-15 Thread Raffaello Giulietti
On Wed, 15 Mar 2023 18:15:02 GMT, Raffaello Giulietti wrote: > Remove instantiation of `StringBuilder` Benchmark for the example in the documentation for `Matcher.appendReplacement()` before BenchmarkMode CntScore Error Units AppendReplacement.testAppen

RFR: 8291598: Matcher.appendReplacement should not create new StringBuilder instances

2023-03-15 Thread Raffaello Giulietti
Remove instantiation of `StringBuilder` - Commit messages: - 8291598: Matcher.appendReplacement should not create new StringBuilder instances Changes: https://git.openjdk.org/jdk/pull/13048/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13048&range=00 Issue: https://bugs

Re: RFR: 8303018: Unicode Emoji Properties [v2]

2023-03-15 Thread Naoto Sato
On Tue, 14 Mar 2023 17:09:54 GMT, Eirik Bjorsnos wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed method descriptions > > make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java > line 215: >

Re: RFR: 8303018: Unicode Emoji Properties [v2]

2023-03-15 Thread Naoto Sato
On Tue, 14 Mar 2023 20:47:55 GMT, Roger Riggs wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed method descriptions > > make/jdk/src/classes/build/tools/generatecharacter/EmojiData.java line 99: > >> 97:

Re: RFR: 8303018: Unicode Emoji Properties [v3]

2023-03-15 Thread Naoto Sato
> Proposing accessor methods to Emoji properties defined in [Unicode Technical > Standard #51](https://unicode.org/reports/tr51/) in `java.lang.Character` > class. This is per a request from the client group, as well as refining the > currently existing ad-hoc emoji implementation in regex. A CS

RFR: 8304283: Modernize the switch statements in jdk.internal.foreign

2023-03-15 Thread Per Minborg
This PR proposes changing old-type switch statements to newer forms of switch. - Commit messages: - Update copyright years - Modernize the switch statements in jdk.internal.foreign Changes: https://git.openjdk.org/jdk/pull/13047/files Webrev: https://webrevs.openjdk.org/?repo=jdk&

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v6]

2023-03-15 Thread Doug Simon
On Tue, 14 Mar 2023 16:06:06 GMT, Doug Simon wrote: >> This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for >> accessing annotations. The main differences from >> `java.lang.reflect.AnnotatedElement` are: >> * All methods in the `Annotated` interface explicitly specify requested

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v16]

2023-03-15 Thread Jorn Vernee
On Tue, 14 Mar 2023 22:52:44 GMT, Martin Doerr wrote: > Btw. the new cases in which we use int and short accesses when byteWidth is > not a power of 2 are never unaligned AFAICS. I guess _UNALIGNED is > unnecessary in the JAVA_INT_UNALIGNED and JAVA_SHORT_UNALIGNED. They are > always aligned w

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v16]

2023-03-15 Thread Jorn Vernee
On Tue, 14 Mar 2023 22:30:22 GMT, Martin Doerr wrote: >> Implementation of "Foreign Function & Memory API" for linux on Power (Little >> Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". >> >> This PR does not include code for VaList support because it's supposed to >>

Re: RFR: 8303022: "assert(allocates2(pc)) failed: not in CodeBuffer memory" When linking downcall handle [v3]

2023-03-15 Thread Vladimir Ivanov
On Fri, 10 Mar 2023 14:14:55 GMT, Jorn Vernee wrote: >> The issue is that the size of the code buffer is not large enough to hold >> the whole stub. >> >> Proposed solution is to scale the size of the stub with the number of >> arguments. I've adjusted sizes for both downcall and upcall stubs.

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v6]

2023-03-15 Thread Adam Sotona
On Tue, 14 Mar 2023 16:34:59 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - long lines wrapped >> - StripJavaDebugAttributesPlugin transformation fixed >> - VersionPropsPlugin transformation f

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v8]

2023-03-15 Thread Adam Sotona
> jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixed SystemModulesPlugin - Chan

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native

2023-03-15 Thread Archie L . Cobbs
On Thu, 23 Feb 2023 09:04:23 GMT, Justin Lu wrote: > This PR converts Unicode sequences to UTF-8 native in .properties file. > (Excluding the Unicode space and tab sequence). The conversion was done using > native2ascii. > > In addition, the build logic is adjusted to support reading in the >

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native

2023-03-15 Thread Jonathan Gibbons
On Thu, 23 Feb 2023 09:04:23 GMT, Justin Lu wrote: > This PR converts Unicode sequences to UTF-8 native in .properties file. > (Excluding the Unicode space and tab sequence). The conversion was done using > native2ascii. > > In addition, the build logic is adjusted to support reading in the >

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native

2023-03-15 Thread Justin Lu
On Tue, 7 Mar 2023 23:15:14 GMT, Jonathan Gibbons wrote: >> This PR converts Unicode sequences to UTF-8 native in .properties file. >> (Excluding the Unicode space and tab sequence). The conversion was done >> using native2ascii. >> >> In addition, the build logic is adjusted to support readin

RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native

2023-03-15 Thread Justin Lu
This PR converts Unicode sequences to UTF-8 native in .properties file. (Excluding the Unicode space and tab sequence). The conversion was done using native2ascii. In addition, the build logic is adjusted to support reading in the .properties files as UTF-8 during the conversion from .propertie

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test [v2]

2023-03-15 Thread Eirik Bjorsnos
On Wed, 15 Mar 2023 14:56:28 GMT, Eirik Bjorsnos wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update StringLatin1.canEncode to sync with same test in CharacterData.of > > Just for fun, I tried with a benchmark

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test [v2]

2023-03-15 Thread Eirik Bjorsnos
On Wed, 15 Mar 2023 14:57:43 GMT, Quan Anh Mai wrote: >>> The StringLatin1.canEncode regression disappears. >> >> I mixed things up so StringLatin1.canEncode was benchmarked without the >> updated code. >> >> Here are updated benchmark results: >> >> >> Baseline: >> >> >> Benchmark

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test [v2]

2023-03-15 Thread Francesco Nigro
On Wed, 15 Mar 2023 14:56:28 GMT, Eirik Bjorsnos wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update StringLatin1.canEncode to sync with same test in CharacterData.of > > Just for fun, I tried with a benchmark

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test [v2]

2023-03-15 Thread Quan Anh Mai
On Wed, 15 Mar 2023 14:23:35 GMT, Eirik Bjorsnos wrote: >> Many thanks to have tried, yep, I was curious indeed re the >> "StringLatin1.canEncode regression" case. >> I would still modify the benchmark to use inputs (I know that will make it >> memory bound sadly, due to reading inputs - but th

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test [v2]

2023-03-15 Thread Eirik Bjorsnos
On Wed, 15 Mar 2023 14:31:03 GMT, Eirik Bjorsnos wrote: >> By avoiding a bit shift operation for the latin1 fast-path test, we can >> speed up the `java.lang.CharacterData.of` method by ~25% for latin1 code >> points. >> >> The latin1 test is currently implemented as `ch >>> 8 == 0`. We can r

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test [v2]

2023-03-15 Thread Sergey Tsypanov
On Wed, 15 Mar 2023 14:31:03 GMT, Eirik Bjorsnos wrote: >> By avoiding a bit shift operation for the latin1 fast-path test, we can >> speed up the `java.lang.CharacterData.of` method by ~25% for latin1 code >> points. >> >> The latin1 test is currently implemented as `ch >>> 8 == 0`. We can r

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test [v2]

2023-03-15 Thread Eirik Bjorsnos
On Wed, 15 Mar 2023 12:00:59 GMT, Claes Redestad wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update StringLatin1.canEncode to sync with same test in CharacterData.of > > Nice one! @cl4es Do you agree that th

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test [v2]

2023-03-15 Thread Eirik Bjorsnos
On Wed, 15 Mar 2023 13:50:44 GMT, Francesco Nigro wrote: >> I created a randomized version of `Characters.isDigit` which tests with code >> points picked at random such that any category (Latin1, negative, different >> planes, unassiged) are equally probable. >> >> Baseline: >> >> >> Benchma

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test [v2]

2023-03-15 Thread Eirik Bjorsnos
> By avoiding a bit shift operation for the latin1 fast-path test, we can speed > up the `java.lang.CharacterData.of` method by ~25% for latin1 code points. > > The latin1 test is currently implemented as `ch >>> 8 == 0`. We can replace > this with `ch >= 0 && ch <= 0xFF` for a noticable perfor

Re: RFR: 8303697: ProcessTools doesn't print last line of process output [v2]

2023-03-15 Thread Leonid Mesnik
On Wed, 15 Mar 2023 14:23:06 GMT, Leonid Mesnik wrote: >> The StreamPumper is fixed to process the last line even it is not finishes >> with '\n' or '\r'. The test included. Testing with tier1-3 also to verify >> that tests are not broken. > > Leonid Mesnik has updated the pull request incremen

Re: RFR: 8303697: ProcessTools doesn't print last line of process output [v2]

2023-03-15 Thread Leonid Mesnik
> The StreamPumper is fixed to process the last line even it is not finishes > with '\n' or '\r'. The test included. Testing with tier1-3 also to verify > that tests are not broken. Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision: f

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test

2023-03-15 Thread Francesco Nigro
On Wed, 15 Mar 2023 13:42:22 GMT, Eirik Bjorsnos wrote: >> Can you check what happen adding much more inputs to the dataset including >> non-latin chars as well and use `-prof perfnorm` to check what `perf` report >> re branches/branch-misses? >> >> You can use `SplittableRandom` to pre-popula

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test

2023-03-15 Thread Eirik Bjorsnos
On Wed, 15 Mar 2023 12:37:24 GMT, Francesco Nigro wrote: >>> It seems reasonable to keep these two in sync, yes. (`CharacterData.of` >>> could even call into `StringLatin1.canEncode`, unless that's cause for some >>> performance anomaly) >> >> If I update `StringLatin1.canEncode` and call into

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test

2023-03-15 Thread Francesco Nigro
On Wed, 15 Mar 2023 12:28:05 GMT, Eirik Bjorsnos wrote: >>> `if (ch && 0xFF00 == 0) {` >> >> This seems to perform similar to baseline: >> >> >> Benchmark (codePoint) Mode Cnt Score Error Units >> Characters.isDigit 48 avgt 15 0.890 ± 0.025 ns/op >> Character

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test

2023-03-15 Thread Eirik Bjorsnos
On Wed, 15 Mar 2023 12:15:39 GMT, Eirik Bjorsnos wrote: >> It seems reasonable to keep these two in sync, yes. (`CharacterData.of` >> could even call into `StringLatin1.canEncode`, unless that's cause for some >> performance anomaly) > >> `if (ch && 0xFF00 == 0) {` > > This seems to perfor

Withdrawn: 8203035: Implement equals() and hashCode() for Throwable

2023-03-15 Thread duke
On Sat, 10 Dec 2022 18:11:30 GMT, Victor Toni wrote: > Being able to compare instances of Throwable allows simple detection of > exceptions raised by the same circumstances. Comparison allows for reduction > of excessive logging e.g. in hotspots without requiring custom code to > compare Throw

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test

2023-03-15 Thread Eirik Bjorsnos
On Wed, 15 Mar 2023 12:13:00 GMT, Claes Redestad wrote: >> Btw, I think we can do the same for `StringLatin1.canEncode()` > > It seems reasonable to keep these two in sync, yes. (`CharacterData.of` could > even call into `StringLatin1.canEncode`, unless that's cause for some > performance anoma

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test

2023-03-15 Thread Claes Redestad
On Wed, 15 Mar 2023 12:07:12 GMT, Sergey Tsypanov wrote: >> src/java.base/share/classes/java/lang/CharacterData.java line 72: >> >>> 70: >>> 71: static final CharacterData of(int ch) { >>> 72: if (ch >= 0 && ch <= 0xFF) { // fast-path >> >> Maybereducing to a single branch with

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v4]

2023-03-15 Thread Adam Sotona
On Tue, 14 Mar 2023 18:00:51 GMT, Mandy Chung wrote: >> Right, I'll fix it, thanks. > > Looks like `LineNumberTable` is not stripped even with > `Option.processLineNumbers(false)`. Yes, I forgot to transform code elements, where `Classfile.Option.processLineNumbers(false)` option is applied.

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test

2023-03-15 Thread Sergey Tsypanov
On Wed, 15 Mar 2023 11:58:14 GMT, Claes Redestad wrote: >> By avoiding a bit shift operation for the latin1 fast-path test, we can >> speed up the `java.lang.CharacterData.of` method by ~25% for latin1 code >> points. >> >> The latin1 test is currently implemented as `ch >>> 8 == 0`. We can r

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v7]

2023-03-15 Thread Adam Sotona
> jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixed StripJavaDebugAttribute to drop line num

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test

2023-03-15 Thread Claes Redestad
On Wed, 15 Mar 2023 11:26:21 GMT, Eirik Bjorsnos wrote: > By avoiding a bit shift operation for the latin1 fast-path test, we can speed > up the `java.lang.CharacterData.of` method by ~25% for latin1 code points. > > The latin1 test is currently implemented as `ch >>> 8 == 0`. We can replace

RFR: JDK-8304063: tools/jpackage/share/AppLauncherEnvTest.java fails when checking LD_LIBRARY_PATH

2023-03-15 Thread Matthias Baesken
The test fails on Alpine Linux 3.17, when checking the environment variable LD_LIBRARY_PATH; looks like the actual env variable is much longer than the test expects. It turned out that at least on Linux (probably also on other OS like AIX) the actual env variable has the expected string at it's

Re: RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test

2023-03-15 Thread Sergey Tsypanov
On Wed, 15 Mar 2023 11:26:21 GMT, Eirik Bjorsnos wrote: > By avoiding a bit shift operation for the latin1 fast-path test, we can speed > up the `java.lang.CharacterData.of` method by ~25% for latin1 code points. > > The latin1 test is currently implemented as `ch >>> 8 == 0`. We can replace

RFR: 8304245: Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test

2023-03-15 Thread Eirik Bjorsnos
By avoiding a bit shift operation for the latin1 fast-path test, we can speed up the `java.lang.CharacterData.of` method by ~25% for latin1 code points. The latin1 test is currently implemented as `ch >>> 8 == 0`. We can replace this with `ch >= 0 && ch <= 0xFF` for a noticable performance gain

RFR: 8304164: jdk/classfile/CorpusTest.java still fails after JDK-8303910

2023-03-15 Thread Adam Sotona
Massive parallel execution of parametrised CorpusTest junit tests revealed race condition in `ClassHierarchyImpl.CachedClassHierarchyResolver::getClassInfo`. The race condition may skip calculation of the ClassHierarchyInfo. In this specific case it caused SegmentScope not being identified as an

Integrated: 8294962: Convert java.base/jdk.internal.module package to use the Classfile API to modify and write module-info.class

2023-03-15 Thread Adam Sotona
On Fri, 25 Nov 2022 14:38:55 GMT, Adam Sotona wrote: > 8294962: java.base jdk.internal.module package uses ASM to modify and write > module-info.class. > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam This pull request has now been integrated. Changeset: 714b

Re: RFR: 8303697: ProcessTools doesn't print last line of process output

2023-03-15 Thread David Holmes
On Wed, 15 Mar 2023 05:41:33 GMT, Leonid Mesnik wrote: > The StreamPumper is fixed to process the last line even it is not finishes > with '\n' or '\r'. The test included. Testing with tier1-3 also to verify > that tests are not broken. Not clear on this one sorry. I would have thought the: i