Re: RFR: 8302496: Runtime.exit incorrectly says it never throws an exception

2023-04-30 Thread Alan Bateman
On Fri, 28 Apr 2023 21:44:58 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/lang/Runtime.java line 146: >> >>> 144: * If a security manager is present and its {@link >>> SecurityManager#checkExit checkExit} >>> 145: * method disallows exiting with the specified status, t

Re: RFR: 8303796: Optionally build fully statically linked JDK image

2023-04-30 Thread Alan Bateman
On Sun, 30 Apr 2023 18:53:40 GMT, Jorn Vernee wrote: > It seems that letting jlink do the linking is also a requirement for user > provided modules (.jmods) that contain native libraries (as is the case for > instance with jextract). We don't know about those libraries when building > the JDK.

Withdrawn: 8156916: intrinsify MethodHandles.arrayConstructor()

2023-04-30 Thread Chen Liang
On Sun, 30 Apr 2023 06:14:28 GMT, Chen Liang wrote: > Try to intrinsify MethodHandles.arrayConstructor for java.lang, > java.lang.invoke, and java.util types, which InvokerBytecodeGenerator can > refer to directly in a class constant. > > In fact, the performance difference of Array.newInstanc

Re: RFR: 8156916: intrinsify MethodHandles.arrayConstructor()

2023-04-30 Thread Chen Liang
On Sun, 30 Apr 2023 06:14:28 GMT, Chen Liang wrote: > Try to intrinsify MethodHandles.arrayConstructor for java.lang, > java.lang.invoke, and java.util types, which InvokerBytecodeGenerator can > refer to directly in a class constant. > > In fact, the performance difference of Array.newInstanc

Re: RFR: 8156916: intrinsify MethodHandles.arrayConstructor()

2023-04-30 Thread Chen Liang
On Sun, 30 Apr 2023 21:34:46 GMT, Jorn Vernee wrote: > What kind of performance improvement are you seeing? Could you add a > comparison with a method handle that calls `Array::newInstance` bound to the > array type? (that should have the same performance as the current > implementation). Tha

Re: RFR: 8156916: intrinsify MethodHandles.arrayConstructor()

2023-04-30 Thread Jorn Vernee
On Sun, 30 Apr 2023 06:14:28 GMT, Chen Liang wrote: > Try to intrinsify MethodHandles.arrayConstructor for java.lang, > java.lang.invoke, and java.util types, which InvokerBytecodeGenerator can > refer to directly in a class constant. > > In fact, the performance difference of Array.newInstanc

Re: RFR: 8291966: SwitchBootstrap.typeSwitch could be faster [v2]

2023-04-30 Thread Chen Liang
On Tue, 17 Jan 2023 15:55:40 GMT, Jan Lahoda wrote: >> The pattern matching switches are using a bootstrap method >> `SwitchBootstrap.typeSwitch` to implement the jumps in the switch. >> Basically, for a switch like: >> >> switch (obj) { >> case String s when s.isEmpty() -> {} >> case

Re: RFR: 8291966: SwitchBootstrap.typeSwitch could be faster [v2]

2023-04-30 Thread Rémi Forax
On Tue, 17 Jan 2023 15:55:40 GMT, Jan Lahoda wrote: >> The pattern matching switches are using a bootstrap method >> `SwitchBootstrap.typeSwitch` to implement the jumps in the switch. >> Basically, for a switch like: >> >> switch (obj) { >> case String s when s.isEmpty() -> {} >> case

Re: RFR: 8303796: Optionally build fully statically linked JDK image

2023-04-30 Thread Jorn Vernee
On Sun, 30 Apr 2023 18:34:12 GMT, Alan Bateman wrote: > A possible direction on this is for the build to create a set of packaged > modules with the .a files, then have an alternative image builder in jlink > that integrates with the native linker. Combined with other parts in > Jiangli's slid

Re: RFR: 8303796: Optionally build fully statically linked JDK image

2023-04-30 Thread Alan Bateman
On Fri, 28 Apr 2023 18:14:48 GMT, Erik Joelsson wrote: > The build is already capable of producing .a files and this patch is building > on top of that build feature. The current .a file creation is used by the > downstream graal build which needs it for nativeimage. Also builds on recent chan

RFR: 8305919: java/lang/Thread/virtual/HoldsLock.java#id0 failed, ThreadInfo.getLockInfo() return null

2023-04-30 Thread Alan Bateman
HoldsLock.java#id0 has been failing intermittently recently due to threads left over from previous tests terminating. HoldsLock.java#id1 doesn't fail as it runs in /othervm mode. The test uses ThreadMXBean::getAllThreadIds to get the ID of all threads and calls ThreadMXBean::getThreadInfo on eac

Re: RFR: 8291966: SwitchBootstrap.typeSwitch could be faster [v2]

2023-04-30 Thread Neal Gafter
On Tue, 17 Jan 2023 15:55:40 GMT, Jan Lahoda wrote: >> The pattern matching switches are using a bootstrap method >> `SwitchBootstrap.typeSwitch` to implement the jumps in the switch. >> Basically, for a switch like: >> >> switch (obj) { >> case String s when s.isEmpty() -> {} >> case

Re: RFR: 8303530: Add system property for custom JAXP configuration file [v9]

2023-04-30 Thread Alan Bateman
On Sun, 30 Apr 2023 07:23:16 GMT, Alan Bateman wrote: >> Joe Wang has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains ten additional commits >> sinc

Re: RFR: 8303530: Add system property for custom JAXP configuration file [v9]

2023-04-30 Thread Alan Bateman
On Fri, 28 Apr 2023 05:47:24 GMT, Joe Wang wrote: >> Add a system property, jdk.xml.config.file, to return the path to a custom >> JAXP configuration file. The current configuration file, jaxp.properties, >> that the JDK supports will become the default configuration file. >> >> CSR: https://b