Integrated: 8345836: Stable annotation documentation is incomplete

2025-07-18 Thread Ioi Lam
On Wed, 16 Jul 2025 17:45:23 GMT, Ioi Lam wrote: > Please review this documentation update, authored by @rose00 and originally > pushed to the Leyden repo in [this > PR](https://github.com/openjdk/leyden/pull/26), where more comments can be > found regarding this update. This

Re: RFR: 8345836: Stable annotation documentation is incomplete

2025-07-18 Thread Ioi Lam
On Thu, 17 Jul 2025 17:07:48 GMT, Chen Liang wrote: >> Please review this documentation update, authored by @rose00 and originally >> pushed to the Leyden repo in [this >> PR](https://github.com/openjdk/leyden/pull/26), where more comments can be >> found regarding this update. > > Marked as r

Re: RFR: 8360555: Archive all unnamed modules in CDS full module graph

2025-07-17 Thread Ioi Lam
On Thu, 17 Jul 2025 12:35:54 GMT, Coleen Phillimore wrote: >> src/hotspot/share/classfile/modules.cpp line 777: >> >>> 775: if (CDSConfig::is_using_full_module_graph()) { >>> 776: precond(unnamed_module == >>> ClassLoaderDataShared::archived_boot_unnamed_module()); >>> 777: unnamed_mo

RFR: 8345836: Stable annotation documentation is incomplete

2025-07-16 Thread Ioi Lam
Please review this documentation update, authored by @rose00 and originally pushed to the Leyden repo in [this PR](https://github.com/openjdk/leyden/pull/26), where more comments can be found regarding this update. - Commit messages: - 8345836: stable annotation documentation is i

Re: RFR: 8360163: Replace hard-coded checks with AOTRuntimeSetup and AOTSafeClassInitializer [v11]

2025-07-09 Thread Ioi Lam
On Wed, 9 Jul 2025 13:25:22 GMT, Chen Liang wrote: >> I have updated this patch to avoid a redundant `runtimeSetup` annotation - >> we have agreed that the requirement for setup is a side effect of >> initialization, and such methods in AOTCI classes must be automatically >> recognized. This l

Re: RFR: 8360163: Create annotations to mark dumping method handles and runtime setup required classes [v10]

2025-07-08 Thread Ioi Lam
On Tue, 8 Jul 2025 17:20:34 GMT, Chen Liang wrote: >> I have updated this patch to avoid a redundant `runtimeSetup` annotation - >> we have agreed that the requirement for setup is a side effect of >> initialization, and such methods in AOTCI classes must be automatically >> recognized. This l

Re: RFR: 8360163: Create annotations to mark dumping method handles and runtime setup required classes [v8]

2025-07-02 Thread Ioi Lam
On Wed, 2 Jul 2025 23:18:38 GMT, Chen Liang wrote: >> src/hotspot/share/classfile/classFileParser.cpp line 5171: >> >>> 5169: InstanceKlass* intf = _transitive_interfaces->at(i); >>> 5170: if (intf->class_initializer() != nullptr) { >>> 5171: if (!intf->has_aot_safe_initializ

Re: RFR: 8360163: Create annotations to mark dumping method handles and runtime setup required classes [v8]

2025-07-02 Thread Ioi Lam
On Wed, 2 Jul 2025 18:47:58 GMT, Chen Liang wrote: >> I have updated this patch to avoid a redundant `runtimeSetup` annotation - >> we have agreed that the requirement for setup is a side effect of >> initialization, and such methods in AOTCI classes must be automatically >> recognized. This l

Re: RFR: 8360163: Create annotations to mark dumping method handles and runtime setup required classes [v8]

2025-07-02 Thread Ioi Lam
On Wed, 2 Jul 2025 18:47:58 GMT, Chen Liang wrote: >> I have updated this patch to avoid a redundant `runtimeSetup` annotation - >> we have agreed that the requirement for setup is a side effect of >> initialization, and such methods in AOTCI classes must be automatically >> recognized. This l

Re: RFR: 8360163: Create annotations to mark dumping method handles and runtime setup required classes [v5]

2025-07-01 Thread Ioi Lam
On Tue, 1 Jul 2025 23:20:59 GMT, Chen Liang wrote: >> I have updated this patch to avoid a redundant `runtimeSetup` annotation - >> we have agreed that the requirement for setup is a side effect of >> initialization, and such methods in AOTCI classes must be automatically >> recognized. This l

RFR: 8360555: Archive all unnamed modules in CDS full module graph

2025-07-01 Thread Ioi Lam
The CDS full module graph is supposed to contain a snapshot of the boot layer, which has 3 unnamed modules for the boot, platform and system class loaders. Each unnamed module is represented by a `java.lang.Module` Java object and a `ModuleEntry` C++ object. Currently, we archive only the `java

Integrated: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics

2025-05-28 Thread Ioi Lam
On Tue, 29 Apr 2025 04:50:42 GMT, Ioi Lam wrote: > This is the implementation of the draft [JEP: Ahead-of-time Command Line > Ergonomics](https://bugs.openjdk.org/browse/JDK-8350022) > > - Implemented new flag `AOTCacheOutput`, which can be used to create an AOT > cache using t

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v13]

2025-05-28 Thread Ioi Lam
> > # Create logging file for the AOT cache assembly phase > $ export AOT_TOOL_COMMAND=-Xlog:cds:file=log.txt > $ java -cp HelloWorld.jar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the Hot

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v12]

2025-05-22 Thread Ioi Lam
> > # Create logging file for the AOT cache assembly phase > $ export AOT_TOOL_COMMAND=-Xlog:cds:file=log.txt > $ java -cp HelloWorld.jar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the Hot

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v11]

2025-05-19 Thread Ioi Lam
> > # Create logging file for the AOT cache assembly phase > $ export AOT_TOOL_COMMAND=-Xlog:cds:file=log.txt > $ java -cp HelloWorld.jar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the Hot

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v10]

2025-05-19 Thread Ioi Lam
> > # Create logging file for the AOT cache assembly phase > $ export AOT_TOOL_COMMAND=-Xlog:cds:file=log.txt > $ java -cp HelloWorld.jar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the Hot

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v12]

2025-05-16 Thread Ioi Lam
On Wed, 14 May 2025 08:18:39 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v12]

2025-05-15 Thread Ioi Lam
On Wed, 14 May 2025 08:18:39 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Re: RFR: 8354083: Support --add-reads with -XX:+AOTClassLinking [v2]

2025-05-14 Thread Ioi Lam
On Thu, 15 May 2025 00:16:32 GMT, Calvin Cheung wrote: >> This fix adds the `--add-reads` support for CDS and AOTClassLinking. >> Before the fix, if the `--add-reads` is specified during CDS archive >> dumping, the user will see the following log if `-Xlog:cds=info` is enabled: >> `[0.000s][info

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v9]

2025-05-14 Thread Ioi Lam
ar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the HotSpot native > APIs are not sufficient (no way to set env vars for child process). Ioi Lam has updated the pull request with a new target base due to

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v8]

2025-05-14 Thread Ioi Lam
On Wed, 14 May 2025 15:38:06 GMT, Vladimir Kozlov wrote: >> Ioi Lam has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - java.md updates from @rose00 >> - Resolved differences with CSR JDK-8356010 > > s

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v12]

2025-05-14 Thread Ioi Lam
On Wed, 14 May 2025 10:12:11 GMT, Timofei Pushkin wrote: > Sorry, had to pause working on this for some time because of other stuff. > > I believe I have addressed all the existing comments now. Thanks for making the changes. Once this PR has 2 reviews and is final, I will run some tests in o

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v12]

2025-05-14 Thread Ioi Lam
On Wed, 14 May 2025 08:18:39 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v8]

2025-05-13 Thread Ioi Lam
ar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the HotSpot native > APIs are not sufficient (no way to set env vars for child process). Ioi Lam has updated the pull request incrementally with two a

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v7]

2025-05-12 Thread Ioi Lam
ar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the HotSpot native > APIs are not sufficient (no way to set env vars for child process). Ioi Lam has updated the pull request incrementally with one

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v6]

