Re: RFR: 8287007: [cgroups] Consistently use stringStream throughout parsing code [v3]

2022-06-12 Thread Ioi Lam
On Wed, 8 Jun 2022 12:09:27 GMT, Severin Gehwolf wrote: >> Please review this cleanup change in the cgroup subsystem which used to use >> hard-coded stack allocated >> buffers for concatenating strings in memory. We can use `stringStream` >> instead which doesn't have the issue >> of

Re: RFR: 8287007: [cgroups] Consistently use stringStream throughout parsing code [v2]

2022-06-08 Thread Ioi Lam
On Tue, 7 Jun 2022 12:42:26 GMT, Severin Gehwolf wrote: >> Please review this cleanup change in the cgroup subsystem which used to use >> hard-coded stack allocated >> buffers for concatenating strings in memory. We can use `stringStream` >> instead which doesn't have the issue >> of

Re: RFR: 8287663 Add a regression test for JDK-8287073

2022-06-06 Thread Ioi Lam
On Mon, 6 Jun 2022 23:07:06 GMT, Ioi Lam wrote: > We should try to consolidate these test cases to improve maintainability. I filed [JDK-8287185](https://bugs.openjdk.org/browse/JDK-8287185) - PR: https://git.openjdk.java.net/jdk/pull/8993

Re: RFR: 8287663 Add a regression test for JDK-8287073

2022-06-06 Thread Ioi Lam
On Thu, 2 Jun 2022 14:32:28 GMT, Severin Gehwolf wrote: > This adds a regression test for a recent fix (JDK-8287073). I've restructured > the linux specific JDK code to call a separate static function to enable this > test. It'll help future tests too. > > Testing: > - [x] Container tests

Re: RFR: 8287663 Add a regression test for JDK-8287073

2022-06-06 Thread Ioi Lam
On Thu, 2 Jun 2022 14:32:28 GMT, Severin Gehwolf wrote: > This adds a regression test for a recent fix (JDK-8287073). I've restructured > the linux specific JDK code to call a separate static function to enable this > test. It'll help future tests too. > > Testing: > - [x] Container tests

Re: RFR: 8287073: NPE from CgroupV2Subsystem.getInstance() [v3]

2022-05-30 Thread Ioi Lam
On Thu, 26 May 2022 16:04:17 GMT, Maxim Kartashev wrote: >> Following the logic from the comment directly above the changed line, since >> it doesn't matter which controller we pick, pick any available controller >> instead of the one called "memory" specifically. This way we are guarded >>

Re: RFR: 8287384: Speed up ForceGC

2022-05-26 Thread Ioi Lam
On Thu, 26 May 2022 18:50:07 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this test update reviewed? > > The ForceGC could be enhanced by using smaller wait/sleep time, and shared > cleaner. > > Thanks, > Xuelei Please rename the RFE title to be less generic. How about "Speed up

Re: RFR: 8287073: NPE from CgroupV2Subsystem.getInstance() [v3]

2022-05-26 Thread Ioi Lam
On Thu, 26 May 2022 16:04:17 GMT, Maxim Kartashev wrote: >> Following the logic from the comment directly above the changed line, since >> it doesn't matter which controller we pick, pick any available controller >> instead of the one called "memory" specifically. This way we are guarded >>

Re: RFR: 8287073: NPE from CgroupV2Subsystem.getInstance() [v2]

2022-05-26 Thread Ioi Lam
On Thu, 26 May 2022 09:42:22 GMT, Maxim Kartashev wrote: >> Following the logic from the comment directly above the changed line, since >> it doesn't matter which controller we pick, pick any available controller >> instead of the one called "memory" specifically. This way we are guarded >>

Integrated: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller

2022-05-25 Thread Ioi Lam
On Mon, 23 May 2022 22:11:47 GMT, Ioi Lam wrote: > This PR fixes a bug found on an Ubuntu host that's mostly running with > cgroupv2, but there's a controller (freezer) that is mounted in cgroupv1 mode. > > The container support code in the VM and JDK checks if we have si

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v2]

2022-05-25 Thread Ioi Lam
On Tue, 24 May 2022 19:36:57 GMT, Severin Gehwolf wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @jerboaa comments > > Looks good. Thanks for the thorough analysis. Thanks @jerboa

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v4]

2022-05-25 Thread Ioi Lam
he fix is simple -- when we get to `setCgroupV2Path()`, we have already > decided that the system has not mounted any v1 controllers that we care > about, so we should just ignore all the v1 controllers (which has a non-empty > name). Ioi Lam has updated the pull request increment

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v3]

