From duke at openjdk.org Thu Aug 4 06:07:05 2022 From: duke at openjdk.org (duke) Date: Thu, 4 Aug 2022 06:07:05 GMT Subject: jmx-dev Withdrawn: 8285149: Using HashMap.newHashMap to replace new HashMap(int) In-Reply-To: References: Message-ID: <6zyYs300tD4dVrr_FT6ILURyaxkXaKtDe3rbLm1rMD8=.64484460-e180-4b3b-97f9-8573daa11da0@github.com> On Tue, 19 Apr 2022 17:44:10 GMT, XenoAmess wrote: > These are the changes that too many to be reviewed in 8186958, thus split some of them out. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/8301 From duke at openjdk.org Mon Aug 8 15:11:19 2022 From: duke at openjdk.org (Bill Huang) Date: Mon, 8 Aug 2022 15:11:19 GMT Subject: jmx-dev Integrated: 8290180: Convert com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh to jtreg java version In-Reply-To: References: Message-ID: On Thu, 14 Jul 2022 21:56:57 GMT, Bill Huang wrote: > This is a task to convert shell tests to Java tests. The shell scripts to be removed are responsible for compiling Java files and running the tests on Linux systems. This functionality can be achieved with JTReg tag @requires (os.family=="linux"). This pull request has now been integrated. Changeset: 124fc4a8 Author: Bill Huang Committer: Leonid Mesnik URL: https://git.openjdk.org/jdk/commit/124fc4a83dc7e55c3b12e4b6c379391ab11592d5 Stats: 173 lines in 4 files changed: 1 ins; 147 del; 25 mod 8290180: Convert com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh to jtreg java version 8290181: convert com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh to java version Reviewed-by: lmesnik, amenkov ------------- PR: https://git.openjdk.org/jdk/pull/9503 From hseigel at openjdk.org Fri Aug 19 19:26:20 2022 From: hseigel at openjdk.org (Harold Seigel) Date: Fri, 19 Aug 2022 19:26:20 GMT Subject: jmx-dev RFR: 8282684: Obsolete UseContainerCpuShares and PreferContainerQuotaForCPUCount flags Message-ID: Please review this fix to obsolete two container JVM flags related to using CPU shares to compute active processor count within containers. This fix obsoletes the flags and removes the use of CPU shares from the calculations. The fix was tested by running the container tests on Linux x64 and Linux aarch64 using Mach5 Thanks, Harold ------------- Commit messages: - 8282684: Obsolete UseContainerCpuShares and PreferContainerQuotaForCPUCount flags Changes: https://git.openjdk.org/jdk/pull/9948/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9948&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8282684 Stats: 117 lines in 4 files changed: 0 ins; 105 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/9948.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9948/head:pull/9948 PR: https://git.openjdk.org/jdk/pull/9948 From dholmes at openjdk.org Sun Aug 21 02:41:27 2022 From: dholmes at openjdk.org (David Holmes) Date: Sun, 21 Aug 2022 02:41:27 GMT Subject: jmx-dev RFR: 8282684: Obsolete UseContainerCpuShares and PreferContainerQuotaForCPUCount flags In-Reply-To: References: Message-ID: On Fri, 19 Aug 2022 18:41:12 GMT, Harold Seigel wrote: > Please review this fix to obsolete two container JVM flags related to using CPU shares to compute active processor count within containers. This fix obsoletes the flags and removes the use of CPU shares from the calculations. The fix was tested by running the container tests on Linux x64 and Linux aarch64 using Mach5 > > Thanks, Harold Looks good. Thanks. ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.org/jdk/pull/9948 From iklam at openjdk.org Mon Aug 22 05:38:20 2022 From: iklam at openjdk.org (Ioi Lam) Date: Mon, 22 Aug 2022 05:38:20 GMT Subject: jmx-dev RFR: 8282684: Obsolete UseContainerCpuShares and PreferContainerQuotaForCPUCount flags In-Reply-To: References: Message-ID: <2xa6alby12RtnUgyfrQxWnEG4156DgrJzvVVwwg779M=.541e9c79-388f-4233-b2d8-fa706bba5218@github.com> On Fri, 19 Aug 2022 18:41:12 GMT, Harold Seigel wrote: > Please review this fix to obsolete two container JVM flags related to using CPU shares to compute active processor count within containers. This fix obsoletes the flags and removes the use of CPU shares from the calculations. The fix was tested by running the container tests on Linux x64 and Linux aarch64 using Mach5 > > Thanks, Harold LGTM ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.org/jdk/pull/9948 From sgehwolf at openjdk.org Mon Aug 22 08:08:32 2022 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Mon, 22 Aug 2022 08:08:32 GMT Subject: jmx-dev RFR: 8282684: Obsolete UseContainerCpuShares and PreferContainerQuotaForCPUCount flags In-Reply-To: References: Message-ID: On Fri, 19 Aug 2022 18:41:12 GMT, Harold Seigel wrote: > Please review this fix to obsolete two container JVM flags related to using CPU shares to compute active processor count within containers. This fix obsoletes the flags and removes the use of CPU shares from the calculations. The fix was tested by running the container tests on Linux x64 and Linux aarch64 using Mach5 > > Thanks, Harold OK. Question: With this patch `cpu_shares()` related code becomes more or less dead code (other than for diagnostics via `VM.info` jcmd and `-XshowSettings:system`). Is the plan to remove that code too? Without any testing, this would likely bit-rot. ------------- Marked as reviewed by sgehwolf (Reviewer). PR: https://git.openjdk.org/jdk/pull/9948 From hseigel at openjdk.org Mon Aug 22 14:39:07 2022 From: hseigel at openjdk.org (Harold Seigel) Date: Mon, 22 Aug 2022 14:39:07 GMT Subject: jmx-dev RFR: 8282684: Obsolete UseContainerCpuShares and PreferContainerQuotaForCPUCount flags In-Reply-To: References: Message-ID: On Fri, 19 Aug 2022 18:41:12 GMT, Harold Seigel wrote: > Please review this fix to obsolete two container JVM flags related to using CPU shares to compute active processor count within containers. This fix obsoletes the flags and removes the use of CPU shares from the calculations. The fix was tested by running the container tests on Linux x64 and Linux aarch64 using Mach5 > > Thanks, Harold Thanks David, Ioi, and Severin for the reviews! I'll create an issue about removing cpu_shares(). ------------- PR: https://git.openjdk.org/jdk/pull/9948 From hseigel at openjdk.org Mon Aug 22 14:39:07 2022 From: hseigel at openjdk.org (Harold Seigel) Date: Mon, 22 Aug 2022 14:39:07 GMT Subject: jmx-dev Integrated: 8282684: Obsolete UseContainerCpuShares and PreferContainerQuotaForCPUCount flags In-Reply-To: References: Message-ID: On Fri, 19 Aug 2022 18:41:12 GMT, Harold Seigel wrote: > Please review this fix to obsolete two container JVM flags related to using CPU shares to compute active processor count within containers. This fix obsoletes the flags and removes the use of CPU shares from the calculations. The fix was tested by running the container tests on Linux x64 and Linux aarch64 using Mach5 > > Thanks, Harold This pull request has now been integrated. Changeset: db772276 Author: Harold Seigel URL: https://git.openjdk.org/jdk/commit/db772276848f6ad2d4d13e892bcd0eb3123d030f Stats: 117 lines in 4 files changed: 0 ins; 105 del; 12 mod 8282684: Obsolete UseContainerCpuShares and PreferContainerQuotaForCPUCount flags Reviewed-by: dholmes, iklam, sgehwolf ------------- PR: https://git.openjdk.org/jdk/pull/9948 From duke at openjdk.org Mon Aug 22 23:00:07 2022 From: duke at openjdk.org (Bill Huang) Date: Mon, 22 Aug 2022 23:00:07 GMT Subject: jmx-dev RFR: JDK-8292067 Convert test/sun/management/jmxremote/bootstrap shell tests to java version Message-ID: This task convert 3 shell tests below to java version. test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh ------------- Commit messages: - Coverted RmiBootstrapTest, RmiSslBootstrapTest and RmiSslNoKeyStoreTest to java version Changes: https://git.openjdk.org/jdk/pull/9973/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9973&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8292067 Stats: 1607 lines in 9 files changed: 641 ins; 604 del; 362 mod Patch: https://git.openjdk.org/jdk/pull/9973.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9973/head:pull/9973 PR: https://git.openjdk.org/jdk/pull/9973 From duke at openjdk.org Fri Aug 26 21:47:14 2022 From: duke at openjdk.org (Bill Huang) Date: Fri, 26 Aug 2022 21:47:14 GMT Subject: jmx-dev RFR: JDK-8292067 Convert test/sun/management/jmxremote/bootstrap shell tests to java version In-Reply-To: References: Message-ID: On Mon, 22 Aug 2022 22:51:50 GMT, Bill Huang wrote: > This task convert 3 shell tests below to java version. > test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh > test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh @lmesnik Could you please review this PR? ------------- PR: https://git.openjdk.org/jdk/pull/9973 From lmesnik at openjdk.org Mon Aug 29 23:15:11 2022 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Mon, 29 Aug 2022 23:15:11 GMT Subject: jmx-dev RFR: JDK-8292067 Convert test/sun/management/jmxremote/bootstrap shell tests to java version In-Reply-To: References: Message-ID: On Mon, 22 Aug 2022 22:51:50 GMT, Bill Huang wrote: > This task convert 3 shell tests below to java version. > test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh > test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java line 33: > 31: import java.rmi.server.ExportException; > 32: > 33: import java.util.*; wildcards in import are not welcome, please avoid them not needed to replace existing, just don't introduce them test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java line 115: > 113: throws IOException { > 114: > 115: final Set names = server.queryNames(pattern, query); Since you change these lines, might add template parameters here? Set names = ... and simplify if it is possible. Not a request, just a proposal. test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java line 166: > 164: if (args.length == 0) { > 165: throw new IllegalArgumentException("Argument is required for this" + > 166: " test"); not needed to split lines test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java line 700: > 698: } > 699: } > 700: System.err.println( I think that the previous indentation was good enough. No need to change it. test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java line 716: > 714: throws InterruptedException, IOException { > 715: String errStr = null; > 716: errStr = testConfiguration(conf); Merge with errStr = null ? test/jdk/sun/management/jmxremote/bootstrap/RmiTestBase.java line 47: > 45: static final String TEST_SRC = "@TEST-SRC@"; > 46: > 47: static final boolean isWindows = System.getProperty("os.name").contains( Check Platform.java. test/jdk/sun/management/jmxremote/bootstrap/RmiTestBase.java line 112: > 110: > 111: static String getDefaultFileName(String basename) { > 112: final StringBuffer defaultFileName = Why don't just create final String = System.getProperty(.._) + SEP + .... + basename; or even make static final variable like defaultFileNamePrefix = ... and return defaultFileNamePrefix + basename; test/jdk/sun/management/jmxremote/bootstrap/RmiTestBase.java line 130: > 128: **/ > 129: static String getDefaultStoreName(String basename) { > 130: final StringBuffer defaultFileName = the same as previous test/jdk/sun/management/jmxremote/bootstrap/RmiTestBase.java line 162: > 160: Utils.replaceFilesString(propertyFiles, > 161: (s) -> s.replace(TEST_SRC, DEST) > 162: .replaceAll("[/\\\\]", "\\\\\\\\")); Could you please comment this replacement. ------------- PR: https://git.openjdk.org/jdk/pull/9973 From duke at openjdk.org Mon Aug 29 23:39:10 2022 From: duke at openjdk.org (Bill Huang) Date: Mon, 29 Aug 2022 23:39:10 GMT Subject: jmx-dev RFR: JDK-8292067 Convert test/sun/management/jmxremote/bootstrap shell tests to java version In-Reply-To: References: Message-ID: <10yedZhGkPqW3RjSV49MNMOaz_-VH2OelDjAgm2KQs4=.8836d0a7-0607-40a5-ade6-80f32dfd7252@github.com> On Mon, 29 Aug 2022 22:06:18 GMT, Leonid Mesnik wrote: >> This task convert 3 shell tests below to java version. >> test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh >> test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh > > test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java line 33: > >> 31: import java.rmi.server.ExportException; >> 32: >> 33: import java.util.*; > > wildcards in import are not welcome, please avoid them > not needed to replace existing, just don't introduce them Good catch! I didn't introduce this intentionally. It was automatically rearranged by IntelliJ. I will find out a way to disable that feature. ------------- PR: https://git.openjdk.org/jdk/pull/9973 From duke at openjdk.org Tue Aug 30 01:00:15 2022 From: duke at openjdk.org (Bill Huang) Date: Tue, 30 Aug 2022 01:00:15 GMT Subject: jmx-dev RFR: JDK-8292067 Convert test/sun/management/jmxremote/bootstrap shell tests to java version In-Reply-To: References: Message-ID: On Mon, 29 Aug 2022 22:11:38 GMT, Leonid Mesnik wrote: >> This task convert 3 shell tests below to java version. >> test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh >> test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh > > test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java line 115: > >> 113: throws IOException { >> 114: >> 115: final Set names = server.queryNames(pattern, query); > > Since you change these lines, might add template parameters here? > Set names = ... > and simplify if it is possible. > Not a request, just a proposal. Actually, I didn't make changes to these lines. They were done by the IDEA auto formatter. But I can simplify it and add template parameters. > test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java line 166: > >> 164: if (args.length == 0) { >> 165: throw new IllegalArgumentException("Argument is required for this" + >> 166: " test"); > > not needed to split lines The IDEA splits the lines for a line limit of 80 characters. ------------- PR: https://git.openjdk.org/jdk/pull/9973 From duke at openjdk.org Tue Aug 30 18:17:28 2022 From: duke at openjdk.org (Bill Huang) Date: Tue, 30 Aug 2022 18:17:28 GMT Subject: jmx-dev RFR: JDK-8292067 Convert test/sun/management/jmxremote/bootstrap shell tests to java version [v2] In-Reply-To: References: Message-ID: > This task convert 3 shell tests below to java version. > test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh > test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh Bill Huang has updated the pull request incrementally with two additional commits since the last revision: - Relax line-length limit restriction - Implemented review comments. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9973/files - new: https://git.openjdk.org/jdk/pull/9973/files/11cfefdd..126bf292 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9973&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9973&range=00-01 Stats: 407 lines in 3 files changed: 33 ins; 206 del; 168 mod Patch: https://git.openjdk.org/jdk/pull/9973.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9973/head:pull/9973 PR: https://git.openjdk.org/jdk/pull/9973 From lmesnik at openjdk.org Tue Aug 30 22:05:18 2022 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Tue, 30 Aug 2022 22:05:18 GMT Subject: jmx-dev RFR: JDK-8292067 Convert test/sun/management/jmxremote/bootstrap shell tests to java version [v2] In-Reply-To: References: Message-ID: <-zD4cslKX5ax8Fy3zluU6-Frh0pWfON8aiKesIA3JXA=.09d79b29-6c5c-4841-96d0-0cfec72b3975@github.com> On Tue, 30 Aug 2022 18:17:28 GMT, Bill Huang wrote: >> This task convert 3 shell tests below to java version. >> test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh >> test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh > > Bill Huang has updated the pull request incrementally with two additional commits since the last revision: > > - Relax line-length limit restriction > - Implemented review comments. Marked as reviewed by lmesnik (Reviewer). test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java line 206: > 204: } > 205: FileInputStream fin = new FileInputStream(passwordFileName); > 206: try { You could use try with resources. test/jdk/sun/management/jmxremote/bootstrap/RmiTestBase.java line 172: > 170: } else { > 171: if (!thisEntry.principal().getName().contains("NULL SID") && > 172: thisEntry.type() != AclEntryType.ALLOW) { I think the previous indentation was correct. We put "&&", "+" and "." in the beginning of next line usually. ------------- PR: https://git.openjdk.org/jdk/pull/9973 From duke at openjdk.org Tue Aug 30 22:39:15 2022 From: duke at openjdk.org (Bill Huang) Date: Tue, 30 Aug 2022 22:39:15 GMT Subject: jmx-dev RFR: JDK-8292067 Convert test/sun/management/jmxremote/bootstrap shell tests to java version [v3] In-Reply-To: References: Message-ID: > This task convert 3 shell tests below to java version. > test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh > test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh Bill Huang has updated the pull request incrementally with one additional commit since the last revision: Implemented more review comments. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9973/files - new: https://git.openjdk.org/jdk/pull/9973/files/126bf292..5e74c170 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9973&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9973&range=01-02 Stats: 8 lines in 2 files changed: 1 ins; 2 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/9973.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9973/head:pull/9973 PR: https://git.openjdk.org/jdk/pull/9973