2025-05-12 Thread Ioi Lam
ar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the HotSpot native > APIs are not sufficient (no way to set env vars for child process). Ioi Lam has updated the pull request incrementall

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v5]

2025-05-12 Thread Ioi Lam
On Mon, 12 May 2025 21:17:10 GMT, Ioi Lam wrote: >> This is the implementation of the draft [JEP: Ahead-of-time Command Line >> Ergonomics](https://bugs.openjdk.org/browse/JDK-8350022) >> >> - Implemented new flag `AOTCacheOutput`, which can be used to create an AOT

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v5]

2025-05-12 Thread Ioi Lam
ar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the HotSpot native > APIs are not sufficient (no way to set env vars for child process). Ioi Lam has updated the pull request with a new target base due t

Re: RFR: 8354890: AOT-initialize j.l.i.MethodHandleImpl and inner classes [v3]

2025-05-09 Thread Ioi Lam
On Mon, 5 May 2025 23:50:41 GMT, Chen Liang wrote: >> Ioi Lam has updated the pull request with a new target base due to a merge >> or a rebase. The pull request now contains 20 commits: >> >> - Merge branch 'master' into >> 8354890-aot-init-methodhan

Integrated: 8354890: AOT-initialize j.l.i.MethodHandleImpl and inner classes

