Re: RFR: 8357691: File blocked.certs contains bad content when boot jdk 25 is used, sun/security/lib/CheckBlockedCerts.java failing

2025-09-25 Thread Ioi Lam
On Thu, 25 Sep 2025 09:10:40 GMT, Matthias Baesken wrote: > When using boot JDK 25 we end up with bad content in > lib/security/blocked.certs because cds related warning output shows up > there. > > The problem is with extra lines in the generated `blocked.certs` file, at the > start of th

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: 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: 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-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: 8355003: Implement JEP 515: Ahead-of-Time Method Profiling [v20]

2025-05-13 Thread Ioi Lam
On Tue, 13 May 2025 23:43:01 GMT, Igor Veresov wrote: >> Improve warm-up time by making profile data from a previous run of an >> application instantly available, when the HotSpot Java Virtual Machine >> starts. Specifically, enhance the [AOT cache](https://openjdk.org/jeps/483) >> to store me

Re: RFR: 8355003: Implement JEP 515: Ahead-of-Time Method Profiling [v19]

2025-05-13 Thread Ioi Lam
On Tue, 13 May 2025 22:40:42 GMT, Igor Veresov wrote: >> Improve warm-up time by making profile data from a previous run of an >> application instantly available, when the HotSpot Java Virtual Machine >> starts. Specifically, enhance the [AOT cache](https://openjdk.org/jeps/483) >> to store me

Re: RFR: 8355003: Implement JEP 515: Ahead-of-Time Method Profiling [v14]

2025-05-13 Thread Ioi Lam
On Tue, 13 May 2025 03:32:13 GMT, Igor Veresov wrote: >> src/hotspot/share/cds/filemap.cpp line 1955: >> >>> 1953: " does not equal the current >>> SpecTrapLimitExtraEntries setting (%d).", file_type, >>> 1954: _spec_trap_limit_extra_entries, >>> SpecTra

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: 8355003: Implement JEP 515: Ahead-of-Time Method Profiling [v14]

2025-05-12 Thread Ioi Lam
On Tue, 6 May 2025 21:50:34 GMT, Igor Veresov wrote: >> Improve warm-up time by making profile data from a previous run of an >> application instantly available, when the HotSpot Java Virtual Machine >> starts. Specifically, enhance the [AOT cache](https://openjdk.org/jeps/483) >> to store met

Re: RFR: 8356229: cmp-baseline build fail due to lib/modules difference

2025-05-09 Thread Ioi Lam
On Fri, 9 May 2025 17:22:41 GMT, Calvin Cheung wrote: > The fix for [JDK-8327495](https://bugs.openjdk.org/browse/JDK-8327495) logs > more CDS error by default. The error gets printed into the > `support/link_opt/default_jli_trace.txt` file which interferes with the > cmp-baseline build. > A f

Re: RFR: 8350209: Preserve adapters in AOT cache [v12]

2025-04-29 Thread Ioi Lam
On Wed, 30 Apr 2025 02:05:41 GMT, Vladimir Kozlov wrote: >> [JEP 483](https://bugs.openjdk.org/browse/JDK-8315737) preserves class >> information in AOT cache which helps Java startup performance. >> >> We should also preserve adapters (i2c, c2i) to further improve performance >> of class link

Re: RFR: 8350209: Preserve adapters in AOT cache [v11]

2025-04-29 Thread Ioi Lam
On Tue, 29 Apr 2025 15:29:08 GMT, Vladimir Kozlov wrote: >> [JEP 483](https://bugs.openjdk.org/browse/JDK-8315737) preserves class >> information in AOT cache which helps Java startup performance. >> >> We should also preserve adapters (i2c, c2i) to further improve performance >> of class link

Re: RFR: 8355003: Implement Ahead-of-Time Method Profiling

2025-04-26 Thread Ioi Lam
On Sun, 27 Apr 2025 01:11:39 GMT, Vladimir Kozlov wrote: >> I think it's OK to test without these two additional flags. This will make >> sure that the two diagnostic flags don't have any bad side effect even if >> AOT class linking is disabled (due to flags like -XX:+UseZGC). > > I see them in

Re: RFR: 8355003: Implement Ahead-of-Time Method Profiling

2025-04-26 Thread Ioi Lam
On Sun, 27 Apr 2025 00:02:41 GMT, Igor Veresov wrote: >> src/hotspot/share/cds/dumpAllocStats.hpp line 151: >> >>> 149: } >>> 150: >>> 151: void record_dynamic_proxy_class() { >> >> This is not called. This code seems not related. > > True. @iklam, this came with a change you wanted me to

Re: RFR: 8355003: Implement Ahead-of-Time Method Profiling

2025-04-26 Thread Ioi Lam
On Sat, 26 Apr 2025 23:35:01 GMT, Igor Veresov wrote: >> test/hotspot/jtreg/runtime/cds/appcds/aotProfile/AOTProfileFlags.java line >> 30: >> >>> 28: * @requires vm.cds >>> 29: * @comment work around JDK-8345635 >>> 30: * @requires !vm.jvmci.enabled >> >> Consider adding: >> >> * @require

Re: RFR: 8350209: Preserve adapters in AOT cache [v7]

2025-04-23 Thread Ioi Lam
On Thu, 24 Apr 2025 00:51:31 GMT, Vladimir Ivanov wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix message > > src/hotspot/share/cds/aotCacheAccess.hpp line 38: > >> 36: // AOT Cache API for AOT compiler >>

Re: RFR: 8350209: Preserve adapters in AOT cache [v4]

2025-04-22 Thread Ioi Lam
On Fri, 18 Apr 2025 18:45:24 GMT, Vladimir Kozlov wrote: >> [JEP 483](https://bugs.openjdk.org/browse/JDK-8315737) preserves class >> information in AOT cache which helps Java startup performance. >> >> We should also preserve adapters (i2c, c2i) to further improve performance >> of class link

Re: RFR: 8352084: Add more test code in TestSetupAOT.java [v3]

2025-04-04 Thread Ioi Lam
On Mon, 17 Mar 2025 16:07:09 GMT, Leonid Mesnik wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed windows path problem > > Marked as reviewed by lmesnik (Reviewer). Thanks @lmes

Integrated: 8352084: Add more test code in TestSetupAOT.java

2025-03-17 Thread Ioi Lam
On Fri, 14 Mar 2025 20:13:57 GMT, Ioi Lam wrote: > I modified TestSetupAOT.java to exercise more functionalities in the JDK so > that we can have a more substantial AOT cache when running tests with > `AOT_JDK=true`. E.g: > > > make test JTREG=AOT_JDK=true \ > TE

Re: RFR: 8352084: Add more test code in TestSetupAOT.java [v4]

2025-03-17 Thread Ioi Lam
a > > > Before: the generated AOT cache was about 20 MB, with 2245 classes and 125 > resolved indies > After: the generated AOT cache is about 34 MB, with 4703 classes and 912 > resolved indies > > I verified with Mach5 tiers 4, 5, 6, 10 with all tests tasks that have

Re: RFR: 8352084: Add more test code in TestSetupAOT.java [v3]

2025-03-15 Thread Ioi Lam
a > > > Before: the generated AOT cache was about 20 MB, with 2245 classes and 125 > resolved indies > After: the generated AOT cache is about 34 MB, with 4703 classes and 912 > resolved indies > > I verified with Mach5 tiers 4, 5, 6, 10 with all tests tasks that have

Re: RFR: 8352084: Add more test code in TestSetupAOT.java [v2]

2025-03-15 Thread Ioi Lam
On Fri, 14 Mar 2025 23:43:53 GMT, Erik Joelsson wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comments from @erikj79 and @lmesnik > > make/test/BuildTest

Re: RFR: 8352084: Add more test code in TestSetupAOT.java [v2]

2025-03-14 Thread Ioi Lam
a > > > Before: the generated AOT cache was about 20 MB, with 2245 classes and 125 > resolved indies > After: the generated AOT cache is about 34 MB, with 4703 classes and 912 > resolved indies > > I verified with Mach5 tiers 4, 5, 6, 10 with all tests tasks that have

Re: RFR: 8352084: Add more test code in TestSetupAOT.java [v2]

2025-03-14 Thread Ioi Lam
On Fri, 14 Mar 2025 23:21:59 GMT, Leonid Mesnik wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comments from @erikj79 and @lmesnik > > make/RunTests.gmk line 738:

RFR: 8352084: Add more test code in TestSetupAOT.java

2025-03-14 Thread Ioi Lam
I modified TestSetupAOT.java to exercise more functionalities in the JDK so that we can have a more substantial AOT cache when running tests with `AOT_JDK=true`. E.g: make test JTREG=AOT_JDK=true \ TEST=open/test/jdk/java/util/TimeZone/ListTimeZones.java Before: the generated AOT cache wa

Re: RFR: 8348028: Unable to run gtests with CDS enabled [v4]

2025-02-27 Thread Ioi Lam
On Fri, 28 Feb 2025 00:37:24 GMT, Calvin Cheung wrote: >> A simple fix in `os::jvm_path()` so that gtest can be run with CDS >> (`-Xshare:on`). The fix is just to change the directory name from `hotspot` >> to `server`. >> Note that the bug doesn't exist on macOS and thus no change is required

Integrated: 8349953: Avoid editing AOTConfiguration file in "make test JTREG=AOT_JDK=true"

2025-02-19 Thread Ioi Lam
On Thu, 13 Feb 2025 17:45:45 GMT, Ioi Lam wrote: > When running HotSpot jtreg tests in the "AOT mode", for example: > > > make test JTREG=AOT_JDK=true TEST=open/test/hotspot/jtreg/runtime/stringtable > > > Before this PR, in the test set up phase, we record sev

Re: RFR: 8349953: Avoid editing AOTConfiguration file in "make test JTREG=AOT_JDK=true" [v7]

2025-02-19 Thread Ioi Lam
On Wed, 19 Feb 2025 21:01:06 GMT, Erik Joelsson wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comments from @erikj79 > > Marked as reviewed by erikj (Reviewer). Thanks @erikj79

Re: RFR: 8349953: Avoid editing AOTConfiguration file in "make test JTREG=AOT_JDK=true" [v6]

2025-02-19 Thread Ioi Lam
On Wed, 19 Feb 2025 14:21:40 GMT, Erik Joelsson wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comments from @erikj79 > > make/test/BuildTestSetupAOT.gmk line 63: > >>

Re: RFR: 8349953: Avoid editing AOTConfiguration file in "make test JTREG=AOT_JDK=true" [v7]

2025-02-19 Thread Ioi Lam
gram that > accomplishes the same effect as the current implementation. > > ** Changes in this PR ** > > This PR combines the invocation of these Java tools into a single Java > program, so we just have a single AOT configuration file. It also uses the > `-XX:ExtraSharedClassLi

Re: RFR: 8349953: Avoid editing AOTConfiguration file in "make test JTREG=AOT_JDK=true" [v5]

2025-02-18 Thread Ioi Lam
On Tue, 18 Feb 2025 20:40:12 GMT, Erik Joelsson wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move the contents of SetupAOT.gmk back to RunTests.gmk, as it is not >> necessary to h

Re: RFR: 8349953: Avoid editing AOTConfiguration file in "make test JTREG=AOT_JDK=true" [v6]

2025-02-18 Thread Ioi Lam
gram that > accomplishes the same effect as the current implementation. > > ** Changes in this PR ** > > This PR combines the invocation of these Java tools into a single Java > program, so we just have a single AOT configuration file. It also uses the > `-XX:ExtraSharedClassLi

Re: RFR: 8349953: Avoid editing AOTConfiguration file in "make test JTREG_AOT_JDK=true" [v5]

2025-02-18 Thread Ioi Lam
gram that > accomplishes the same effect as the current implementation. > > ** Changes in this PR ** > > This PR combines the invocation of these Java tools into a single Java > program, so we just have a single AOT configuration file. It also uses the > `-XX:ExtraSharedClassLi

Re: RFR: 8349953: Avoid editing AOTConfiguration file in "make test JTREG_AOT_JDK=true" [v4]

2025-02-14 Thread Ioi Lam
gram that > accomplishes the same effect as the current implementation. > > ** Changes in this PR ** > > This PR combines the invocation of these Java tools into a single Java > program, so we just have a single AOT configuration file. It also uses the > `-XX:ExtraSharedClassLi

Re: RFR: 8349953: Avoid editing AOTConfiguration file in "make test JTREG_AOT_JDK=true" [v3]

2025-02-13 Thread Ioi Lam
gram that > accomplishes the same effect as the current implementation. > > ** Changes in this PR ** > > This PR combines the invocation of these Java tools into a single Java > program, so we just have a single AOT configuration file. It also uses the > `-XX:ExtraSharedClassLi

Re: RFR: 8349953: Avoid editing AOTConfiguration file in "make test JTREG_AOT_JDK=true" [v2]

2025-02-13 Thread Ioi Lam
On Thu, 13 Feb 2025 19:20:05 GMT, Erik Joelsson wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Comments from @erikj79 > > make/RunTests.gmk line 734: > >> 732: $$(ca

Re: RFR: 8349953: Avoid editing AOTConfiguration file in "make test JTREG_AOT_JDK=true" [v2]

2025-02-13 Thread Ioi Lam
gram that > accomplishes the same effect as the current implementation. > > ** Changes in this PR ** > > This PR combines the invocation of these Java tools into a single Java > program, so we just have a single AOT configuration file. It also uses the > `-XX:ExtraSharedClassLi

RFR: 8349953: Avoid editing AOTConfiguration file in "make test JTREG_AOT_JDK=true"

2025-02-13 Thread Ioi Lam
When running HotSpot jtreg tests in the "AOT mode", for example: make test JTREG_AOT_JDK=true open/test/hotspot/jtreg/runtime/stringtable Before this PR, in the test set up phase, we record several AOT configuration files by running a few separate Java tools (javac, javap, jlink, and jar), and

Re: RFR: 8341553: Remove UseCompactObjectHeaders extra CDS archives [v2]

2024-11-13 Thread Ioi Lam
On Wed, 13 Nov 2024 23:15:47 GMT, Calvin Cheung wrote: >> With this change, the compact object headers related CDS archives >> (`classes_coh.jsa` and `classes_nocoops_coh.jsa`) will not be generated by >> default. If the user needs them, the user can specify the >> `--enable-cds-archive-coh=ye

Re: RFR: 8341553: Remove UseCompactObjectHeaders extra CDS archives

2024-11-13 Thread Ioi Lam
On Tue, 12 Nov 2024 23:27:27 GMT, Calvin Cheung wrote: > With this change, the compact object headers related CDS archives > (`classes_coh.jsa` and `classes_nocoops_coh.jsa`) will not be generated by > default. If the user needs them, the user can specify the > `--enable-cds-archive-coh=yes` b

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v6]

2024-08-29 Thread Ioi Lam
On Thu, 29 Aug 2024 09:28:50 GMT, Stefan Karlsson wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix bit counts in GCForwarding > > src/hotspot/share/cds/archiveHeapWriter.cpp line 214: > >> 212: oopDesc::s

Integrated: 8309634: Resolve CONSTANT_MethodRef at CDS dump time

2024-06-27 Thread Ioi Lam
On Mon, 24 Jun 2024 17:21:18 GMT, Ioi Lam wrote: > Resolve `CONSTANT_MethodRef` entries during CDS dump time to improve start-up > performance. > > - This PR uses the same framework introduced in #19355 and just added > handling for methods. > - Support for getstatic/puts

Re: RFR: 8309634: Resolve CONSTANT_MethodRef at CDS dump time [v3]

2024-06-27 Thread Ioi Lam
On Wed, 26 Jun 2024 18:17:00 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 contai

Re: RFR: 8309634: Resolve CONSTANT_MethodRef at CDS dump time [v3]

2024-06-27 Thread Ioi Lam
; [JDK-8334898](https://bugs.openjdk.org/browse/JDK-8334898) 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 additional commits since the last

Re: RFR: 8309634: Resolve CONSTANT_MethodRef at CDS dump time [v2]

2024-06-25 Thread Ioi Lam
On Tue, 25 Jun 2024 16:45:49 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 contai

Re: RFR: 8309634: Resolve CONSTANT_MethodRef at CDS dump time [v2]

2024-06-25 Thread Ioi Lam
On Mon, 24 Jun 2024 20:23:30 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 contai

Re: RFR: 8309634: Resolve CONSTANT_MethodRef at CDS dump time [v2]

2024-06-25 Thread Ioi Lam
; [JDK-8334898](https://bugs.openjdk.org/browse/JDK-8334898) 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 four additional commits since the last

Re: RFR: 8309634: Resolve CONSTANT_MethodRef at CDS dump time [v2]

2024-06-25 Thread Ioi Lam
On Tue, 25 Jun 2024 23:24:59 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 four

Integrated: 8334598: Default classlist in JDK is not deterministic after JDK-8293980

2024-06-25 Thread Ioi Lam
On Mon, 24 Jun 2024 21:22:48 GMT, Ioi Lam wrote: > More filtering is needed when building the default archive in the JDK: > constant pool resolution when running the > `build.tools.classlist.HelloClasslist` program is not deterministic (due to > concurrency in core library cl

Re: RFR: 8334598: Default classlist in JDK is not deterministic after JDK-8293980

2024-06-25 Thread Ioi Lam
On Mon, 24 Jun 2024 21:50:37 GMT, Calvin Cheung wrote: >> More filtering is needed when building the default archive in the JDK: >> constant pool resolution when running the >> `build.tools.classlist.HelloClasslist` program is not deterministic (due to >> concurrency in core library classes).

Re: RFR: 8309634: Resolve CONSTANT_MethodRef at CDS dump time

2024-06-24 Thread Ioi Lam
On Mon, 24 Jun 2024 17:21:18 GMT, Ioi Lam wrote: > Resolve `CONSTANT_MethodRef` entries during CDS dump time to improve start-up > performance. > > - This PR uses the same framework introduced in #19355 and just added > handling for methods. > - Support for getstatic/puts

RFR: 8334598: Default classlist in JDK is not deterministic after JDK-8293980

2024-06-24 Thread Ioi Lam
More filtering is needed when building the default archive in the JDK: constant pool resolution when running the `build.tools.classlist.HelloClasslist` program is not deterministic (due to concurrency in core library classes). This could cause different values in the `@cp` lines in the classlist

RFR: 8309634: Resolve CONSTANT_MethodRef at CDS dump time

2024-06-24 Thread Ioi Lam
Resolve `CONSTANT_MethodRef` entries during CDS dump time to improve start-up performance. - This PR uses the same framework introduced in #19355 and just added handling for methods. - More filtering is needed when building the default archive in the JDK: constant pool resolution when running t

Integrated: 8293980: Resolve CONSTANT_FieldRef at CDS dump time

2024-06-13 Thread Ioi Lam
On Wed, 22 May 2024 21:48:44 GMT, Ioi Lam wrote: > ### Overview > > This PR archives `CONSTANT_FieldRef` entries in the _resolved_ state when > it's safe to do so. > > I.e., when a `CONSTANT_FieldRef` constant pool entry in class `A` refers to a > *non-static* fi

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v2]

2024-06-13 Thread Ioi Lam
On Thu, 23 May 2024 12:36:55 GMT, Erik Joelsson 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: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v9]

2024-06-13 Thread Ioi Lam
Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, > platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during > the training run. We don't s

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v8]

2024-06-13 Thread Ioi Lam
Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, > platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during > the training run. We don't spec

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v7]

2024-06-13 Thread Ioi Lam
Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, > platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during > the training run. We don't spec

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v6]

2024-06-12 Thread Ioi Lam
Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, > platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during > the training run. We don't s

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v5]

2024-06-03 Thread Ioi Lam
Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, > platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during > the training run. We don't spec

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3]

2024-06-03 Thread Ioi Lam
On Fri, 31 May 2024 18:43:49 GMT, Ioi Lam wrote: >> The current algorithm says: >> >> for each bytecode in each method: >> switch(bytecode) { >> case getfield: >> case outfield: >> InterpreterRuntime::resolve_get_put(bc, raw_index, mh,

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3]

2024-05-31 Thread Ioi Lam
On Fri, 31 May 2024 12:21:09 GMT, Dan Heidinga wrote: >> If you look at the version in the Leyden repo, there are many different >> types of references that are handled in >> `ClassPrelinker::maybe_resolve_fmi_ref` >> >> https://github.com/openjdk/leyden/blob/4faa72029abb86b55cb33b00acf9f3a18a

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3]

2024-05-30 Thread Ioi Lam
On Thu, 30 May 2024 04:15:24 GMT, Dan Heidinga wrote: >> `preresolve_list` has the original CP indices (E.g., `putfield #123` as >> stored in the classfile), but in HotSpot, after bytecode rewriting, the u2 >> following the bytecode is changed to an index into the >> `cpcache()->_resolved_fiel

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3]

2024-05-29 Thread Ioi Lam
On Wed, 29 May 2024 12:53:57 GMT, Dan Heidinga 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: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v4]

2024-05-29 Thread Ioi Lam
Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, > platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during > the training run. We don't spec

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v2]

2024-05-24 Thread Ioi Lam
On Thu, 23 May 2024 20:50:47 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: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3]

2024-05-24 Thread Ioi Lam
Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, > platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during > the training run. We don't s

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v2]

2024-05-23 Thread Ioi Lam
On Thu, 23 May 2024 20:28:49 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: 8293980: Resolve CONSTANT_FieldRef at CDS dump time

2024-05-22 Thread Ioi Lam
On Wed, 22 May 2024 21:48:44 GMT, Ioi Lam wrote: > ### Overview > > This PR archives `CONSTANT_FieldRef` entries in the _resolved_ state when > it's safe to do so. > > I.e., when a `CONSTANT_FieldRef` constant pool entry in class `A` refers to a > *non-static* fi

Re: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v2]

2024-05-22 Thread Ioi Lam
Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, > platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during > the training run. We don't s

RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time

2024-05-22 Thread Ioi Lam
This PR tries store CONSTANT_FieldRef entries in the resolved state whenever it's safe to do so. I.e., when a constant pool entry in class `A` refers to a *non-static* field `B.F`, - `B` must be the same class as `A`; or - `B` is a supertype of `A`; or - `B` is one of the [vmClasses](https://g

Re: RFR: 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default

2024-05-09 Thread Ioi Lam
On Wed, 8 May 2024 15:14:16 GMT, Thomas Stuefe wrote: > On Linux aarch64, a JVM may encounter three different page sizes: 4K, 64K, > and (when run on Mac M1 hardware) 16K. > > Since forgetting to specify `--enable-compatible-cds-alignment` is a common > error that is only noticed when running

Re: RFR: JDK-8300531: MSVC CFlags look suspicious [v9]

2023-02-15 Thread Ioi Lam
On Wed, 15 Feb 2023 21:21:47 GMT, Justin King wrote: >> Update MSVC CFlags to be more consistent with other compilers. Also disables >> RTTI in a simliar manner to GCC/Clang for the JVM. > > Justin King has updated the pull request incrementally with one additional > commit since the last revis

Re: RFR: 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions [v11]

2023-01-19 Thread Ioi Lam
On Thu, 19 Jan 2023 20:10:23 GMT, Matias Saavedra Silva wrote: >> This is an enhancement of the test case in >> [JDK-8296754](https://bugs.openjdk.org/browse/JDK-8296754), which tests >> against an archive created by the "boot JDK", which is usually set as the >> previous official JDK release

Re: RFR: 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions [v9]

2023-01-17 Thread Ioi Lam
On Fri, 13 Jan 2023 17:05:10 GMT, Matias Saavedra Silva wrote: >> This is an enhancement of the test case in >> [JDK-8296754](https://bugs.openjdk.org/browse/JDK-8296754), which tests >> against an archive created by the "boot JDK", which is usually set as the >> previous official JDK release

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v12]

2023-01-11 Thread Ioi Lam
On Tue, 10 Jan 2023 23:17:06 GMT, Justin King wrote: >> This change instruments Metaspace for ASan. Metaspace allocates memory using >> `mmap`/`munmap` which ASan is not aware of. Fortunately ASan supports >> applications [manually poisoning/unpoisoning >> memory](https://github.com/google/san

Re: RFR: 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions [v6]

2023-01-11 Thread Ioi Lam
On Thu, 12 Jan 2023 03:02:51 GMT, Matias Saavedra Silva wrote: >> This is an enhancement of the test case in >> [JDK-8296754](https://bugs.openjdk.org/browse/JDK-8296754), which tests >> against an archive created by the "boot JDK", which is usually set as the >> previous official JDK release

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v11]

2023-01-10 Thread Ioi Lam
On Tue, 10 Jan 2023 17:27:33 GMT, Justin King wrote: >> This change instruments Metaspace for ASan. Metaspace allocates memory using >> `mmap`/`munmap` which ASan is not aware of. Fortunately ASan supports >> applications [manually poisoning/unpoisoning >> memory](https://github.com/google/san

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v2]

2023-01-10 Thread Ioi Lam
On Mon, 9 Jan 2023 15:48:48 GMT, Justin King wrote: >> I like this, but would compilers not complain about unused statements? > > I don't believe so, at least not based on current options. Other projects use > similar tricks, like ABSL_DCHECK from Abseil which short circuits expressions > when

Re: RFR: 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions [v5]

2023-01-09 Thread Ioi Lam
On Fri, 6 Jan 2023 22:23:35 GMT, Matias Saavedra Silva wrote: >> This is an enhancement of the test case in >> [JDK-8296754](https://bugs.openjdk.org/browse/JDK-8296754), which tests >> against an archive created by the "boot JDK", which is usually set as the >> previous official JDK release

Re: RFR: 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions [v2]

2023-01-06 Thread Ioi Lam
On Fri, 6 Jan 2023 13:47:22 GMT, Erik Joelsson wrote: >> Matias Saavedra Silva 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 eight >> addition

Re: RFR: 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions

2023-01-05 Thread Ioi Lam
On Thu, 5 Jan 2023 19:25:07 GMT, Coleen Phillimore wrote: >> This is an enhancement of the test case in >> [JDK-8296754](https://bugs.openjdk.org/browse/JDK-8296754), which tests >> against an archive created by the "boot JDK", which is usually set as the >> previous official JDK release when

Re: RFR: 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions

2023-01-04 Thread Ioi Lam
On Wed, 4 Jan 2023 20:07:48 GMT, Matias Saavedra Silva wrote: > This is an enhancement of the test case in > [JDK-8296754](https://bugs.openjdk.org/browse/JDK-8296754), which tests > against an archive created by the "boot JDK", which is usually set as the > previous official JDK release when

Re: RFR: 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions

2023-01-04 Thread Ioi Lam
On Wed, 4 Jan 2023 20:07:48 GMT, Matias Saavedra Silva wrote: > This is an enhancement of the test case in > [JDK-8296754](https://bugs.openjdk.org/browse/JDK-8296754), which tests > against an archive created by the "boot JDK", which is usually set as the > previous official JDK release when

Re: RFR: 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions

2023-01-04 Thread Ioi Lam
On Wed, 4 Jan 2023 20:07:48 GMT, Matias Saavedra Silva wrote: > This is an enhancement of the test case in > [JDK-8296754](https://bugs.openjdk.org/browse/JDK-8296754), which tests > against an archive created by the "boot JDK", which is usually set as the > previous official JDK release when

Re: RFR: 8296754: AutoCreateSharedArchive in JDK 20 is not compatible with JDK 19 [v7]

2022-11-22 Thread Ioi Lam
On Tue, 22 Nov 2022 19:21:51 GMT, Matias Saavedra Silva wrote: >> The -XX:+AutoCreateSharedArchive flag was implemented in JDK 19, however, >> this flag doesn't work across JDK 19 and 20. >> >> Expected: JDK 20 should recreate the specified CDS archive >> Actual: JDK 20 cannot recognize the ar

Re: RFR: 8296754: AutoCreateSharedArchive in JDK 20 is not compatible with JDK 19 [v5]

2022-11-21 Thread Ioi Lam
On Thu, 17 Nov 2022 21:46:45 GMT, Matias Saavedra Silva wrote: >> The -XX:+AutoCreateSharedArchive flag was implemented in JDK 19, however, >> this flag doesn't work across JDK 19 and 20. >> >> Expected: JDK 20 should recreate the specified CDS archive >> Actual: JDK 20 cannot recognize the ar

Integrated: 8293293: Move archive heap loading code out of heapShared.cpp

2022-09-02 Thread Ioi Lam
On Fri, 2 Sep 2022 05:31:35 GMT, Ioi Lam wrote: > I moved all code related to loading the archive heap regions into a new file, > archiveHeapLoader.cpp. > > A diff of the new archiveHeapLoader.cpp and the old heapShared.cpp shows that > the moved code is identical, except fo

Re: RFR: 8293293: Move archive heap loading code out of heapShared.cpp [v2]

2022-09-02 Thread Ioi Lam
On Fri, 2 Sep 2022 12:42:36 GMT, Erik Joelsson wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Cleaned up header files > > Build change looks good. Thanks for the review @erikj79 @col

Re: RFR: 8293293: Move archive heap loading code out of heapShared.cpp [v2]

2022-09-02 Thread Ioi Lam
On Fri, 2 Sep 2022 17:16:42 GMT, Coleen Phillimore wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Cleaned up header files > > src/hotspot/share/cds/archiveHeapLoader.cpp lin

Re: RFR: 8293293: Move archive heap loading code out of heapShared.cpp [v2]

2022-09-02 Thread Ioi Lam
pLoader::`. > > I also removed unnecessary entries in JVM_EXCLUDE_FILES that are already > covered by the `cds/` pattern. Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: Cleaned up header files - Changes: - all:

RFR: 8293293: Move archive heap loading code out of heapShared.cpp

2022-09-01 Thread Ioi Lam
I moved all code related to loading the archive heap regions into a new file, archiveHeapLoader.cpp. A diff of the new archiveHeapLoader.cpp and the old heapShared.cpp shows that the moved code is identical, except for the change of `HeapShared::` to `ArchiveHeapLoader::`. I also removed unnec

  1   2   >