2022-05-25 Thread Ioi Lam
On Wed, 25 May 2022 15:50:32 GMT, Severin Gehwolf wrote: >> It confused me, fwiw. Anyway up to you. It's not super important. > > works for me. +1. Note the typo > `anyCgroupsV1Controller/anyCgroupsV2Controller` not **V1** twice. Oops, I'll fixed that. Thanks! - PR:

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v3]

2022-05-25 Thread Ioi Lam
he fix is simple -- when we get to `setCgroupV2Path()`, we have already > decided that the system has not mounted any v1 controllers that we care > about, so we should just ignore all the v1 controllers (which has a non-empty > name). Ioi Lam has updated the pull request i

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v3]

2022-05-25 Thread Ioi Lam
On Tue, 24 May 2022 19:49:35 GMT, Ioi Lam wrote: >> My bad. How about `Intentional incomplete switch. There are ...`? Anyway, >> why is the empty `default` case needed other than for the comment? > > To me, the `default:` switch is a clear indication that "everything else

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v2]

2022-05-24 Thread Ioi Lam
On Tue, 24 May 2022 19:34:16 GMT, Severin Gehwolf wrote: >> This is not a fall-through because the previous line ends with a `break`. > > My bad. How about `Intentional incomplete switch. There are ...`? Anyway, why > is the empty `default` case needed other than for the comment? To me, the

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v2]

2022-05-24 Thread Ioi Lam
On Tue, 24 May 2022 10:12:31 GMT, Severin Gehwolf wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @jerboaa comments > > src/java.base/linux/classes/jdk/internal/platform/CgroupSub

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v2]

2022-05-24 Thread Ioi Lam
he fix is simple -- when we get to `setCgroupV2Path()`, we have already > decided that the system has not mounted any v1 controllers that we care > about, so we should just ignore all the v1 controllers (which has a non-empty > name). Ioi Lam has updated the pull request incr

RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller

2022-05-23 Thread Ioi Lam
This PR fixes a bug found on an Ubuntu host that's mostly running with cgroupv2, but there's a controller (freezer) that is mounted in cgroupv1 mode. The container support code in the VM and JDK checks if we have simultaneously mounted v1 and v2 containers. If so, we revert to "hybrid" mode

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v3]

2022-05-19 Thread Ioi Lam
On Thu, 19 May 2022 19:59:18 GMT, Ioi Lam wrote: >>> What happens if cgroup_path is "/foo/bar" and _root is "/fo"? >> >> With a mount path of `/bar` this ends up being `/bar/o/bar`. Pretty strange, >> but then again it's a bit of a contrived examp

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v3]

2022-05-19 Thread Ioi Lam
On Thu, 19 May 2022 09:06:18 GMT, Severin Gehwolf wrote: >> src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp line 63: >> >>> 61: } else { >>> 62: char *p = strstr(cgroup_path, _root); >>> 63: if (p != NULL && p == cgroup_path) { >> >> What happens if cgroup_path is

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v3]

2022-05-19 Thread Ioi Lam
On Wed, 18 May 2022 18:14:52 GMT, Severin Gehwolf wrote: >> Please review this change to the cgroup v1 subsystem which makes it more >> resilient on some of the stranger systems. Unfortunately, I wasn't able to >> re-create a similar system as the reporter. The idea of using the longest >>

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v2]

2022-05-17 Thread Ioi Lam
On Thu, 12 May 2022 18:09:40 GMT, Severin Gehwolf wrote: >> Please review this change to the cgroup v1 subsystem which makes it more >> resilient on some of the stranger systems. Unfortunately, I wasn't able to >> re-create a similar system as the reporter. The idea of using the longest >>

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v2]

2022-05-16 Thread Ioi Lam
On Thu, 12 May 2022 18:09:40 GMT, Severin Gehwolf wrote: >> Please review this change to the cgroup v1 subsystem which makes it more >> resilient on some of the stranger systems. Unfortunately, I wasn't able to >> re-create a similar system as the reporter. The idea of using the longest >>

Re: RFR: JDK-8281001 Examine the behavior of Class::forName if the caller is null

2022-05-16 Thread Ioi Lam
On Sat, 14 May 2022 00:30:00 GMT, Tim Prinzing wrote: > The Class::forName behavior change to match JNI FindClass is a compatible > change and seems pretty attractive as it would be expected that > Class::forName would give the same behavior as FindClass which uses the > system classloader.

Re: RFR: 8284950: CgroupV1 detection code should consider memory.swappiness [v18]