2025-05-09 Thread Ioi Lam
On Tue, 29 Apr 2025 22:59:29 GMT, Ioi Lam wrote: > This is a general fix for all the "points to a static field that may hold a > different value" failures related to `java/lang/invoke/MethodHandleImpl`. > E.g., [JDK-8354840](https://bugs.openjdk.org/browse/JDK-8354840), &g

Re: RFR: 8354890: AOT-initialize j.l.i.MethodHandleImpl and inner classes [v3]

2025-05-08 Thread Ioi Lam
ly this will > reduce the likelihood for innocent core lib changes breaking the AOT assembly > phase. Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits: - Merge branch 'master' into 8354890-aot-ini

Re: RFR: 8354083: Support --add-reads with -XX:+AOTClassLinking

2025-05-07 Thread Ioi Lam
On Thu, 8 May 2025 00:19:17 GMT, Calvin Cheung wrote: > This fix adds the `--add-reads` support for CDS and AOTClassLinking. > Before the fix, if the `--add-reads` is specified during CDS archive dumping, > the user will see the following log if `-Xlog:cds=info` is enabled: > `[0.000s][info][cds

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v3]

2025-05-06 Thread Ioi Lam
On Wed, 7 May 2025 02:33:50 GMT, Ashutosh Mehra wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @vnkozlov comments > > src/hotspot/share/cds/cdsConfig.cpp line 428: > >> 426:

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v4]

2025-05-06 Thread Ioi Lam
ar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the HotSpot native > APIs are not sufficient (no way to set env vars for child process). Ioi Lam has updated the pull request incrementall

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v3]

2025-05-05 Thread Ioi Lam
On Mon, 5 May 2025 16:21:56 GMT, Vladimir Kozlov wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @vnkozlov comments > > src/hotspot/share/cds/cdsConfig.cpp line 412: > >>

Re: RFR: 8354890: AOT-initialize j.l.i.MethodHandleImpl and inner classes [v2]

2025-05-05 Thread Ioi Lam
ly this will > reduce the likelihood for innocent core lib changes breaking the AOT assembly > phase. Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: Comments from @liach and @ExE-Boss - Changes: - all: https://git.o

Re: RFR: 8354890: AOT-initialize j.l.i.MethodHandleImpl and inner classes

2025-05-05 Thread Ioi Lam
On Thu, 1 May 2025 18:52:22 GMT, Andrew Dinn wrote: > @iklam We have seen this problem with Red Hat deployments in jdk24 as well as > jdk25-ea. > > I'm saying that mostly for information. However, I do have to ask: If this is > fixed for jdk25 is there any question of also fixing it in jdk24?

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v3]

2025-05-04 Thread Ioi Lam
On Tue, 29 Apr 2025 15:56:59 GMT, Vladimir Kozlov wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @vnkozlov comments > > src/hotspot/share/cds/metaspaceShared.cpp line 1068: > >>

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics

2025-05-04 Thread Ioi Lam
On Tue, 29 Apr 2025 15:48:12 GMT, Vladimir Kozlov wrote: > JEP and CSR call env var :`JAVA_AOT_OPTIONS`. This description and changes > call it `AOT_TOOL_OPTIONS`. Please, fix. Fixed. - PR Comment: https://git.openjdk.org/jdk/pull/24942#issuecomment-2849668130

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v3]

2025-05-04 Thread Ioi Lam
ar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the HotSpot native > APIs are not sufficient (no way to set env vars for child process). Ioi Lam has updated the pull request incrementally with one additi

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v2]

2025-05-04 Thread Ioi Lam
ar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot > HelloWorld > > > Note: the child process is launched with Java API because the HotSpot native > APIs are not sufficient (no way to set env vars for child process). Ioi Lam has updated the pull request incrementally with one ad

RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics

2025-05-04 Thread Ioi Lam
This is the implementation of the draft [JEP: Ahead-of-time Command Line Ergonomics](https://bugs.openjdk.org/browse/JDK-8350022) - Implemented new flag `AOTCacheOutput`, which can be used to create an AOT cache using the "one-command workflow" - Added processing of the `AOT_TOOL_OPTIONS` enviro

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v9]

2025-04-30 Thread Ioi Lam
On Thu, 1 May 2025 02:01:36 GMT, ExE Boss wrote: >> Ioi Lam has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - @AlanBateman comments >> - @xmas92 comments > > src/java.base/share/classes/java/lang/re

RFR: 8354890: AOT-initialize j.l.i.MethodHandleImpl and inner classes

2025-04-30 Thread Ioi Lam
This is a general fix for all the "points to a static field that may hold a different value" failures related to `java/lang/invoke/MethodHandleImpl`. E.g., [JDK-8354840](https://bugs.openjdk.org/browse/JDK-8354840), [JDK-8353330](https://bugs.openjdk.org/browse/JDK-8353330). AOT-cached method h

Re: RFR: 8354890: AOT-initialize j.l.i.MethodHandleImpl and inner classes

2025-04-30 Thread Ioi Lam
On Tue, 29 Apr 2025 22:59:29 GMT, Ioi Lam wrote: > This is a general fix for all the "points to a static field that may hold a > different value" failures related to `java/lang/invoke/MethodHandleImpl`. > E.g., [JDK-8354840](https://bugs.openjdk.org/browse/JDK-8354840), &g

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v9]

2025-04-30 Thread Ioi Lam
On Wed, 30 Apr 2025 17:45:04 GMT, Ioi Lam wrote: >> This PR contains 2 parts >> >> - Upstream of Soft/Weak Reference support authored by @macarte from [the >> Leyden >> repo](https://github.com/openjdk/leyden/commit/4ca75d156519596e23abc8a312496b

Integrated: 8354897: Support Soft/Weak Reference in AOT cache

2025-04-30 Thread Ioi Lam
On Fri, 18 Apr 2025 18:31:05 GMT, Ioi Lam wrote: > This PR contains 2 parts > > - Upstream of Soft/Weak Reference support authored by @macarte from [the > Leyden > repo](https://github.com/openjdk/leyden/commit/4ca75d156519596e23abc8a312496b7c2f0e0ca5) &g

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v8]

2025-04-30 Thread Ioi Lam
On Wed, 30 Apr 2025 15:40:35 GMT, Ioi Lam wrote: >> src/java.base/share/classes/java/lang/ref/Reference.java line 313: >> >>> 311: } >>> 312: >>> 313: private static void runtimeSetup() { >> >> I don't know if you are planning an

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v8]

2025-04-30 Thread Ioi Lam
On Wed, 30 Apr 2025 08:47:59 GMT, Axel Boldt-Christmas wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Renamed the internal field ReferenceQueue.NULL to NULL_QUEUE to avoid >>

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v9]

2025-04-30 Thread Ioi Lam
set of references objects in the AOT cache. > > In the future, we may relax the implementation to allow for other use cases. Ioi Lam has updated the pull request incrementally with two additional commits since the last revision: - @AlanBateman comments - @xmas92 comments --

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v8]

2025-04-30 Thread Ioi Lam
On Wed, 30 Apr 2025 13:43:28 GMT, Alan Bateman wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Renamed the internal field ReferenceQueue.NULL to NULL_QUEUE to avoid >> failing hotspot

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v7]

2025-04-29 Thread Ioi Lam
On Wed, 30 Apr 2025 00:28:40 GMT, Zhengyu Gu wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @fisk comment -- use proper HeapAccess to load referent; Also refactor >> AOTReferenceOb

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v8]

2025-04-29 Thread Ioi Lam
set of references objects in the AOT cache. > > In the future, we may relax the implementation to allow for other use cases. Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: Renamed the internal field ReferenceQueue.NULL to NULL_QUE

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v7]

2025-04-29 Thread Ioi Lam
set of references objects in the AOT cache. > > In the future, we may relax the implementation to allow for other use cases. Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: @fisk comment -- use proper HeapAccess to load referent;

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v6]

2025-04-29 Thread Ioi Lam
set of references objects in the AOT cache. > > In the future, we may relax the implementation to allow for other use cases. Ioi Lam 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 m

Re: RFR: 8342283: CDS cannot handle a large number of classes [v2]

2025-04-29 Thread Ioi Lam
On Mon, 28 Apr 2025 09:20:38 GMT, Aleksey Shipilev wrote: >> CDS cannot handle large number of classes, because `ClassLoader` data >> structures get too large for CDS archival. The new test captures such an >> occasion. We do `clear()`-s, but that is not enough to trim the backing >> storages

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v4]

2025-04-28 Thread Ioi Lam
On Mon, 28 Apr 2025 12:51:13 GMT, Dan Heidinga wrote: >> In my mind, `MethodType::prepareForAOTCache()` makes sure all data used by >> `MethodType` are ready to be cached. `ReferenceKeySet::prepareForAOTCache()` >> does the same for this particular `ReferenceKeySet` instance. >> >> Potentially

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v4]

2025-04-27 Thread Ioi Lam
On Fri, 25 Apr 2025 19:39:01 GMT, Dan Heidinga wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @fisk comment > > src/hotspot/share/cds/aotReferenceObjSupport.cpp line 106: &

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v4]

2025-04-27 Thread Ioi Lam
On Fri, 25 Apr 2025 19:17:51 GMT, Dan Heidinga wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @fisk comment > > src/hotspot/share/cds/aotReferenceObjSupport.cpp line 76: > >>

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v5]

2025-04-27 Thread Ioi Lam
set of references objects in the AOT cache. > > In the future, we may relax the implementation to allow for other use cases. Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: @DanHeidinga comments - Changes: - all: h

Re: RFR: 8342283: CDS cannot handle a large number of classes

2025-04-25 Thread Ioi Lam
On Fri, 25 Apr 2025 14:49:37 GMT, Aleksey Shipilev wrote: > CDS cannot handle large number of classes, because `ClassLoader` data > structures get too large for CDS archival. The new test captures such an > occasion. We do `clear()`-s, but that is not enough to trim the backing > storages for

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v4]

2025-04-24 Thread Ioi Lam
set of references objects in the AOT cache. > > In the future, we may relax the implementation to allow for other use cases. Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: @fisk comment - Changes: - all: https://gi

Re: RFR: 8352003: Support --add-opens with -XX:+AOTClassLinking [v7]

2025-04-24 Thread Ioi Lam
On Fri, 25 Apr 2025 04:23:12 GMT, Calvin Cheung wrote: >> This RFE allows --add-opens to be specified for AOT cache creation. AOT >> cache can be used during production run with --add-opens option as long as >> the same set of options is used during assembly phase. >> >> Passed tiers 1 - 4 tes

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v3]

2025-04-24 Thread Ioi Lam
set of references objects in the AOT cache. > > In the future, we may relax the implementation to allow for other use cases. Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: Fixed windows path issues - Changes:

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v2]

2025-04-24 Thread Ioi Lam
set of references objects in the AOT cache. > > In the future, we may relax the implementation to allow for other use cases. Ioi Lam has updated the pull request incrementally with three additional commits since the last revision: - Refactored code - Fixed error when running "make

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache

2025-04-24 Thread Ioi Lam
On Thu, 24 Apr 2025 21:01:11 GMT, Erik Ă–sterlund wrote: >> src/java.base/share/classes/jdk/internal/util/ReferencedKeyMap.java line 355: >> >>> 353: if (referent == null) { >>> 354: // We don't need this key anymore. Add to stale queue >>> 355: ((Refer

RFR: 8354897: Support Soft/Weak Reference in AOT cache

2025-04-24 Thread Ioi Lam
This PR contains 2 parts - Upstream of Soft/Weak Reference support authored by @macarte from [the Leyden repo](https://github.com/openjdk/leyden/commit/4ca75d156519596e23abc8a312496b7c2f0e0ca5) - New C++ class `AOTReferenceObjSupport` and new Java method `ReferencedKeyMap::prepareForAOTCache()`

Re: RFR: 8352003: Support --add-opens with -XX:+AOTClassLinking [v5]

2025-04-21 Thread Ioi Lam
On Tue, 22 Apr 2025 05:31:01 GMT, Calvin Cheung wrote: >> This RFE allows --add-opens to be specified for AOT cache creation. AOT >> cache can be used during production run with --add-opens option as long as >> the same set of options is used during assembly phase. >> >> Passed tiers 1 - 4 tes

Re: RFR: 8352003: Support --add-opens with -XX:+AOTClassLinking [v3]

2025-04-21 Thread Ioi Lam
On Mon, 21 Apr 2025 06:20:46 GMT, Calvin Cheung wrote: >> This RFE allows --add-opens to be specified for AOT cache creation. AOT >> cache can be used during production run with --add-opens option as long as >> the same set of options is used during assembly phase. >> >> Passed tiers 1 - 4 tes

Re: RFR: 8352003: Support --add-opens with -XX:+AOTClassLinking [v3]

2025-04-21 Thread Ioi Lam
On Mon, 21 Apr 2025 06:20:46 GMT, Calvin Cheung wrote: >> This RFE allows --add-opens to be specified for AOT cache creation. AOT >> cache can be used during production run with --add-opens option as long as >> the same set of options is used during assembly phase. >> >> Passed tiers 1 - 4 tes

Re: RFR: 8352003: Support --add-opens with -XX:+AOTClassLinking

2025-04-17 Thread Ioi Lam
On Thu, 17 Apr 2025 23:00:25 GMT, Calvin Cheung wrote: > > Do we have a test case where `--add-opens` is used both at dump time and > > run time? That will verify that `--add-opens` at dump time is correctly > > processed. > > Yes, the new test `AddopensOption.java` uses the `--add-opens` both

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v10]

2025-04-17 Thread Ioi Lam
On Thu, 17 Apr 2025 07:14:25 GMT, Timofei Pushkin wrote: >> src/hotspot/share/cds/classListParser.cpp line 517: >> >>> 515: return; >>> 516: } >>> 517: assert(!supertype->is_shared_unregistered_class(), "unregistered >>> supertype cannot be overshadowed"); >> >> Does this always preven

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v11]

2025-04-17 Thread Ioi Lam
On Thu, 17 Apr 2025 07:41:36 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Re: RFR: 8352003: Support --add-opens with -XX:+AOTClassLinking

2025-04-17 Thread Ioi Lam
On Wed, 16 Apr 2025 18:21:41 GMT, Calvin Cheung wrote: > This RFE allows --add-opens to be specified for AOT cache creation. AOT cache > can be used during production run with --add-opens option as long as the same > set of options is used during assembly phase. > > Passed tiers 1 - 4 testing.

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v10]

2025-04-16 Thread Ioi Lam
On Wed, 16 Apr 2025 14:34:25 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Integrated: 8352001: AOT cache should not contain classes injected into built-in class loaders

2025-04-16 Thread Ioi Lam
On Fri, 14 Mar 2025 05:28:47 GMT, Ioi Lam wrote: > During an application's training run, it's possible to inject classes into > the built-in platform/app class loaders with reflection calls. > > - Before [JDK-8348426](https://bugs.openjdk.org/browse/JDK-8348426), only

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v4]

2025-04-16 Thread Ioi Lam
On Wed, 16 Apr 2025 17:16:51 GMT, Calvin Cheung wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removed unnecessary include > > Marked as reviewed by ccheung (Reviewer). Thanks @calvin

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v3]

2025-04-16 Thread Ioi Lam
On Wed, 16 Apr 2025 16:44:05 GMT, Calvin Cheung wrote: >> Ioi Lam 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 five

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v4]

2025-04-16 Thread Ioi Lam
OT cache. This new behavior may cause some > applications to fail, as they may inject bytecodes that have environment > dependencies. > > For safety, this PR filters out such injected classes from the AOT config > file. Ioi Lam has updated the pull request incrementally with one ad

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v2]

2025-04-15 Thread Ioi Lam
On Tue, 15 Apr 2025 21:54:56 GMT, Calvin Cheung wrote: >> Ioi Lam 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 two

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v2]

2025-04-15 Thread Ioi Lam
On Tue, 15 Apr 2025 19:49:55 GMT, Matias Saavedra Silva wrote: >> Ioi Lam 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 conta

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v3]

2025-04-15 Thread Ioi Lam
OT cache. This new behavior may cause some > applications to fail, as they may inject bytecodes that have environment > dependencies. > > For safety, this PR filters out such injected classes from the AOT config > file. Ioi Lam has updated the pull request with a new target base

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v6]

2025-04-14 Thread Ioi Lam
On Mon, 14 Apr 2025 15:23:07 GMT, Timofei Pushkin wrote: >> test/hotspot/jtreg/runtime/cds/appcds/customLoader/ClassFromClasspath.java >> line 53: >> >>> 51: out.shouldContain("unreg CustomLoadee"); >>> 52: } >>> 53: } >> >> For completeness, I think we should have a more complicat

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v2]

2025-04-12 Thread Ioi Lam
OT cache. This new behavior may cause some > applications to fail, as they may inject bytecodes that have environment > dependencies. > > For safety, this PR filters out such injected classes from the AOT config > file. Ioi Lam has updated the pull request with a new target base

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v4]

2025-04-10 Thread Ioi Lam
On Tue, 8 Apr 2025 11:46:27 GMT, Timofei Pushkin wrote: >> src/java.base/share/classes/jdk/internal/misc/CDS.java line 444: >> >>> 442: protected Class findClass(String name) throws >>> ClassNotFoundException { >>> 443: // Unregistered classes should be found in load(...),

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v6]

2025-04-10 Thread Ioi Lam
On Wed, 9 Apr 2025 18:37:15 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sepa

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v5]

2025-04-10 Thread Ioi Lam
On Thu, 10 Apr 2025 15:50:56 GMT, Ioi Lam wrote: >> I've realized that my example cannot be expressed in the current class list >> format since the format doesn't distinguish between and , >> only that S is not unregistered. The existing implementation will always

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v5]

2025-04-10 Thread Ioi Lam
On Wed, 9 Apr 2025 16:43:39 GMT, Timofei Pushkin wrote: >> I've actually noticed a problem here. I assumed that registered classes are >> always loaded by JDK's built-in class loaders (bootstrap, >> `jdk.internal.loader.ClassLoaders$PlatformClassLoader` or >> `jdk.internal.loader.ClassLoaders$

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v4]

