Re: RFR: 8150442: Enforce Supported Platforms in Packager for MSI bundles

2025-02-06 Thread Alexey Semenyuk
On Thu, 6 Feb 2025 22:26:37 GMT, Alexander Matveev wrote: > Do you know what versions in PE headers of the main launcher and java.dll we > have in JDK 25? The major version is 6, and the minor version is 0. [List of Windows versions](https://learn.microsoft.com/en-us/windows/win32/sysinfo/oper

Integrated: 8344925: translet-name ignored when package-name is also set

2025-02-06 Thread Joe Wang
On Tue, 4 Feb 2025 18:30:34 GMT, Joe Wang wrote: > Fix an issue where the translet-name is incorrectly set when the package-name > is also specified. This pull request has now been integrated. Changeset: 3989a199 Author:Joe Wang URL: https://git.openjdk.org/jdk/commit/3989a199578fc

Re: RFR: 8024695: new File("").exists() returns false whereas it is the current working directory [v4]

2025-02-06 Thread Brian Burkhalter
> Update the specification of `java.io.File.exists()` to match its behavior, > which seems correct in the context of how the empty abstract pathname is > documented elsewhere in the class. Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The pull

Re: RFR: 8349509: [macos] Clean up macOS dead code in jpackage

2025-02-06 Thread Alexey Semenyuk
On Thu, 6 Feb 2025 23:19:16 GMT, Alexander Matveev wrote: > - Removed unused `INSTALLER_SUFFIX` bundler param. > - Removed unreachable if branch in `MacAppImageBuilder`. Marked as reviewed by asemenyuk (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/23504#pullrequestrevie

RFR: 8349509: [macos] Clean up macOS dead code in jpackage

2025-02-06 Thread Alexander Matveev
- Removed unused `INSTALLER_SUFFIX` bundler param. - Removed unreachable if branch in `MacAppImageBuilder`. - Commit messages: - 8349509: [macos] Clean up macOS dead code in jpackage Changes: https://git.openjdk.org/jdk/pull/23504/files Webrev: https://webrevs.openjdk.org/?repo=jd

Re: RFR: 8346567: Make Class.getModifiers() non-native [v6]

2025-02-06 Thread Coleen Phillimore
> The Class.getModifiers() method is implemented as a native method in > java.lang.Class to access a field that we've calculated when creating the > mirror. The field is final after that point. The VM doesn't need it anymore, > so there's no real need for the jdk code to call into the VM to get

Re: RFR: 8346567: Make Class.getModifiers() non-native [v5]

2025-02-06 Thread Coleen Phillimore
On Thu, 6 Feb 2025 14:31:28 GMT, Coleen Phillimore wrote: >> The Class.getModifiers() method is implemented as a native method in >> java.lang.Class to access a field that we've calculated when creating the >> mirror. The field is final after that point. The VM doesn't need it >> anymore, so

Re: RFR: 8349564: Clean warnings found in jpackage tests when building them with -Xlint:all [v2]

2025-02-06 Thread Alexey Semenyuk
On Thu, 6 Feb 2025 22:50:23 GMT, Alexander Matveev wrote: > do we need to add -Xlint:all -Werror as well when building helper classes? Good question. They are implicitly built by jtreg when requested through `@build jdk.jpackage.test.*` tag. I don't know how it constructs javac command line. @

Re: RFR: 8349564: Clean warnings found in jpackage tests when building them with -Xlint:all [v2]

2025-02-06 Thread Alexey Semenyuk
On Thu, 6 Feb 2025 22:36:51 GMT, Alexander Matveev wrote: >> Alexey Semenyuk has updated the pull request incrementally with one >> additional commit since the last revision: >> >> More cleanup > > test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TestBuilder.java line 299: > >> 297: } >

Re: RFR: 8349564: Clean warnings found in jpackage tests when building them with -Xlint:all [v3]

2025-02-06 Thread Alexey Semenyuk
> Clean warnings found in jpackage tests when building them with `-Xlint:all` > option in Eclipse IDE. > > They are: > - redundant imports (solution: remove) > - unused function/fields (solution: remove) > - missing SuppressWarnings-s (solution: add what is missing) > - redundant SuppressWar

Re: RFR: 8349564: Clean warnings found in jpackage tests when building them with -Xlint:all [v2]

2025-02-06 Thread Alexander Matveev
On Thu, 6 Feb 2025 19:36:27 GMT, Alexey Semenyuk wrote: >> Clean warnings found in jpackage tests when building them with `-Xlint:all` >> option in Eclipse IDE. >> >> They are: >> - redundant imports (solution: remove) >> - unused function/fields (solution: remove) >> - missing SuppressWarn

Re: RFR: 8349543: LinkedBlockingDeque does not immediately throw InterrruptedException in put/take

2025-02-06 Thread Martin Buchholz
On Wed, 5 Feb 2025 15:36:15 GMT, kabutz wrote: > The LinkedBlockingDeque does not behave consistently with other concurrency > components. If we call putFirst(), putLast(), takeFirst(), or takeLast() with > a thread that is interrupted, it does not immediately throw an > InterruptedException,

Re: RFR: 8150442: Enforce Supported Platforms in Packager for MSI bundles

2025-02-06 Thread Alexander Matveev
On Wed, 5 Feb 2025 20:11:36 GMT, Alexey Semenyuk wrote: > Enable MSI installers to block installation if the version of Windows is too > old. > > jpackage will read major and minor OS versions from PE headers of the main > launcher and `java.dll` in the app image. The combined version is the m

Re: RFR: 8344925: translet-name ignored when package-name is also set [v2]

2025-02-06 Thread Iris Clark
On Thu, 6 Feb 2025 20:19:53 GMT, Joe Wang wrote: >> Fix an issue where the translet-name is incorrectly set when the >> package-name is also specified. > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > update test Marked as rev

RFR: 8150442: Enforce Supported Platforms in Packager for MSI bundles

2025-02-06 Thread Alexey Semenyuk
Enable MSI installers to block installation if the version of Windows is too old. jpackage will read major and minor OS versions from PE headers of the main launcher and `java.dll` in the app image. The combined version is the minimal Windows version these executables can run. Thus, it will be

Re: RFR: 8346567: Make Class.getModifiers() non-native [v5]

2025-02-06 Thread Vladimir Ivanov
On Thu, 6 Feb 2025 14:31:28 GMT, Coleen Phillimore wrote: >> The Class.getModifiers() method is implemented as a native method in >> java.lang.Class to access a field that we've calculated when creating the >> mirror. The field is final after that point. The VM doesn't need it >> anymore, so

Re: RFR: 8346567: Make Class.getModifiers() non-native [v2]

2025-02-06 Thread Vladimir Ivanov
On Thu, 6 Feb 2025 13:08:31 GMT, Coleen Phillimore wrote: >> Does `static final` help here? > > Yes. Yes it does. Cases when a class mirror is a compile-time constant are already well-optimized. Non constant cases are the ones where missing optimization opportunities arise. In this particul

Re: RFR: 8344925: translet-name ignored when package-name is also set [v2]

2025-02-06 Thread Lance Andersen
On Thu, 6 Feb 2025 20:19:53 GMT, Joe Wang wrote: >> Fix an issue where the translet-name is incorrectly set when the >> package-name is also specified. > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > update test Marked as rev

Re: RFR: 8344925: translet-name ignored when package-name is also set [v2]

2025-02-06 Thread Joe Wang
> Fix an issue where the translet-name is incorrectly set when the package-name > is also specified. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: update test - Changes: - all: https://git.openjdk.org/jdk/pull/23446/fil

Re: RFR: 8344925: translet-name ignored when package-name is also set [v2]

2025-02-06 Thread Joe Wang
On Thu, 6 Feb 2025 17:58:08 GMT, Severin Gehwolf wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update test > > test/jaxp/javax/xml/jaxp/unittest/transform/PropertiesTest.java line 94: > >> 92: >> 93: if (ge

Re: RFR: 8344925: translet-name ignored when package-name is also set [v2]

2025-02-06 Thread Joe Wang
On Thu, 6 Feb 2025 18:04:47 GMT, Naoto Sato wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update test > > test/jaxp/javax/xml/jaxp/libs/jaxp/library/JUnitTestUtil.java line 33: > >> 31: public static final Strin

RFR: 8349284: Make libExplicitAttach work on static JDK

2025-02-06 Thread Jiangli Zhou
This is similar to https://github.com/openjdk/jdk/pull/23431 change. It removes libjvm.so as a recorded dependency for libExplicitAttach.so by not explicitly link libExplicitAttach.so with libjvm.so at build time. To do that, it also changes libExplicitAttach.c to dynamically lookup the JNI_GetC

RFR: 8349254: Disable "best-fit" mapping on Windows environment variables

2025-02-06 Thread Naoto Sato
This is a follow-on fix to [JDK-8337506](https://bugs.openjdk.org/browse/JDK-8337506). The Java launcher can take arguments from "JDK_JAVA_OPTIONS" environment variable, so the same processing is needed. Also, obsolete code for Windows 9x has been removed. - Commit messages: - ini

Re: RFR: 8349564: Clean warnings found in jpackage tests when building them with -Xlint:all [v2]

2025-02-06 Thread Alexey Semenyuk
> Clean warnings found in jpackage tests when building them with `-Xlint:all` > option in Eclipse IDE. > > They are: > - redundant imports (solution: remove) > - unused function/fields (solution: remove) > - missing SuppressWarnings-s (solution: add what is missing) > - redundant SuppressWar

Re: RFR: 8345687: Improve the implementation of SegmentFactories::allocateSegment [v3]

2025-02-06 Thread Quan Anh Mai
On Wed, 5 Feb 2025 10:18:01 GMT, Maurizio Cimadamore wrote: >> Only the return value of `CALLOC` is converted to `MemorySegment` in an >> equivalent way, I believe passing a `MemorySegment` to a downcall involves >> acquiring the corresponding segment? As a result, `FREE` is made to accept >>

Re: RFR: 8345687: Improve the implementation of SegmentFactories::allocateSegment [v5]

2025-02-06 Thread Quan Anh Mai
> Hi, > > This patch improves the performance of a typical `Arena::allocate` in several > ways: > > - Delay the creation of the NativeMemorySegmentImpl. This avoids the merge of > the instance with the one obtained from the call in the uncommon path, > increasing the chance the object being sc

Re: RFR: 8344925: translet-name ignored when package-name is also set

2025-02-06 Thread Naoto Sato
On Tue, 4 Feb 2025 18:30:34 GMT, Joe Wang wrote: > Fix an issue where the translet-name is incorrectly set when the package-name > is also specified. Marked as reviewed by naoto (Reviewer). test/jaxp/javax/xml/jaxp/libs/jaxp/library/JUnitTestUtil.java line 33: > 31: public static final St

Integrated: 8349092: File.getFreeSpace violates specification if quotas are in effect (win)

2025-02-06 Thread Brian Burkhalter
On Fri, 31 Jan 2025 00:19:02 GMT, Brian Burkhalter wrote: > On Windows, for `File.getFreeSpace` return the same value as returned by > `File.getUsableSpace`. This pull request has now been integrated. Changeset: 1a74ee64 Author:Brian Burkhalter URL: https://git.openjdk.org/jdk/comm

Integrated: 8349006: File.getCanonicalPath should remove "(on UNIX platforms)" from its specification

2025-02-06 Thread Brian Burkhalter
On Thu, 30 Jan 2025 15:41:41 GMT, Brian Burkhalter wrote: > The change made for > [JDK-8003887](https://bugs.openjdk.org/browse/JDK-8003887) updated > `File.getCanonicalPath` to resolve symbolic links on Windows, but its > specification was not modified to reflect this. Here it is proposed to

RFR: 8349564: Clean warnings found in jpackage tests when building them with -Xlint:all

2025-02-06 Thread Alexey Semenyuk
Clean warnings found in jpackage tests when building them with `-Xlint:all` option in Eclipse IDE. They are: - redundant imports (solution: remove) - unused function/fields (solution: remove) - missing SuppressWarnings-s (solution: add what is missing) - redundant SuppressWarnings-s (solutio

Re: RFR: 8344925: translet-name ignored when package-name is also set

2025-02-06 Thread Severin Gehwolf
On Tue, 4 Feb 2025 18:30:34 GMT, Joe Wang wrote: > Fix an issue where the translet-name is incorrectly set when the package-name > is also specified. test/jaxp/javax/xml/jaxp/unittest/transform/PropertiesTest.java line 94: > 92: > 93: if (generateTranslet) { > 94: //Files.

Re: RFR: 8344925: translet-name ignored when package-name is also set

2025-02-06 Thread Lance Andersen
On Tue, 4 Feb 2025 18:30:34 GMT, Joe Wang wrote: > Fix an issue where the translet-name is incorrectly set when the package-name > is also specified. Marked as reviewed by lancea (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/23446#pullrequestreview-2599444141

Re: RFR: 8349092: File.getFreeSpace violates specification if quotas are in effect (win)

2025-02-06 Thread Brian Burkhalter
On Thu, 6 Feb 2025 16:23:16 GMT, Naoto Sato wrote: >> On Windows, for `File.getFreeSpace` return the same value as returned by >> `File.getUsableSpace`. > > LGTM Thanks, @naotoj. I should note that the test passed on Linux and macOS, and JCK CI tiers 1-3 passed on Windows. - PR

Re: RFR: 8349006: File.getCanonicalPath should remove "(on UNIX platforms)" from its specification [v3]

2025-02-06 Thread Brian Burkhalter
On Thu, 6 Feb 2025 16:19:31 GMT, Naoto Sato wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8349006: Fix copyright year gaffe > > Marked as reviewed by naoto (Reviewer). Thanks, @naotoj. - PR Com

Re: RFR: 8349092: File.getFreeSpace violates specification if quotas are in effect (win)

2025-02-06 Thread Naoto Sato
On Fri, 31 Jan 2025 00:19:02 GMT, Brian Burkhalter wrote: > On Windows, for `File.getFreeSpace` return the same value as returned by > `File.getUsableSpace`. LGTM - Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23377#pullrequestreview-2599214

Re: RFR: 8349006: File.getCanonicalPath should remove "(on UNIX platforms)" from its specification [v3]

2025-02-06 Thread Naoto Sato
On Thu, 30 Jan 2025 18:40:28 GMT, Brian Burkhalter wrote: >> The change made for >> [JDK-8003887](https://bugs.openjdk.org/browse/JDK-8003887) updated >> `File.getCanonicalPath` to resolve symbolic links on Windows, but its >> specification was not modified to reflect this. Here it is proposed

Re: RFR: 8346567: Make Class.getModifiers() non-native [v5]

2025-02-06 Thread Chen Liang
On Thu, 6 Feb 2025 12:08:59 GMT, Coleen Phillimore wrote: >> If Class had other fields smaller than `int`, would be consider making this >> something like `char` to save space (allowing all the sub-word fields to be >> compacted)? > > I thought of doing this since I made modifiers u2 in the Hot

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v6]

2025-02-06 Thread Coleen Phillimore
> This change removes the native call and injected field for ProtectionDomain > in the java.lang.Class instance, and moves the field to be declared in Java. > Tested with tier1-4. Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v5]

2025-02-06 Thread Coleen Phillimore
On Thu, 6 Feb 2025 14:33:24 GMT, Alan Bateman wrote: >> Coleen Phillimore has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Update >> test/jdk/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java >> >>Co-authored-by: D

Re: [External] : Re: mapConcurrent() with InterruptedException

2025-02-06 Thread Jige Yu
Sorry, did the PR stop using Semaphore? I had naively thought that mapConcurrent() will keep a buffer of Future of all currently-running concurrent tasks (it can be a ConcurrentMap if we don't have to ensure FIFO). Upon interruption, the main thread can call .cancel(true) on all pending Futures;

Re: RFR: 8349543: LinkedBlockingDeque does not immediately throw InterrruptedException in put/take

2025-02-06 Thread kabutz
On Wed, 5 Feb 2025 18:38:40 GMT, Doug Lea wrote: > Thanks for finding this. The only question is whether we believe that any > existing usage might depend on current behavior, and if so should it be done > anyway? Good question - your call Doug. LinkedBlockingDeque's comment is the same as LI

Re: RFR: 8348556: Inlining fails earlier for MemorySegment::reinterpret [v5]

2025-02-06 Thread Per Minborg
> This PR proposes to add some `@ForceInline` annotations in the `Module` class > in order to assist inlining of FFM var/method handles. > > There are also some changes in other classes (notably `j.l.Object`) which, if > implemented, can take us four additional levels of inlining. However, there

Re: RFR: 8348556: Inlining fails earlier for MemorySegment::reinterpret [v5]

2025-02-06 Thread Per Minborg
On Thu, 6 Feb 2025 15:35:14 GMT, Per Minborg wrote: >> This PR proposes to add some `@ForceInline` annotations in the `Module` >> class in order to assist inlining of FFM var/method handles. >> >> There are also some changes in other classes (notably `j.l.Object`) which, >> if implemented, can

Re: RFR: 8348556: Inlining fails earlier for MemorySegment::reinterpret [v4]

2025-02-06 Thread Per Minborg
On Wed, 5 Feb 2025 14:43:52 GMT, Per Minborg wrote: >> This PR proposes to add some `@ForceInline` annotations in the `Module` >> class in order to assist inlining of FFM var/method handles. >> >> There are also some changes in other classes (notably `j.l.Object`) which, >> if implemented, can

RFR: 8349543: LinkedBlockingDeque does not immediately throw InterrruptedException in put/take

2025-02-06 Thread kabutz
The LinkedBlockingDeque does not behave consistently with other concurrency components. If we call putFirst(), putLast(), takeFirst(), or takeLast() with a thread that is interrupted, it does not immediately throw an InterruptedException, the way that ArrayBlockingQueue and LInkedBlockingQueue

Re: RFR: 8349543: LinkedBlockingDeque does not immediately throw InterrruptedException in put/take

2025-02-06 Thread Doug Lea
On Wed, 5 Feb 2025 15:36:15 GMT, kabutz wrote: > The LinkedBlockingDeque does not behave consistently with other concurrency > components. If we call putFirst(), putLast(), takeFirst(), or takeLast() with > a thread that is interrupted, it does not immediately throw an > InterruptedException,

Re: Adopting SequencedCollection via multi-release jars?

2025-02-06 Thread Kevin Bourrillion
Thanks Fabian! I am trying to get a conversation going about this, and I really appreciate this prod. The fact that a library API like Guava's still can’t use APIs from Java 9 (7 years later) is pretty sad. I am pretty sure there won't be any quick fixes, but I do think we need to push on this

Integrated: 8347842: ThreadPoolExecutor specification discusses RuntimePermission

2025-02-06 Thread Viktor Klang
On Thu, 16 Jan 2025 13:46:16 GMT, Viktor Klang wrote: > Removes ThreadPoolExecutor javadoc which mentions RuntimePermission. This pull request has now been integrated. Changeset: 5ec1aae2 Author:Viktor Klang URL: https://git.openjdk.org/jdk/commit/5ec1aae21e80d86c55df28a86935f50ae77

Re: RFR: 8349189: Speed up DateTime parse & format via Class File API [v11]

2025-02-06 Thread Alan Bateman
On Tue, 4 Feb 2025 13:39:28 GMT, Shaojin Wen wrote: >> By using the Class File API to dynamically generate a >> CompositePrinterParser, and defining DateTimePrinterParser[] printerParsers >> as a specific field, C2 can do TypeProfile optimization. >> >> Since the CompositePrinterParser is gene

Re: [External] : Re: mapConcurrent() with InterruptedException

2025-02-06 Thread Viktor Klang
After some more investigation it seems tractable to propagate interruption of the caller in sequential mode, but parallel mode will require much bigger considerations. I made a comment to that effect on the JBS issue: https://bugs.openjdk.org/browse/JDK-8349462?focusedId=14750017&page=com.atlas

Re: RFR: 8349503: Consolidate multi-byte access into ByteArray

2025-02-06 Thread Roger Riggs
On Wed, 5 Feb 2025 23:41:19 GMT, Chen Liang wrote: > `MethodHandles.byteArrayViewVarHandle` exposes checked multi-byte access to > byte arrays via VarHandle. This larger access speeds up many operations, yet > it cannot be used in early bootstrap, and as a result, people tend to use > `Unsafe`

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v5]

2025-02-06 Thread Alan Bateman
On Wed, 5 Feb 2025 17:57:29 GMT, Coleen Phillimore wrote: >> This change removes the native call and injected field for ProtectionDomain >> in the java.lang.Class instance, and moves the field to be declared in Java. >> Tested with tier1-4. > > Coleen Phillimore has updated the pull request incr

Re: RFR: 8349503: Consolidate multi-byte access into ByteArray

2025-02-06 Thread Per Minborg
On Wed, 5 Feb 2025 23:41:19 GMT, Chen Liang wrote: > `MethodHandles.byteArrayViewVarHandle` exposes checked multi-byte access to > byte arrays via VarHandle. This larger access speeds up many operations, yet > it cannot be used in early bootstrap, and as a result, people tend to use > `Unsafe`

Re: RFR: 8349503: Consolidate multi-byte access into ByteArray

2025-02-06 Thread Per Minborg
On Wed, 5 Feb 2025 23:41:19 GMT, Chen Liang wrote: > `MethodHandles.byteArrayViewVarHandle` exposes checked multi-byte access to > byte arrays via VarHandle. This larger access speeds up many operations, yet > it cannot be used in early bootstrap, and as a result, people tend to use > `Unsafe`

Re: RFR: 8349503: Consolidate multi-byte access into ByteArray

2025-02-06 Thread Paul Sandoz
On Wed, 5 Feb 2025 23:41:19 GMT, Chen Liang wrote: > `MethodHandles.byteArrayViewVarHandle` exposes checked multi-byte access to > byte arrays via VarHandle. This larger access speeds up many operations, yet > it cannot be used in early bootstrap, and as a result, people tend to use > `Unsafe`

Re: RFR: 8346567: Make Class.getModifiers() non-native [v2]

2025-02-06 Thread Coleen Phillimore
On Wed, 5 Feb 2025 21:26:29 GMT, Dean Long wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix copyright and param name > > src/hotspot/share/oops/instanceKlass.hpp line 1128: > >> 1126: #endif >> 1127: >> 1

Re: RFR: 8346567: Make Class.getModifiers() non-native [v5]

2025-02-06 Thread Coleen Phillimore
> The Class.getModifiers() method is implemented as a native method in > java.lang.Class to access a field that we've calculated when creating the > mirror. The field is final after that point. The VM doesn't need it anymore, > so there's no real need for the jdk code to call into the VM to get

Re: RFR: 8349503: Consolidate multi-byte access into ByteArray

2025-02-06 Thread Per Minborg
On Wed, 5 Feb 2025 23:41:19 GMT, Chen Liang wrote: > `MethodHandles.byteArrayViewVarHandle` exposes checked multi-byte access to > byte arrays via VarHandle. This larger access speeds up many operations, yet > it cannot be used in early bootstrap, and as a result, people tend to use > `Unsafe`

Integrated: 8346434: Add test for non-automatic service binding

2025-02-06 Thread Alexey Semenyuk
On Fri, 10 Jan 2025 21:23:22 GMT, Alexey Semenyuk wrote: > Added a test case to JLinkOptionsTest to test that jpackage doesn't bind > services in app's runtime by default. > > The test builds two app images for the same app. One with the default jlink > options and another with `--bind-service

Re: RFR: 8349503: Consolidate multi-byte access into ByteArray

2025-02-06 Thread Raffaello Giulietti
On Wed, 5 Feb 2025 23:41:19 GMT, Chen Liang wrote: > `MethodHandles.byteArrayViewVarHandle` exposes checked multi-byte access to > byte arrays via VarHandle. This larger access speeds up many operations, yet > it cannot be used in early bootstrap, and as a result, people tend to use > `Unsafe`

Re: RFR: 8346567: Make Class.getModifiers() non-native [v4]

2025-02-06 Thread Coleen Phillimore
> The Class.getModifiers() method is implemented as a native method in > java.lang.Class to access a field that we've calculated when creating the > mirror. The field is final after that point. The VM doesn't need it anymore, > so there's no real need for the jdk code to call into the VM to get

Re: RFR: 8346567: Make Class.getModifiers() non-native [v2]

2025-02-06 Thread Coleen Phillimore
On Wed, 5 Feb 2025 21:24:25 GMT, Dean Long wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix copyright and param name > > src/hotspot/share/compiler/compileLog.cpp line 116: > >> 114: print(" unload

Re: RFR: 8346567: Make Class.getModifiers() non-native [v2]

2025-02-06 Thread Coleen Phillimore
On Thu, 6 Feb 2025 04:37:17 GMT, Chen Liang wrote: >> OK, if the extra load turns out to be a problem in the future, we could look >> into why the compilers are generating the load when the Class is >> known/constant. If the old intrinsic was able to pull the constant out of >> the Klass, the

Re: RFR: 8346567: Make Class.getModifiers() non-native [v3]

2025-02-06 Thread Coleen Phillimore
> The Class.getModifiers() method is implemented as a native method in > java.lang.Class to access a field that we've calculated when creating the > mirror. The field is final after that point. The VM doesn't need it anymore, > so there's no real need for the jdk code to call into the VM to get

Re: RFR: 8346567: Make Class.getModifiers() non-native [v2]

2025-02-06 Thread Coleen Phillimore
On Tue, 4 Feb 2025 14:43:51 GMT, Coleen Phillimore wrote: >> The Class.getModifiers() method is implemented as a native method in >> java.lang.Class to access a field that we've calculated when creating the >> mirror. The field is final after that point. The VM doesn't need it >> anymore, so

Re: RFR: 8349503: Consolidate multi-byte access into ByteArray

2025-02-06 Thread Raffaello Giulietti
On Wed, 5 Feb 2025 23:41:19 GMT, Chen Liang wrote: > `MethodHandles.byteArrayViewVarHandle` exposes checked multi-byte access to > byte arrays via VarHandle. This larger access speeds up many operations, yet > it cannot be used in early bootstrap, and as a result, people tend to use > `Unsafe`

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v4]

2025-02-06 Thread Coleen Phillimore
On Thu, 6 Feb 2025 07:29:26 GMT, David Holmes wrote: >> @DanHeidinga suggested this for my other PR as a convention that's used for >> the j.l.Class constructor. > > I am still missing what can actually set a PD here, sorry. ?? Because the field is final, it has to be initialized in the constru

Re: RFR: 8346567: Make Class.getModifiers() non-native [v2]

2025-02-06 Thread Coleen Phillimore
On Wed, 5 Feb 2025 21:44:37 GMT, Dean Long wrote: >> @DanHeidinga Great explanation, thank you! > > If Class had other fields smaller than `int`, would be consider making this > something like `char` to save space (allowing all the sub-word fields to be > compacted)? I thought of doing this si

Re: [External] : Re: mapConcurrent() with InterruptedException

2025-02-06 Thread Viktor Klang
I think alignment in behavior between parallel Stream and mapConcurrent in terms of how interruptions are handled is a possible path forward. I decided to close the PR for now as I realized my parallel Stream example had misled me regarding its exception throwing, so I'll need to go back and ref

Re: Integrated: 8349537: Bad copyright in TestArrayStructs.java

2025-02-06 Thread Jaikiran Pai
On Thu, 6 Feb 2025 10:33:34 GMT, Tobias Hartmann wrote: > Added missing comma. > > Thanks, > Tobias Looks good and trivial to me. The new updated looks good and trivial too. - Marked as reviewed by jpai (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23489#pullrequestrev

Integrated: 8349537: Bad copyright in TestArrayStructs.java

2025-02-06 Thread Tobias Hartmann
On Thu, 6 Feb 2025 10:33:34 GMT, Tobias Hartmann wrote: > Added missing comma. > > Thanks, > Tobias This pull request has now been integrated. Changeset: 4618993e Author:Tobias Hartmann URL: https://git.openjdk.org/jdk/commit/4618993e27c806e5b349de98c020a91475727d65 Stats: 2 li

Integrated: 8349537: Bad copyright in TestArrayStructs.java

2025-02-06 Thread Tobias Hartmann
Added missing comma. Thanks, Tobias - Commit messages: - And another one - 8349537: Bad copyright in TestArrayStructs.java Changes: https://git.openjdk.org/jdk/pull/23489/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23489&range=00 Issue: https://bugs.openjdk.org/brow

Re: Integrated: 8349537: Bad copyright in TestArrayStructs.java

2025-02-06 Thread Tobias Hartmann
On Thu, 6 Feb 2025 10:33:34 GMT, Tobias Hartmann wrote: > Added missing comma. > > Thanks, > Tobias Thanks for the quick review! Thanks again! - PR Comment: https://git.openjdk.org/jdk/pull/23489#issuecomment-2639437494 PR Comment: https://git.openjdk.org/jdk/pull/23489#issuecomm

Withdrawn: 8349462: Gatherers.mapConcurrent could support async interrupts

2025-02-06 Thread Viktor Klang
On Wed, 5 Feb 2025 16:14:41 GMT, Viktor Klang wrote: > This change is likely going to need some extra verbiage in the spec for > mapConcurrent, and thus a CSR. > This behavior aligns mapConcurrent with how parallel streams work in > conjunction with interruptions of the caller thread. This pul

Re: RFR: 8349462: Gatherers.mapConcurrent could support async interrupts

2025-02-06 Thread Viktor Klang
On Thu, 6 Feb 2025 06:14:10 GMT, David Holmes wrote: >> This change is likely going to need some extra verbiage in the spec for >> mapConcurrent, and thus a CSR. >> This behavior aligns mapConcurrent with how parallel streams work in >> conjunction with interruptions of the caller thread. > > s

Re: RFR: 8349462: Gatherers.mapConcurrent could support async interrupts

2025-02-06 Thread Viktor Klang
On Wed, 5 Feb 2025 16:14:41 GMT, Viktor Klang wrote: > This change is likely going to need some extra verbiage in the spec for > mapConcurrent, and thus a CSR. > This behavior aligns mapConcurrent with how parallel streams work in > conjunction with interruptions of the caller thread. Closing

Re: RFR: 8345155: Add /native to native test in FFM

2025-02-06 Thread SendaoYan
On Wed, 5 Feb 2025 08:59:10 GMT, SendaoYan wrote: > Hi all, > > This PR add `/native` keyword in the test header for FFM tests. The `/native` > keyword will make run the related tests by jtreg standalone more friendly. > > I runed all the FFM tests without `-nativepath` argument and find the f

Integrated: 8345155: Add /native to native test in FFM

2025-02-06 Thread SendaoYan
On Wed, 5 Feb 2025 08:59:10 GMT, SendaoYan wrote: > Hi all, > > This PR add `/native` keyword in the test header for FFM tests. The `/native` > keyword will make run the related tests by jtreg standalone more friendly. > > I runed all the FFM tests without `-nativepath` argument and find the f