2022-05-15 Thread Ioi Lam
On Thu, 12 May 2022 13:46:11 GMT, xpbob wrote: >> set memory.swappiness to 0,swap space will not be used >> determine the value of memory.swappiness >> https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt >> >> >> Memory Limit: 50.00M >> Memory Soft Limit: Unlimited >>

Integrated: 8286560: Remove user parameter from jdk.internal.perf.Perf.attach()

2022-05-12 Thread Ioi Lam
On Wed, 11 May 2022 23:08:32 GMT, Ioi Lam wrote: > The API `jdk.internal.perf.Perf.::attach(String user, int lvmid)` is never > used. It should be removed, and all the handling of a specified user name > should be removed. This pull request has now been integrated. Changeset: 74eee2

Re: RFR: 8286560: Remove user parameter from jdk.internal.perf.Perf.attach() [v2]

2022-05-12 Thread Ioi Lam
On Thu, 12 May 2022 04:06:44 GMT, David Holmes wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @AlanBateman comments - remove thros IllegalArgumentException clause > > Nice cleanup! I chec

Re: RFR: 8286560: Remove user parameter from jdk.internal.perf.Perf.attach() [v2]

2022-05-12 Thread Ioi Lam
On Thu, 12 May 2022 14:08:11 GMT, Alan Bateman wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @AlanBateman comments - remove thros IllegalArgumentException clause > > src/java.base/s

Re: RFR: 8286560: Remove user parameter from jdk.internal.perf.Perf.attach() [v2]

2022-05-12 Thread Ioi Lam
> The API `jdk.internal.perf.Perf.::attach(String user, int lvmid)` is never > used. It should be removed, and all the handling of a specified user name > should be removed. Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: @Al

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems

2022-05-12 Thread Ioi Lam
On Tue, 10 May 2022 12:29:10 GMT, Severin Gehwolf wrote: > Please review this change to the cgroup v1 subsystem which makes it more > resilient on some of the stranger systems. Unfortunately, I wasn't able to > re-create a similar system as the reporter. The idea of using the longest >

RFR: 8286560: Remove user parameter from jdk.internal.perf.Perf.attach()

2022-05-11 Thread Ioi Lam
The API `jdk.internal.perf.Perf.::attach(String user, int lvmid)` is never used. It should be removed, and all the handling of a specified user name should be removed. - Commit messages: - more cleanup - 8286560: Remove user parameter from jdk.internal.perf.Perf.attach()

Integrated: 8286441: Remove mode parameter from jdk.internal.perf.Perf.attach()