2025-04-09 Thread Ioi Lam
On Mon, 7 Apr 2025 07:46:52 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sepa

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v5]

2025-04-08 Thread Ioi Lam
On Tue, 8 Apr 2025 12:09:59 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sepa

Withdrawn: 8352107: Allow jtreg test cases to query test VM properties

2025-04-05 Thread Ioi Lam
On Sun, 16 Mar 2025 02:54:36 GMT, Ioi Lam wrote: > This PR tries to cut down the use of `WhiteBox` in the HotSpot test cases. It > modifies `VMProps` to save the set of VM properties into a file called > "vm.properties" under Jtreg's work directory. The new API >

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v3]

2025-04-04 Thread Ioi Lam
On Fri, 4 Apr 2025 18:13:24 GMT, Timofei Pushkin wrote: >> src/java.base/share/classes/jdk/internal/misc/CDS.java line 446: >> >>> 444: protected Class findClass(String name) throws >>> ClassNotFoundException { >>> 445: // Unregistered classes should be found in load(...),

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v3]

2025-04-04 Thread Ioi Lam
On Fri, 4 Apr 2025 18:17:14 GMT, Timofei Pushkin wrote: >> src/java.base/share/classes/jdk/internal/misc/CDS.java line 420: >> >>> 418: // class loader. Thus it is safe to delegate their >>> loading to system class loader >>> 419: // (our parent) - this is what t

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive

2025-04-03 Thread Ioi Lam
On Tue, 25 Mar 2025 11:08:24 GMT, Timofei Pushkin wrote: > If a base class is package-private then its subclasses should have the same > package name and defining class loader, otherwise `IllegalAccessError` is > thrown when linking a subclass. Currently when dumping a static archive > separat

Integrated: 8352437: Support --add-exports with -XX:+AOTClassLinking

2025-04-01 Thread Ioi Lam
On Thu, 20 Mar 2025 04:46:21 GMT, Ioi Lam wrote: > `-XX:+AOTClassLinking` requires the CDS archived full module graph (FMG). > > - Before this PR, when `--add-export` is specified, FMG is disabled, so AOT > caches created with `-XX:+AOTClassLinking` cannot be loaded. > - Af

Re: RFR: 8352437: Support --add-exports with -XX:+AOTClassLinking [v2]

2025-04-01 Thread Ioi Lam
On Tue, 25 Mar 2025 04:15:11 GMT, Calvin Cheung wrote: >> Ioi Lam 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. > > Code changes look clea

Re: RFR: 8352437: Support --add-exports with -XX:+AOTClassLinking [v2]

2025-03-27 Thread Ioi Lam
On Tue, 25 Mar 2025 04:13:30 GMT, Calvin Cheung wrote: >> Ioi Lam has updated the pull request with a new target base due to a merge >> or a rebase. The pull request now contains six commits: >> >> - Fixed whitespaces >> - clean up >> - 8352437: -XX:+AO

Re: RFR: 8352437: Support --add-exports with -XX:+AOTClassLinking [v3]

2025-03-27 Thread Ioi Lam
in future RFEs). > > (Note: this PR depends on #24122 ) Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits: - @calvinccheung comments - Merge branch 'master' into 8352437-aot-class-linking-incompa

Re: RFR: 8352437: Support --add-exports with -XX:+AOTClassLinking [v3]

2025-03-27 Thread Ioi Lam
On Tue, 25 Mar 2025 04:12:23 GMT, Calvin Cheung wrote: >> Ioi Lam has updated the pull request with a new target base due to a merge >> or a rebase. The pull request now contains eight commits: >> >> - @calvinccheung comments >> - Merge branch 'master&

Re: RFR: 8352437: Support --add-exports with -XX:+AOTClassLinking [v2]

2025-03-27 Thread Ioi Lam
in future RFEs). > > (Note: this PR depends on #24122 ) Ioi Lam 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. - Changes: - all: https://git.openjdk.org/j

  1   2   3   4   >