2022-05-11 Thread Ioi Lam
On Tue, 10 May 2022 04:00:29 GMT, Ioi Lam wrote: > The `mode` parameter for ` jdk.internal.perf.Perf.attach()` has never > supported the value `"rw"` since the source code was imported to the openjdk > repo more than 15 years ago. In fact HotSpot throws > `IllegalA

Re: RFR: 8286441: Remove mode parameter from jdk.internal.perf.Perf.attach()

2022-05-11 Thread Ioi Lam
On Tue, 10 May 2022 20:03:45 GMT, Alan Bateman wrote: >> The `mode` parameter for ` jdk.internal.perf.Perf.attach()` has never >> supported the value `"rw"` since the source code was imported to the openjdk >> repo more than 15 years ago. In fact HotSpot throws >> `IllegalArgumentException`

Re: RFR: 8286441: Remove mode parameter from jdk.internal.perf.Perf.attach()

2022-05-10 Thread Ioi Lam
On Tue, 10 May 2022 20:03:45 GMT, Alan Bateman wrote: > I skimmed through the changes and I think they look okay. In the distant past > there were tools outside of the JDK that used the jvmstat API directly. It's > possible that VisualVM still does but it would only compile/run if >

Re: RFR: 8286441: Remove mode parameter from jdk.internal.perf.Perf.attach() [v2]

2022-05-10 Thread Ioi Lam
On Tue, 10 May 2022 19:59:41 GMT, Alan Bateman wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review comments > > src/jdk.internal.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/pro

Re: RFR: 8286441: Remove mode parameter from jdk.internal.perf.Perf.attach() [v2]

2022-05-10 Thread Ioi Lam
t; It's unlikely such a mode will be required for future enhancements. Support > for `"rw"` is removed. The "mode" parameter is also removed, since now `"r"` > is the only supported mode. > > I also cleaned up related code in the JDK and HotSpot. > &

Re: RFR: 8286441: Remove mode parameter from jdk.internal.perf.Perf.attach() [v2]

2022-05-10 Thread Ioi Lam
On Tue, 10 May 2022 21:43:44 GMT, Claes Redestad wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review comments > > src/hotspot/os/windows/perfMemory_windows.cpp line 1781: > &

RFR: 8286441: Remove mode parameter from jdk.internal.perf.Perf.attach()

2022-05-09 Thread Ioi Lam
The `mode` parameter for ` jdk.internal.perf.Perf.attach()` has never supported the value `"rw"` since the source code was imported to the openjdk repo more than 15 years ago. In fact HotSpot throws `IllegalArgumentException` when such a mode is specified. It's unlikely such a mode will be

Re: RFR: 8284435: Add dedicated filler objects for known dead Java heap areas [v3]

2022-04-29 Thread Ioi Lam
On Mon, 11 Apr 2022 14:55:32 GMT, Thomas Schatzl wrote: >> Hi all, >> >> can I have reviews for this change that adds dedicated filler objects to >> the VM? >> >> Currently, when formatting areas of dead objects all gcs use instances of >> j.l.Object and int-arrays. >> >> This has the

Re: RFR: 8284950: Swappiness disables swap space usage

2022-04-20 Thread Ioi Lam
On Mon, 18 Apr 2022 09:07:31 GMT, xpbob wrote: > set memory.swappiness to 0,swap space will not be used > determine the value of memory.swappiness > https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt > > > Memory Limit: 50.00M > Memory Soft Limit: Unlimited > Memory &

Re: RFR: 8284950: Swappiness disables swap space usage

2022-04-20 Thread Ioi Lam
On Mon, 18 Apr 2022 09:07:31 GMT, xpbob wrote: > set memory.swappiness to 0,swap space will not be used > determine the value of memory.swappiness > https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt > > > Memory Limit: 50.00M > Memory Soft Limit: Unlimited > Memory &

Re: RFR: 8284950: Swappiness disables swap space usage

2022-04-18 Thread Ioi Lam
On Mon, 18 Apr 2022 16:22:27 GMT, Ioi Lam wrote: >> set memory.swappiness to 0,swap space will not be used >> determine the value of memory.swappiness >> https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt >> >> >> Memory Limit: 50.00M

Re: RFR: 8284950: Swappiness disables swap space usage

2022-04-18 Thread Ioi Lam
On Mon, 18 Apr 2022 09:07:31 GMT, xpbob wrote: > set memory.swappiness to 0,swap space will not be used > determine the value of memory.swappiness > https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt > > > Memory Limit: 50.00M > Memory Soft Limit: Unlimited > Memory &

Integrated: 8284336: CDS SignedJar.java test fails due to archived Reference object

2022-04-08 Thread Ioi Lam
On Thu, 7 Apr 2022 22:44:19 GMT, Ioi Lam wrote: > During `java -Xshare:dump`, `ClassLoaders.bootLoader().resourceCache` is > usually null. However, if a signed class is loaded, `resourceCache` will > point to a `java.lang.ref.SoftReference`. Although rare (we have never seen > thi

Re: RFR: 8284336: CDS SignedJar.java test fails due to archived Reference object

2022-04-08 Thread Ioi Lam
On Fri, 8 Apr 2022 07:08:29 GMT, Alan Bateman wrote: >> During `java -Xshare:dump`, `ClassLoaders.bootLoader().resourceCache` is >> usually null. However, if a signed class is loaded, `resourceCache` will >> point to a `java.lang.ref.SoftReference`. Although rare (we have never seen >> this

Re: RFR: 8284435: Add dedicated filler objects for known dead Java heap areas

2022-04-08 Thread Ioi Lam
On Fri, 8 Apr 2022 08:13:33 GMT, Thomas Schatzl wrote: > Hi all, > > can I have reviews for this change that adds dedicated filler objects to > the VM? > > Currently, when formatting areas of dead objects all gcs use instances of > j.l.Object and int-arrays. > > This has the drawback of

RFR: 8284336: CDS SignedJar.java test fails due to archived Reference object

2022-04-07 Thread Ioi Lam
During `java -Xshare:dump`, `ClassLoaders.bootLoader().resourceCache` is usually null. However, if a signed class is loaded, `resourceCache` will point to a `java.lang.ref.SoftReference`. Although rare (we have never seen this during our testing), it's possible for `resourceCache.discovered` to

Integrated: 8253495: CDS generates non-deterministic output

2022-03-15 Thread Ioi Lam
On Tue, 8 Mar 2022 19:11:02 GMT, Ioi Lam wrote: > This patch makes the result of "java -Xshare:dump" deterministic: > - Disabled new Java threads from launching. This is harmless. See comments in > jvm.cpp > - Fixed a problem in hashtable ordering in heapShared.cpp >

Re: RFR: 8253495: CDS generates non-deterministic output [v8]

2022-03-15 Thread Ioi Lam
tps://bugs.openjdk.java.net/browse/JDK-8282828). > > Testing under way: > - tier1~tier5 > - Run all *-cmp-baseline jobs 20 times each (linux-aarch64-cmp-baseline, > windows-x86-cmp-baseline, etc). Ioi Lam has updated the pull request incrementally with one additional commit since th

Re: RFR: 8253495: CDS generates non-deterministic output [v6]

2022-03-15 Thread Ioi Lam
On Mon, 14 Mar 2022 22:07:24 GMT, Calvin Cheung wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Added helper function CollectedHeap::zap_filler_array_with > > test/hotspot/jt

Re: RFR: 8253495: CDS generates non-deterministic output [v7]

2022-03-15 Thread Ioi Lam
tps://bugs.openjdk.java.net/browse/JDK-8282828). > > Testing under way: > - tier1~tier5 > - Run all *-cmp-baseline jobs 20 times each (linux-aarch64-cmp-baseline, > windows-x86-cmp-baseline, etc). Ioi Lam has updated the pull request with a new target base due to a merge or a rebase.

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-11 Thread Ioi Lam
On Fri, 11 Mar 2022 07:13:35 GMT, Thomas Stuefe wrote: > Is reproducibility also a topic for users calling -Xdump with custom JNI > coding? Or maybe having the VM instrumented somehow? Since it seems such an > easy fix, I would prevent attaching too. At least the user would get a clear >

Re: RFR: 8253495: CDS generates non-deterministic output [v6]

2022-03-10 Thread Ioi Lam
tps://bugs.openjdk.java.net/browse/JDK-8282828). > > Testing under way: > - tier1~tier5 > - Run all *-cmp-baseline jobs 20 times each (linux-aarch64-cmp-baseline, > windows-x86-cmp-baseline, etc). Ioi Lam has updated the pull request incrementally with one additional commit si

Re: RFR: 8253495: CDS generates non-deterministic output

2022-03-10 Thread Ioi Lam
On Fri, 11 Mar 2022 05:59:00 GMT, David Holmes wrote: > > I ended up changing `os::malloc()` to zero the buffer when running with > > -Xshare:dump. Hopefully one extra check of `if (DumpSharedSpaces)` doesn't > > matter too much for regular VM executions because `os::malloc()` already > > has

Re: RFR: 8253495: CDS generates non-deterministic output [v5]

2022-03-10 Thread Ioi Lam
tps://bugs.openjdk.java.net/browse/JDK-8282828). > > Testing under way: > - tier1~tier5 > - Run all *-cmp-baseline jobs 20 times each (linux-aarch64-cmp-baseline, > windows-x86-cmp-baseline, etc). Ioi Lam has updated the pull request incrementally with one additional commit since the l

Re: RFR: 8253495: CDS generates non-deterministic output [v4]

2022-03-10 Thread Ioi Lam
On Fri, 11 Mar 2022 05:55:20 GMT, Kim Barrett wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> zero GC heap filler arrays > > src/hotspot/share/gc/shared/collectedHeap.cpp line 449: >

Re: RFR: 8253495: CDS generates non-deterministic output [v4]

2022-03-10 Thread Ioi Lam
tps://bugs.openjdk.java.net/browse/JDK-8282828). > > Testing under way: > - tier1~tier5 > - Run all *-cmp-baseline jobs 20 times each (linux-aarch64-cmp-baseline, > windows-x86-cmp-baseline, etc). Ioi Lam has updated the pull request incrementally with one additional c

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-10 Thread Ioi Lam
On Wed, 9 Mar 2022 07:47:19 GMT, Thomas Stuefe wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed zero build > > src/hotspot/share/utilities/hashtable.hpp line 42: > >> 40

Re: RFR: 8253495: CDS generates non-deterministic output [v3]

2022-03-10 Thread Ioi Lam
tps://bugs.openjdk.java.net/browse/JDK-8282828). > > Testing under way: > - tier1~tier5 > - Run all *-cmp-baseline jobs 20 times each (linux-aarch64-cmp-baseline, > windows-x86-cmp-baseline, etc). Ioi Lam has updated the pull request incrementally with one additional commit sinc

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-10 Thread Ioi Lam
On Thu, 10 Mar 2022 13:51:56 GMT, Magnus Ihse Bursie wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed zero build > > I think he already did. I'm quoting: > >> However, th

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-10 Thread Ioi Lam
On Wed, 9 Mar 2022 07:51:46 GMT, Thomas Stuefe wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed zero build > > src/hotspot/share/prims/jvm.cpp line 2887: > >> 2885:

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-10 Thread Ioi Lam
On Thu, 10 Mar 2022 13:51:56 GMT, Magnus Ihse Bursie wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed zero build > > I think he already did. I'm quoting: > >> However, th

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-08 Thread Ioi Lam
On Wed, 9 Mar 2022 07:04:56 GMT, David Holmes wrote: > I have reservations about contorting things this way just to get > "deterministic output". > > The VM needs to fully initialize and then become quiescent before the dump > occurs, and as I say below if you don't start other threads then

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-08 Thread Ioi Lam
On Wed, 9 Mar 2022 06:49:02 GMT, David Holmes wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed zero build > > src/hotspot/share/prims/jvm.cpp line 2873: > >> 2871: // e

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-08 Thread Ioi Lam
tps://bugs.openjdk.java.net/browse/JDK-8282828). > > Testing under way: > - tier1~tier5 > - Run all *-cmp-baseline jobs 20 times each (linux-aarch64-cmp-baseline, > windows-x86-cmp-baseline, etc). Ioi Lam has updated the pull request incrementally with one additional commit since t

RFR: 8253495: CDS generates non-deterministic output

2022-03-08 Thread Ioi Lam
This patch makes the result of "java -Xshare:dump" deterministic: - Disabled new Java threads from launching. This is harmless. See comments in jvm.cpp - Fixed a problem in hashtable ordering in heapShared.cpp - BasicHashtableEntry has a gap on 64-bit platforms that may contain random bits.

Integrated: 8275731: CDS archived enums objects are recreated at runtime

2022-02-28 Thread Ioi Lam
On Wed, 1 Dec 2021 20:47:20 GMT, Ioi Lam wrote: > **Background:** > > In the Java Language, Enums can be tested for equality, so the constants in > an Enum type must be unique. Javac compiles an enum declaration like this: > > > public enum

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v4]

2022-02-28 Thread Ioi Lam
On Thu, 17 Feb 2022 23:20:41 GMT, Calvin Cheung wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use InstanceKlass::do_local_static_fields for some field iterations > > Looks good. Minor

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v7]

2022-02-27 Thread Ioi Lam
analyzed the potential problems found by the tool are they are all safe > (after the current bug is fixed). See cdsHeapVerifier.cpp for gory details. > An example trace of this tool can be found at > https://bugs.openjdk.java.net/secure/attachment/97242/enum_warning.txt > > **Testing:**

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v6]

2022-02-22 Thread Ioi Lam
analyzed the potential problems found by the tool are they are all safe > (after the current bug is fixed). See cdsHeapVerifier.cpp for gory details. > An example trace of this tool can be found at > https://bugs.openjdk.java.net/secure/attachment/97242/enum_warning.txt > > **Testing:

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v5]

2022-02-22 Thread Ioi Lam
analyzed the potential problems found by the tool are they are all safe > (after the current bug is fixed). See cdsHeapVerifier.cpp for gory details. > An example trace of this tool can be found at > https://bugs.openjdk.java.net/secure/attachment/97242/enum_warning.txt > > **Testing:**

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2022-02-16 Thread Ioi Lam
On Wed, 19 Jan 2022 05:50:50 GMT, Ioi Lam wrote: >> I don't really know this code well enough to do a good code review. I had >> some comments though. > >> I don't really know this code well enough to do a good code review. I had >> some comments though. >

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2022-01-18 Thread Ioi Lam
On Mon, 17 Jan 2022 19:22:23 GMT, Coleen Phillimore wrote: > I don't really know this code well enough to do a good code review. I had > some comments though. Hi Coleen, thanks for taking a look. This PR has two major parts: 1. Check for inappropriate reference to static fields. This is

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2022-01-18 Thread Ioi Lam
On Mon, 17 Jan 2022 18:36:35 GMT, Coleen Phillimore 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

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v4]

2022-01-18 Thread Ioi Lam
analyzed the potential problems found by the tool are they are all safe > (after the current bug is fixed). See cdsHeapVerifier.cpp for gory details. > An example trace of this tool can be found at > https://bugs.openjdk.java.net/secure/attachment/97242/enum_warning.txt > > **Testing:

[Ping] RFR: 8275731: CDS archived enums objects are recreated at runtime

2022-01-04 Thread Ioi Lam
Still looking for reviewers Thanks - Ioi On 12/1/21 1:02 PM, Ioi Lam wrote: **Background:** In the Java Language, Enums can be tested for equality, so the constants in an Enum type must be unique. Javac compiles an enum declaration like this: public enum Day { SUNDAY, MONDAY

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2021-12-10 Thread Ioi Lam
analyzed the potential problems found by the tool are they are all safe > (after the current bug is fixed). See cdsHeapVerifier.cpp for gory details. > An example trace of this tool can be found at > https://bugs.openjdk.java.net/secure/attachment/97242/enum_warning.txt > > **Testing:**

Re: JDK-8275509: (jlink) SystemModulesPlugin generates a jdk.internal.module.SystemModules$all.class which isn't reproducible

2021-12-01 Thread Ioi Lam
On 11/7/21 9:44 PM, Jaikiran Pai wrote: Hello Ioi, On 02/11/21 12:13 am, Ioi Lam wrote: Hi Jaikiran, Thanks for writing the test case to explore the problems in this area. Please see my comments below: ... Generally speaking, CDS has two levels of archiving: [1] archiving class metadata

RFR: 8275731: CDS archived enums objects are recreated at runtime

2021-12-01 Thread Ioi Lam
**Background:** In the Java Language, Enums can be tested for equality, so the constants in an Enum type must be unique. Javac compiles an enum declaration like this: public enum Day { SUNDAY, MONDAY ... } to public class Day extends java.lang.Enum { public static final SUNDAY = new

Re: [External] : Re: JDK-8275509: (jlink) SystemModulesPlugin generates a jdk.internal.module.SystemModules$all.class which isn't reproducible

2021-11-01 Thread Ioi Lam
Hi Jaikiran, Thanks for writing the test case to explore the problems in this area. Please see my comments below: On 10/29/21 5:55 AM, Jaikiran Pai wrote: Hello Ioi (and others), On 22/10/21 1:39 pm, Jaikiran Pai wrote: Hello Ioi, On 22/10/21 12:29 pm, Ioi Lam wrote: On 10/21/21 9:09 PM

Re: JDK-8275509: (jlink) SystemModulesPlugin generates a jdk.internal.module.SystemModules$all.class which isn't reproducible

2021-10-22 Thread Ioi Lam
On 10/21/21 9:09 PM, Jaikiran Pai wrote: Hello Ioi, This is my initial analysis of the problem. >>> Can anyone think of similar problems that may happen elsewhere? The static constructors of enum classes are executed at both CDS dump time and run time. E.g.,     public enum

Re: JDK-8275509: (jlink) SystemModulesPlugin generates a jdk.internal.module.SystemModules$all.class which isn't reproducible

2021-10-21 Thread Ioi Lam
program with: java -Xshare:off EnumEquality succeeds and the ModuleDescriptor equality check passes. In short, it looks like there is some general issue with CDS and equality checks with enums and perhaps deserves a separate JBS issue? I've asked Ioi Lam to comment on this, off-hand I'm not aware

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java [v4]

2021-09-15 Thread Ioi Lam
On Fri, 3 Sep 2021 14:25:53 GMT, Roger Riggs wrote: >> The intermittent test in java/lang/ProcessBuilder/Basic.java has identified >> unexpected messages from a child Java VM >> as the cause of the test failure. Attempts to control the output of the >> child VM have failed, the VM is

Re: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v4]

2021-09-15 Thread Ioi Lam
On Wed, 15 Sep 2021 07:46:34 GMT, Matthias Baesken wrote: >> https://bugs.openjdk.java.net/browse/JDK-8266490 >> extended the OSContainer API in order to also support the pids controller of >> cgroups. However only pids.max output was added with 8266490. >> There is a second parameter

Re: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v3]

2021-09-14 Thread Ioi Lam
On Tue, 14 Sep 2021 16:36:24 GMT, Ioi Lam wrote: >> Matthias Baesken has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Simplify coding following Severins advice > > test/hotspot/jtreg/containers/docker/T

Re: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v3]

2021-09-14 Thread Ioi Lam
On Tue, 14 Sep 2021 14:27:36 GMT, Matthias Baesken wrote: >> https://bugs.openjdk.java.net/browse/JDK-8266490 >> extended the OSContainer API in order to also support the pids controller of >> cgroups. However only pids.max output was added with 8266490. >> There is a second parameter

Re: RFR: 8273092: Sort classlist in JDK image [v2]

2021-08-31 Thread Ioi Lam
On Sat, 28 Aug 2021 13:18:37 GMT, Claes Redestad wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @dfuch comments > > Seems OK. Thanks @cl4es @magicus @dfuch for the rev

Integrated: 8273092: Sort classlist in JDK image

2021-08-31 Thread Ioi Lam
On Fri, 27 Aug 2021 23:12:52 GMT, Ioi Lam wrote: > When the classlist is generated using build.tools.classlist.HelloClasslist, > its contents may be non-deterministic due to Java thread execution order. > > We should sort the generated classlist to make the JDK image's c

Re: RFR: 8273092: Sort classlist in JDK image [v2]

2021-08-30 Thread Ioi Lam
tier1, tier2, builds-tier5 Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: @dfuch comments - Changes: - all: https://git.openjdk.java.net/jdk/pull/5288/files - new: https://git.openjdk.java.net/jdk/pull/5288/files/dc170e

Re: RFR: 8273092: Sort classlist in JDK image [v2]

2021-08-30 Thread Ioi Lam
On Mon, 30 Aug 2021 12:51:43 GMT, Daniel Fuchs wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @dfuch comments > > make/jdk/src/classes/build/tools/classlist/SortClasslist.java line 58

RFR: 8273092: Sort classlist in JDK image

2021-08-27 Thread Ioi Lam
When the classlist is generated using build.tools.classlist.HelloClasslist, its contents may be non-deterministic due to Java thread execution order. We should sort the generated classlist to make the JDK image's contents more deterministic. Tested with Mach5 tier1, tier2, builds-tier5

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java [v2]

2021-08-26 Thread Ioi Lam
On Wed, 25 Aug 2021 21:45:57 GMT, Roger Riggs wrote: >> The intermittent test in java/lang/ProcessBuilder/Basic.java has identified >> unexpected messages from a child Java VM >> as the cause of the test failure. Attempts to control the output of the >> child VM have failed, the VM is

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java

2021-08-24 Thread Ioi Lam
On Tue, 24 Aug 2021 19:15:56 GMT, Roger Riggs wrote: >> test/jdk/java/lang/ProcessBuilder/Basic.java line 2635: >> >>> 2633: List childArgs = null; >>> 2634: Path sleepExe = TEST_NATIVEPATH.resolve("sleepmillis"); >>> 2635: if (sleepExe.toFile().canExecute()) { >> >>

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java

2021-08-24 Thread Ioi Lam
On Tue, 24 Aug 2021 15:55:28 GMT, Roger Riggs wrote: > The intermittent test in java/lang/ProcessBuilder/Basic.java has identified > unexpected messages from a child Java VM > as the cause of the test failure. Attempts to control the output of the > child VM have failed, the VM is unrepentant

Re: RFR: 8271368: [BACKOUT] JDK-8266054 VectorAPI rotate operation optimization

2021-07-28 Thread Ioi Lam
On Wed, 28 Jul 2021 05:35:59 GMT, Vladimir Kozlov wrote: > Backout the following changes due to vector tests failures in tier 2 and > later: > [JDK-8266054](https://bugs.openjdk.java.net/browse/JDK-8266054) VectorAPI > rotate operation optimization > > Changes also caused copyright header

Re: [jdk17] RFR: 8269840: Update Platform.isDefaultCDSArchiveSupported() to return true for Linux-aarch64

2021-07-07 Thread Ioi Lam
On Thu, 8 Jul 2021 01:59:25 GMT, Mikhailo Seledtsov wrote: > Now that "JDK-8268212 Build linux-aarch64 natively" added support for default > CDS archive, time to update test configuration for this platform. This is a > very small one-line change. Looks good, but this returns true also for

Integrated: 8265605: Cannot call BootLoader::loadClassOrNull before initPhase2

2021-05-14 Thread Ioi Lam
On Wed, 12 May 2021 05:51:14 GMT, Ioi Lam wrote: > This bug was discovered during the development of > [JDK-6824466](https://bugs.openjdk.java.net/browse/JDK-6824466): when CDS is > enabled, if `BootLoader::loadClassOrNull` is called before `initPhase2`, it > would trigger the in

Re: RFR: 8265605: Cannot call BootLoader::loadClassOrNull before initPhase2 [v3]

2021-05-14 Thread Ioi Lam
On Thu, 13 May 2021 06:19:47 GMT, Alan Bateman wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> cleaned up ClassLoaders.setArchivedServicesCatalog > > Marked as reviewed by alanb (R

Re: RFR: 8265605: Cannot call BootLoader::loadClassOrNull before initPhase2 [v4]

2021-05-13 Thread Ioi Lam
e 3 built-in loaders > (boot/platform/app). > > Testing: tiers1-4 in progress. I also verified that the bug reported by Mandy > is no longer reproducible after I applied this patch on her branch. Ioi Lam has updated the pull request with a new target base due to a merge or a

  1   2   3   >