From coleenp at openjdk.java.net Wed Sep 1 01:48:06 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Wed, 1 Sep 2021 01:48:06 GMT Subject: RFR: 8273217: Make ParHeapInspectTask _safepoint_check_never Message-ID: Make lock be declared as safepoint_check_never. Ran tier1-3 tests and test that uses this code: serviceability/dcmd/gc/ClassHistogramTest.java ------------- Commit messages: - 8273217: Make ParHeapInspectTask _safepoint_check_never Changes: https://git.openjdk.java.net/jdk/pull/5323/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5323&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273217 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5323.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5323/head:pull/5323 PR: https://git.openjdk.java.net/jdk/pull/5323 From iklam at openjdk.java.net Wed Sep 1 02:20:49 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 1 Sep 2021 02:20:49 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: References: Message-ID: <_tB94xauligjxvtsYGChlrCKDhkcx67jJupp4uPxmoQ=.4fca1985-8bcf-4fed-9874-a48b098256e2@github.com> On Mon, 30 Aug 2021 07:09:54 GMT, Xiaowei Lu wrote: > According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. > > $java -Xloggc:gc.log -verbose:gc -version > [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. > [0.003s][info ][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. > > $java -Xlog:gc:gc.log -verbose:gc -version > [0.003s][info][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html only mentions that `-verbose:gc` will be overridden by `-Xloggc:` (and `-Xloggc:` has been replaced with `-Xlog:gc:file=`). It doesn't mention the other three `-verbose` options (class, module, jni). We need to discuss what (if anything) should be done for those three options. src/hotspot/share/runtime/arguments.cpp line 2963: > 2961: if (ts->contains(LogTag::_gc) && ts->has_output_to_file()) { > 2962: has_verbose_gc = false; > 2963: } What if the command-line is this? java -Xlog:gc+heap=foo.txt -verbose:gc -version src/hotspot/share/runtime/arguments.cpp line 2965: > 2963: } > 2964: if (ts->contains(LogTag::_class) && ts->has_output_to_file()) { > 2965: has_verbose_class = false; This doesn't seem correct to me. If the command line is: java -Xlog:class+resolve=debug:file=log.txt -verbose:class -version We should have the following: (a) class,load -> stdout (b) class,unload -> stdout (c) class,resolve -> log.txt But your change will disable both (a) and (b). Also, what is the proposed behavior with this? java -Xlog:class+load:file=log.txt -verbose:class -version Will we have [A]: class,load -> log.txt class,unload -> stdout or [B]? class,load -> log.txt class,unload -> disabled ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From ioi.lam at oracle.com Wed Sep 1 02:35:22 2021 From: ioi.lam at oracle.com (Ioi Lam) Date: Tue, 31 Aug 2021 19:35:22 -0700 Subject: Why no hs-err file on CheckJNI? In-Reply-To: References: <260265ec-d19b-d208-fa8e-169df2dec647@oracle.com> <6f8de254-be71-6889-aeea-ed284523f0c1@oracle.com> Message-ID: <53fbb6d8-433b-46cf-87ce-a0c9b08abc84@oracle.com> On 8/25/21 9:32 PM, Thomas St?fe wrote: > On Wed, Aug 25, 2021 at 9:28 AM David Holmes > wrote: > >> On 25/08/2021 4:04 pm, Thomas St?fe wrote: >>> Hi David, >>> >>> thank you for looking at this. Answers below. >>> >>> On Tue, Aug 24, 2021 at 9:38 AM David Holmes >> > wrote: >>> >>> Hi Thomas, >>> >>> On 24/08/2021 12:27 am, Thomas St?fe wrote: >>> > Hi, >>> > >>> > when we specify CheckJNI or CheckJNICalls and we catch an error >>> (e.g. a >>> > memory overwriter), we write a short report, then abort. See: >>> > >>> > >>> >> https://github.com/openjdk/jdk/blob/594e5161b48382d61509b4969bc8f52c3c076452/src/hotspot/share/prims/jniCheck.hpp#L36-L41 >>> < >> https://github.com/openjdk/jdk/blob/594e5161b48382d61509b4969bc8f52c3c076452/src/hotspot/share/prims/jniCheck.hpp#L36-L41 >>> > >>> > This has been introduced in 2008 with JDK-6739363 "Xcheck jni >>> doesn't check >>> > native function arguments". I could find no discussion about this >> on >>> > mailing list archives. >>> >>> There have been a number of updates to Xcheck:jni since then and in >>> 17 I >>> documented the different kinds of checks and their behaviour in more >>> detail (JDK-8260194): >>> >>> >> https://htmlpreview.github.io/?https://github.com/openjdk/jdk17/blob/4f336dd3985b654dc3fbacabdcfccf590ea918e5/java.html >>> < >> https://htmlpreview.github.io/?https://github.com/openjdk/jdk17/blob/4f336dd3985b654dc3fbacabdcfccf590ea918e5/java.html >>> >>> >>> Nice and interesting. Does not mention buffer overruns though. >> Do we detect buffer overruns? I looked at all the jniCheck functions to >> see what things we checked for and thought I had found them all. :( >> >>> > Does anyone know why we don't write a normal hs-err file in this >>> case? >>> >>> Because the intent is to mimic throwing an exception and exiting and >> it >>> is not a "hotspot error" it is an application error. >>> >>> > Would anyone care if we did? We do so in similar cases, e.g. if >>> os::free() >>> > catches an overwrite. >>> >>> os::free() is capturing an internal hotspot programming error, not an >>> error in user code. >>> >>> >>> Is this mainly a support issue for you? Meaning, the existence of an >>> hs-err file would indicate a hotspot error and third-party JNI errors >>> erroneously assigned to the hotspot group's support queue? If so, I can >>> understand that, though that separation has a lot of holes in practice >>> (it's very easy to make the hotspot crash from third-party code). >>> >>> Technically, a hs-err file would be useful even if most of the hotspot >>> internals are irrelevant for a JNI bug. The file contains a lot of >>> valuable context. >> I just don't think a "hotspot error file" is a reasonable or necessary >> response to detecting a JNI error in application code. A stacktrace >> should suffice for the vast majority of errors detected. >> >>> You would need to rework the header error messages etc and remove the >>> bug reporting stuff so that the user doesn't think it is an error in >>> the >>> VM itself. Overall I don't see the need to do it as the main thing is >>> the stacktrace to see where the bad JNI usage occurred - and as I >> said >>> this isn't a VM error. >>> >>> It might also introduce compatibility issues for anyone who runs >>> testing >>> wiith -Xcheck:jni and doesn't expect to get the hs_err file - though >> if >>> you keep the current output but also produce a modified hs_err file >>> that >>> may be okay. But I still question why you would need this? >>> >>> >>> I am currently investigating a buffer overrun at a client caused in >>> ReleaseByteArrayElements. A hs-err file would have been definitely >> useful. >> >> I need more info on this case. If the overrun was detected when it >> happened then I would hope a stacktrace would suffice to show the errant >> code. And I'm not clear how a hs_err file would help. ?? >> >> > A hs-err file would give you context information beyond the stack, e.g. VM > and program arguments, runtime, memory content at register/stack addresses > (may contain the broken block) etc. > > A hs-err file is also a clear sign for a fatal error, while output to > stderr may be accidentally ignored. It depends on how well versed your > first level support and your customers are. > > But I don't like pressing this. I understand your reasons for not writing > an hs-err file. We may change this downstream only, the patch would be > really trivial. What about a new option like -XX:+LogJNIChecks which writes a jni_check_log_.log file? This way you get more information about the check, and it's clear that this is not a hotspot error. Thanks - Ioi From dholmes at openjdk.java.net Wed Sep 1 04:23:48 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 1 Sep 2021 04:23:48 GMT Subject: RFR: 8272970: Parallelize runtime/InvocationTests/ In-Reply-To: References: Message-ID: On Tue, 31 Aug 2021 21:29:25 GMT, Igor Ignatyev wrote: >> Current runtime/InvocationTests/ are long and serial. They take about half an hour on a modern desktop, mostly using a single CPU. They can be parallelized better, at least on sub-test level. This would be important as [JDK-8272914](https://bugs.openjdk.java.net/browse/JDK-8272914) would start to run them in tier3. >> >> Sample run times: >> >> >> $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=runtime/InvocationTests/ >> >> # Before >> real 32m2.188s >> user 59m12.818s >> sys 0m45.612s >> >> # After >> real 17m21.110s >> user 63m31.851s >> sys 0m55.391s >> >> >> I think we can technically go even deeper, for example parallelising by `packageSet` in the generators themselves, but that would be much more intrusive. I think 17 minutes is already quite good, given other tests running in prospective `hotspot:tier3`. > > LGTM. one nit: it should be possible to reduce clutter by removing `@compile` actions, could you please either do that here or file an RFE? > > PS I wish jtreg had a way not to duplicate all these tags, perhaps w/ some kind of a preprocessor. @iignatev At least some of the compile commands must remain. The top level test doesn't reference the actual test classes directly so must explicitly compile them. Any classes those directly reference do not need an explicit compile-command. ------------- PR: https://git.openjdk.java.net/jdk/pull/5250 From iklam at openjdk.java.net Wed Sep 1 04:37:46 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 1 Sep 2021 04:37:46 GMT Subject: RFR: 8273104: Refactoring option parser for UL In-Reply-To: References: Message-ID: On Sun, 29 Aug 2021 03:48:06 GMT, Yasumasa Suenaga wrote: > As we discussed in PR #4885 and in [its CSR](https://bugs.openjdk.java.net/browse/JDK-8271188), we want to introduce `foldmultilines` to stdout/err UL output. However we have no chance to configure `LogOutput` for stdout/err (`LogStdoutOutput`/`LogStderrOutput`) becasuse they will be instantiated statically in logFileStreamOutput.cpp. > > So we need to refactor UL option parser to propagate options to all extended classes of `LogOutput`. > > * Move `parse_option()` to `LogOutput` from `LogFileOutput`, then it becames public member. > * Introduce `set_option()` in `LogOutput` as a pure virtual member to apply options to each log output, then it is implemented in both `LogFileStreamOutput` and `LogFileOutput`. > * Move both `FoldMultilinesOptionKey` and `_fold_mulilines` in `LogFileStreamOutput` to private member because they are no longer to need to be public. > > I want to send PR to introduce `foldmultilines` to stdout/err like https://github.com/YaSuenag/jdk/compare/ul-refactoring...YaSuenag:foldmultilines-for-stdout after this. This refactoring looks good to me. Thanks for doing it. ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5293 From dholmes at openjdk.java.net Wed Sep 1 06:09:45 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 1 Sep 2021 06:09:45 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: References: Message-ID: On Mon, 30 Aug 2021 07:09:54 GMT, Xiaowei Lu wrote: > According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. > > $java -Xloggc:gc.log -verbose:gc -version > [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. > [0.003s][info ][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. > > $java -Xlog:gc:gc.log -verbose:gc -version > [0.003s][info][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. I find it very unfortunate that it states that `-verbose:gc` will be overridden by `-Xloggc:` and `-Xlog` as that makes the logic for dealing with this GC case very convoluted. It would make much more sense that `-verbose:x` simply be treated as its corresponding `-Xlog` variant. Then we would need no special logic at all. I'm unclear how the non-GC versions of `-verbose:x` are treated with respect to explicit `-Xlog:x` commands? ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From dholmes at openjdk.java.net Wed Sep 1 07:07:52 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 1 Sep 2021 07:07:52 GMT Subject: RFR: 8273217: Make ParHeapInspectTask _safepoint_check_never In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 01:40:17 GMT, Coleen Phillimore wrote: > Make lock be declared as safepoint_check_never. > Ran tier1-3 tests and test that uses this code: serviceability/dcmd/gc/ClassHistogramTest.java Hi Coleen, The main change is fine, but the other seems unnecessary - see comment below. Thanks, David src/hotspot/share/memory/heapInspection.cpp line 564: > 562: missed_count = ric.missed_count(); > 563: { > 564: MutexLocker x(&_mutex, Mutex::_no_safepoint_check_flag); This change seems unnecessary - this lock is only taken by GC threads, or the VMThread (?), never a JavaThread, but this change makes it look like it is taken by a JavaThread that wants to avoid safepoint checks. ------------- PR: https://git.openjdk.java.net/jdk/pull/5323 From dholmes at openjdk.java.net Wed Sep 1 07:18:49 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 1 Sep 2021 07:18:49 GMT Subject: RFR: JDK-8273176: handle latest VS2019 in abstract_vm_version In-Reply-To: References: Message-ID: On Tue, 31 Aug 2021 13:09:26 GMT, Matthias Baesken wrote: > Please review this small change. > It handles latest VS2019 versions in abstract_vm_version, e.g. 16.10. > See the _MSC_VER documentation at https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-160 > > Thanks, Matthias Looks fine and trivial. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5317 From github.com+39413832+weixlu at openjdk.java.net Wed Sep 1 07:36:48 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Wed, 1 Sep 2021 07:36:48 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: <_tB94xauligjxvtsYGChlrCKDhkcx67jJupp4uPxmoQ=.4fca1985-8bcf-4fed-9874-a48b098256e2@github.com> References: <_tB94xauligjxvtsYGChlrCKDhkcx67jJupp4uPxmoQ=.4fca1985-8bcf-4fed-9874-a48b098256e2@github.com> Message-ID: <86ZzLccBTRSeiVntARn0Yr3zi2m7S2bgwTpToiSipSw=.504febe5-7c82-45a6-9ab3-ecf09cbaf546@github.com> On Wed, 1 Sep 2021 02:03:48 GMT, Ioi Lam wrote: >> According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. >> >> $java -Xloggc:gc.log -verbose:gc -version >> [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. >> [0.003s][info ][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. >> >> $java -Xlog:gc:gc.log -verbose:gc -version >> [0.003s][info][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. > > src/hotspot/share/runtime/arguments.cpp line 2965: > >> 2963: } >> 2964: if (ts->contains(LogTag::_class) && ts->has_output_to_file()) { >> 2965: has_verbose_class = false; > > This doesn't seem correct to me. If the command line is: > > > java -Xlog:class+resolve=debug:file=log.txt -verbose:class -version > > > We should have the following: > > > (a) class,load -> stdout > (b) class,unload -> stdout > (c) class,resolve -> log.txt > > > But your change will disable both (a) and (b). > > > Also, what is the proposed behavior with this? > > > java -Xlog:class+load:file=log.txt -verbose:class -version > > > Will we have [A]: > > > class,load -> log.txt > class,unload -> stdout > > > or [B]? > > > class,load -> log.txt > class,unload -> disabled For your java command: java -Xlog:class+load:file=log.txt -verbose:class -version We will have [B] according to the current commit: class,load -> log.txt class,unload -> disabled But I'm not sure whether this behavior is correct. The website (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html) doesn't give us explicit clue. It only says -verbose:class equals -Xlog:class+load=info,class+unload=info. For the command above, maybe we can propose a third way [C]: class,load -> log.txt and stdout class,unload -> stdout In addition, what if the command is: java -Xlog:class+load=error,class+unload=info:log.txt -verbose:class -version In this case, since ``class+load=error`` is ?weaker" than ``class+load=info``, maybe -verbose should not be overriden by -Xlog? To make things simple, in my commit, as long as "class" shows up, no matter it's ``-Xlog:class`` or ``-Xlog:class+resolve`` or ``-Xlog:class=debug`` , then ``-verbose:class`` is to be overiden. But I'm quite uncertain about whether it is correct. Looking forward to your suggestions. ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From github.com+39413832+weixlu at openjdk.java.net Wed Sep 1 07:44:44 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Wed, 1 Sep 2021 07:44:44 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: <_tB94xauligjxvtsYGChlrCKDhkcx67jJupp4uPxmoQ=.4fca1985-8bcf-4fed-9874-a48b098256e2@github.com> References: <_tB94xauligjxvtsYGChlrCKDhkcx67jJupp4uPxmoQ=.4fca1985-8bcf-4fed-9874-a48b098256e2@github.com> Message-ID: On Wed, 1 Sep 2021 02:14:44 GMT, Ioi Lam wrote: >> According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. >> >> $java -Xloggc:gc.log -verbose:gc -version >> [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. >> [0.003s][info ][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. >> >> $java -Xlog:gc:gc.log -verbose:gc -version >> [0.003s][info][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. > > src/hotspot/share/runtime/arguments.cpp line 2963: > >> 2961: if (ts->contains(LogTag::_gc) && ts->has_output_to_file()) { >> 2962: has_verbose_gc = false; >> 2963: } > > What if the command-line is this? > > > java -Xlog:gc+heap=foo.txt -verbose:gc -version According to the current commit, we will have gc -> disabled gc+heap ->foo.txt But the same as the comment above, I'm not sure about its correctness. So maybe we should discuss what if the selections in Xlog is not the same as ``-Xlog:gc``. ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From github.com+39413832+weixlu at openjdk.java.net Wed Sep 1 07:53:46 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Wed, 1 Sep 2021 07:53:46 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 06:06:44 GMT, David Holmes wrote: > I find it very unfortunate that it states that `-verbose:gc` will be overridden by `-Xloggc:` and `-Xlog` as that makes the logic for dealing with this GC case very convoluted. It would make much more sense that `-verbose:x` simply be treated as its corresponding `-Xlog` variant. Then we would need no special logic at all. Things are quite easy if `-verbose:x` is treated as `-Xlog`. Multiple -Xlog arguments for the same output override each other in their given order, according to https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html. > I'm unclear how the non-GC versions of `-verbose:x` are treated with respect to explicit `-Xlog:x` commands? I have looked up some documents but unfortunately haven't found relevant statements. ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From shade at openjdk.java.net Wed Sep 1 08:01:20 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 1 Sep 2021 08:01:20 GMT Subject: RFR: 8272970: Parallelize runtime/InvocationTests/ [v2] In-Reply-To: References: Message-ID: <_3hdfNIcBw_oQNsiCpOTt0CBkzYMO6OrP5XHtCSVHp0=.509392f8-66cc-44f7-9a2e-e324fb527620@github.com> > Current runtime/InvocationTests/ are long and serial. They take about half an hour on a modern desktop, mostly using a single CPU. They can be parallelized better, at least on sub-test level. This would be important as [JDK-8272914](https://bugs.openjdk.java.net/browse/JDK-8272914) would start to run them in tier3. > > Sample run times: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=runtime/InvocationTests/ > > # Before > real 32m2.188s > user 59m12.818s > sys 0m45.612s > > # After > real 17m21.110s > user 63m31.851s > sys 0m55.391s > > > I think we can technically go even deeper, for example parallelising by `packageSet` in the generators themselves, but that would be much more intrusive. I think 17 minutes is already quite good, given other tests running in prospective `hotspot:tier3`. Aleksey Shipilev 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 three additional commits since the last revision: - Merge branch 'master' into JDK-8272970-parallel-invocation-tests - Trim down redundant compile tags - 8272970: Parallelize runtime/InvocationTests/ ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5250/files - new: https://git.openjdk.java.net/jdk/pull/5250/files/3651efa3..f16b642d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5250&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5250&range=00-01 Stats: 5444 lines in 222 files changed: 3928 ins; 730 del; 786 mod Patch: https://git.openjdk.java.net/jdk/pull/5250.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5250/head:pull/5250 PR: https://git.openjdk.java.net/jdk/pull/5250 From shade at openjdk.java.net Wed Sep 1 08:01:22 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 1 Sep 2021 08:01:22 GMT Subject: RFR: 8272970: Parallelize runtime/InvocationTests/ [v2] In-Reply-To: References: Message-ID: On Tue, 31 Aug 2021 21:29:25 GMT, Igor Ignatyev wrote: > LGTM. one nit: it should be possible to reduce clutter by removing `@compile` actions, could you please either do that here or file an RFE? Right. The generators are referencing the `shared/` stuff implicitly, so we can drop `@compile` for them. Tests still pass without them. See new commit. ------------- PR: https://git.openjdk.java.net/jdk/pull/5250 From mbaesken at openjdk.java.net Wed Sep 1 08:02:53 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Wed, 1 Sep 2021 08:02:53 GMT Subject: Integrated: JDK-8273176: handle latest VS2019 in abstract_vm_version In-Reply-To: References: Message-ID: <_NuKXlDknzFOxOMxqUYOml0FW2l64Uy81P1aKTOHbD8=.0dcc1054-e5ae-4ad9-8f9a-8ba964538e27@github.com> On Tue, 31 Aug 2021 13:09:26 GMT, Matthias Baesken wrote: > Please review this small change. > It handles latest VS2019 versions in abstract_vm_version, e.g. 16.10. > See the _MSC_VER documentation at https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-160 > > Thanks, Matthias This pull request has now been integrated. Changeset: 0e14bf70 Author: Matthias Baesken URL: https://git.openjdk.java.net/jdk/commit/0e14bf70cf6e482a2ec7d13ed37df0bee911740d Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod 8273176: handle latest VS2019 in abstract_vm_version Reviewed-by: kevinw, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5317 From lucy at openjdk.java.net Wed Sep 1 09:30:52 2021 From: lucy at openjdk.java.net (Lutz Schmidt) Date: Wed, 1 Sep 2021 09:30:52 GMT Subject: RFR: JDK-8273176: handle latest VS2019 in abstract_vm_version In-Reply-To: References: Message-ID: On Tue, 31 Aug 2021 13:09:26 GMT, Matthias Baesken wrote: > Please review this small change. > It handles latest VS2019 versions in abstract_vm_version, e.g. 16.10. > See the _MSC_VER documentation at https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-160 > > Thanks, Matthias Looks good to me. Thanks for adding support for the latest MSVC++. Lutz ------------- PR: https://git.openjdk.java.net/jdk/pull/5317 From dholmes at openjdk.java.net Wed Sep 1 09:44:42 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 1 Sep 2021 09:44:42 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: References: Message-ID: On Mon, 30 Aug 2021 07:09:54 GMT, Xiaowei Lu wrote: > According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. > > $java -Xloggc:gc.log -verbose:gc -version > [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. > [0.003s][info ][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. > > $java -Xlog:gc:gc.log -verbose:gc -version > [0.003s][info][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. There are no statements about how the other `-verbose:x` options interact with their `-Xlog:x` equivalents, but I was wondering how the implementation actually works? ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From dholmes at openjdk.java.net Wed Sep 1 09:47:45 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 1 Sep 2021 09:47:45 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: References: Message-ID: On Mon, 30 Aug 2021 07:09:54 GMT, Xiaowei Lu wrote: > According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. > > $java -Xloggc:gc.log -verbose:gc -version > [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. > [0.003s][info ][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. > > $java -Xlog:gc:gc.log -verbose:gc -version > [0.003s][info][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. I also can't see how to implement the "overrides" semantics without scanning the entire command-line to collate the different forms of the flag and then collapse them into a single appropriate `-Xlog` definition. And that would be a startup hit. ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From dholmes at openjdk.java.net Wed Sep 1 09:50:46 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 1 Sep 2021 09:50:46 GMT Subject: RFR: 8272970: Parallelize runtime/InvocationTests/ [v2] In-Reply-To: <_3hdfNIcBw_oQNsiCpOTt0CBkzYMO6OrP5XHtCSVHp0=.509392f8-66cc-44f7-9a2e-e324fb527620@github.com> References: <_3hdfNIcBw_oQNsiCpOTt0CBkzYMO6OrP5XHtCSVHp0=.509392f8-66cc-44f7-9a2e-e324fb527620@github.com> Message-ID: On Wed, 1 Sep 2021 08:01:20 GMT, Aleksey Shipilev wrote: >> Current runtime/InvocationTests/ are long and serial. They take about half an hour on a modern desktop, mostly using a single CPU. They can be parallelized better, at least on sub-test level. This would be important as [JDK-8272914](https://bugs.openjdk.java.net/browse/JDK-8272914) would start to run them in tier3. >> >> Sample run times: >> >> >> $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=runtime/InvocationTests/ >> >> # Before >> real 32m2.188s >> user 59m12.818s >> sys 0m45.612s >> >> # After >> real 17m21.110s >> user 63m31.851s >> sys 0m55.391s >> >> >> I think we can technically go even deeper, for example parallelising by `packageSet` in the generators themselves, but that would be much more intrusive. I think 17 minutes is already quite good, given other tests running in prospective `hotspot:tier3`. > > Aleksey Shipilev 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 three additional commits since the last revision: > > - Merge branch 'master' into JDK-8272970-parallel-invocation-tests > - Trim down redundant compile tags > - 8272970: Parallelize runtime/InvocationTests/ Marked as reviewed by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5250 From coleenp at openjdk.java.net Wed Sep 1 11:35:45 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Wed, 1 Sep 2021 11:35:45 GMT Subject: RFR: 8273217: Make ParHeapInspectTask _safepoint_check_never In-Reply-To: References: Message-ID: <7rkaVJuZkUaWaB-XoGqGNmUF_gbp1SC0UaSflZvbzSA=.e53c4264-ed83-4ba9-84c8-49c1c5beba01@github.com> On Wed, 1 Sep 2021 06:28:36 GMT, David Holmes wrote: >> Make lock be declared as safepoint_check_never. >> Ran tier1-3 tests and test that uses this code: serviceability/dcmd/gc/ClassHistogramTest.java > > src/hotspot/share/memory/heapInspection.cpp line 564: > >> 562: missed_count = ric.missed_count(); >> 563: { >> 564: MutexLocker x(&_mutex, Mutex::_no_safepoint_check_flag); > > This change seems unnecessary - this lock is only taken by GC threads, or the VMThread (?), never a JavaThread, but this change makes it look like it is taken by a JavaThread that wants to avoid safepoint checks. This change is necessary in that we have a check inside Mutex::lock that this flag matches how the lock was defined. It was argued that we want to have to pass this parameter to know when safepoints are not checked in the code that was taking out the lock, so the parameter is needed. ------------- PR: https://git.openjdk.java.net/jdk/pull/5323 From david.holmes at oracle.com Wed Sep 1 12:13:31 2021 From: david.holmes at oracle.com (David Holmes) Date: Wed, 1 Sep 2021 22:13:31 +1000 Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: <86ZzLccBTRSeiVntARn0Yr3zi2m7S2bgwTpToiSipSw=.504febe5-7c82-45a6-9ab3-ecf09cbaf546@github.com> References: <_tB94xauligjxvtsYGChlrCKDhkcx67jJupp4uPxmoQ=.4fca1985-8bcf-4fed-9874-a48b098256e2@github.com> <86ZzLccBTRSeiVntARn0Yr3zi2m7S2bgwTpToiSipSw=.504febe5-7c82-45a6-9ab3-ecf09cbaf546@github.com> Message-ID: <132434ce-bf0e-cc8e-af49-6ba5c8eed141@oracle.com> On 1/09/2021 5:36 pm, Xiaowei Lu wrote: > On Wed, 1 Sep 2021 02:03:48 GMT, Ioi Lam wrote: > >>> According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. >>> >>> $java -Xloggc:gc.log -verbose:gc -version >>> [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. >>> [0.003s][info ][gc] Using G1 >>> $cat gc.log >>> [0.003s][info][gc] Using G1 >>> >>> In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. >>> >>> $java -Xlog:gc:gc.log -verbose:gc -version >>> [0.003s][info][gc] Using G1 >>> $cat gc.log >>> [0.003s][info][gc] Using G1 >>> >>> As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. >> >> src/hotspot/share/runtime/arguments.cpp line 2965: >> >>> 2963: } >>> 2964: if (ts->contains(LogTag::_class) && ts->has_output_to_file()) { >>> 2965: has_verbose_class = false; >> >> This doesn't seem correct to me. If the command line is: >> >> >> java -Xlog:class+resolve=debug:file=log.txt -verbose:class -version >> >> >> We should have the following: >> >> >> (a) class,load -> stdout >> (b) class,unload -> stdout >> (c) class,resolve -> log.txt >> >> >> But your change will disable both (a) and (b). >> >> >> Also, what is the proposed behavior with this? >> >> >> java -Xlog:class+load:file=log.txt -verbose:class -version >> >> >> Will we have [A]: >> >> >> class,load -> log.txt >> class,unload -> stdout >> >> >> or [B]? >> >> >> class,load -> log.txt >> class,unload -> disabled > > For your java command: > > java -Xlog:class+load:file=log.txt -verbose:class -version > > We will have [B] according to the current commit: > > class,load -> log.txt > class,unload -> disabled > > But I'm not sure whether this behavior is correct. The website (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html) doesn't give us explicit clue. It only says -verbose:class equals -Xlog:class+load=info,class+unload=info. > For the command above, maybe we can propose a third way [C]: > > class,load -> log.txt and stdout > class,unload -> stdout > > In addition, what if the command is: > > java -Xlog:class+load=error,class+unload=info:log.txt -verbose:class -version > > In this case, since ``class+load=error`` is ?weaker" than ``class+load=info``, maybe -verbose should not be overriden by -Xlog? There is no specification that states that -verbose:X is overridden by -Xlog:X except for GC. For the non-GC case the -verbose:X argument should be processed in its -Xlog form and the full command-line processed as-if only -Xlog had been used. That is very clear and simple to implement. The GC case is more problematic as per my other comment. There is no clear definition of what override means, but I would think that "ignore" would be appropriate. The main problem is that you have to scan the entire command-line to know what to do with the -verbose:gc. David ----- > To make things simple, in my commit, as long as "class" shows up, no matter it's ``-Xlog:class`` or ``-Xlog:class+resolve`` or ``-Xlog:class=debug`` , then ``-verbose:class`` is to be overiden. But I'm quite uncertain about whether it is correct. Looking forward to your suggestions. > > ------------- > > PR: https://git.openjdk.java.net/jdk/pull/5295 > From dholmes at openjdk.java.net Wed Sep 1 12:29:49 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 1 Sep 2021 12:29:49 GMT Subject: RFR: 8273217: Make ParHeapInspectTask _safepoint_check_never In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 01:40:17 GMT, Coleen Phillimore wrote: > Make lock be declared as safepoint_check_never. > Ran tier1-3 tests and test that uses this code: serviceability/dcmd/gc/ClassHistogramTest.java Marked as reviewed by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5323 From dholmes at openjdk.java.net Wed Sep 1 12:29:49 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 1 Sep 2021 12:29:49 GMT Subject: RFR: 8273217: Make ParHeapInspectTask _safepoint_check_never In-Reply-To: <7rkaVJuZkUaWaB-XoGqGNmUF_gbp1SC0UaSflZvbzSA=.e53c4264-ed83-4ba9-84c8-49c1c5beba01@github.com> References: <7rkaVJuZkUaWaB-XoGqGNmUF_gbp1SC0UaSflZvbzSA=.e53c4264-ed83-4ba9-84c8-49c1c5beba01@github.com> Message-ID: On Wed, 1 Sep 2021 11:32:15 GMT, Coleen Phillimore wrote: >> src/hotspot/share/memory/heapInspection.cpp line 564: >> >>> 562: missed_count = ric.missed_count(); >>> 563: { >>> 564: MutexLocker x(&_mutex, Mutex::_no_safepoint_check_flag); >> >> This change seems unnecessary - this lock is only taken by GC threads, or the VMThread (?), never a JavaThread, but this change makes it look like it is taken by a JavaThread that wants to avoid safepoint checks. > > This change is necessary in that we have a check inside Mutex::lock that this flag matches how the lock was defined. It was argued that we want to have to pass this parameter to know when safepoints are not checked in the code that was taking out the lock, so the parameter is needed. I hadn't realized that we included a check for safepoint-check-never for the NJT case. I thought the safepoint-check state was completely ignored for NJTs. I don't recall if in the past I agreed with doing this, but I think it is confusing and misleading to see this in the code. But so be it, as far as this PR goes at least. Thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/5323 From pchilanomate at openjdk.java.net Wed Sep 1 16:31:38 2021 From: pchilanomate at openjdk.java.net (Patricio Chilano Mateo) Date: Wed, 1 Sep 2021 16:31:38 GMT Subject: RFR: 8273217: Make ParHeapInspectTask _safepoint_check_never In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 01:40:17 GMT, Coleen Phillimore wrote: > Make lock be declared as safepoint_check_never. > Ran tier1-3 tests and test that uses this code: serviceability/dcmd/gc/ClassHistogramTest.java LGTM. Thanks, Patricio ------------- Marked as reviewed by pchilanomate (Committer). PR: https://git.openjdk.java.net/jdk/pull/5323 From iklam at openjdk.java.net Wed Sep 1 16:42:32 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 1 Sep 2021 16:42:32 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 07:50:18 GMT, Xiaowei Lu wrote: > > I find it very unfortunate that it states that `-verbose:gc` will be overridden by `-Xloggc:` and `-Xlog` as that makes the logic for dealing with this GC case very convoluted. It would make much more sense that `-verbose:x` simply be treated as its corresponding `-Xlog` variant. Then we would need no special logic at all. > > Things are quite easy if `-verbose:x` is treated as `-Xlog`. Multiple -Xlog arguments for the same output override each other in their given order, according to https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html. > > > I'm unclear how the non-GC versions of `-verbose:x` are treated with respect to explicit `-Xlog:x` commands? > > I have looked up some documents but unfortunately haven't found relevant statements. History: See https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html Before UL was implemented, we had this: " -Xloggc:filename -- Sets the file to which verbose GC events information should be redirected for logging. The information written to this file is similar to the output of -verbose:gc with the time elapsed since the first GC event preceding each logged event. The -Xloggc option overrides -verbose:gc if both are given with the same java command." ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -verbose:gc -cp ~/tmp HelloGC [GC (System.gc()) 391K->536K(1029632K), 0.0243973 secs] [Full GC (System.gc()) 536K->259K(1029632K), 0.0079780 secs] ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -Xloggc:foo -verbose:gc -cp ~/tmp HelloGC ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -verbose:gc -Xloggc:foo -cp ~/tmp HelloGC ~/jdk/official/jdk8_b132/linux_amd64$ After UL was implemented, we changed the man page to say this, but unfortunately the "overrides" part is no longer working: "Sets the file to which verbose GC events information should be redirected for logging. The -Xloggc option overrides -verbose:gc if both are given with the same java command. -Xloggc:filename is replaced by -Xlog:gc:filename. See Enable Logging with the JVM Unified Logging Framework." **************************** UL doesn't support the notion of "overriding" as required by the java8 man page. If -Xlog:gc is specified for both a file and stdout, both will be written: $ rm foo $ tbjava -Xlog:gc:file=foo -Xlog:gc:stdout -version [0.003s][info][gc] Using G1 java version "18-internal" 2022-03-15 Java(TM) SE Runtime Environment (build 18-internal+0-adhoc.iklam.open) Java HotSpot(TM) 64-Bit Server VM (build 18-internal+0-adhoc.iklam.open, mixed mode, sharing) $ cat foo [0.003s][info][gc] Using G1 $ rm foo $ tbjava -Xlog:gc:stdout -Xlog:gc:file=foo -version [0.003s][info][gc] Using G1 java version "18-internal" 2022-03-15 Java(TM) SE Runtime Environment (build 18-internal+0-adhoc.iklam.open) Java HotSpot(TM) 64-Bit Server VM (build 18-internal+0-adhoc.iklam.open, mixed mode, sharing) $ cat foo [0.003s][info][gc] Using G1 $ I think the ability to "override" -verbose:gc with -Xloggc:filename is rather useless. We should just change the man page to match the current behavior (i.e., -verbose:gc is an alias to -Xlog:gc:stdout) and remove the mention of overriding. If someone really wants the old behavior, they should remove -verbose:gc from their command-line. ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From coleenp at openjdk.java.net Wed Sep 1 16:53:47 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Wed, 1 Sep 2021 16:53:47 GMT Subject: Integrated: 8273217: Make ParHeapInspectTask _safepoint_check_never In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 01:40:17 GMT, Coleen Phillimore wrote: > Make lock be declared as safepoint_check_never. > Ran tier1-3 tests and test that uses this code: serviceability/dcmd/gc/ClassHistogramTest.java This pull request has now been integrated. Changeset: dacd1978 Author: Coleen Phillimore URL: https://git.openjdk.java.net/jdk/commit/dacd1978972b46510049086c8431bb12e5f3722f Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod 8273217: Make ParHeapInspectTask _safepoint_check_never Reviewed-by: dholmes, pchilanomate ------------- PR: https://git.openjdk.java.net/jdk/pull/5323 From coleenp at openjdk.java.net Wed Sep 1 16:53:43 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Wed, 1 Sep 2021 16:53:43 GMT Subject: RFR: 8273217: Make ParHeapInspectTask _safepoint_check_never In-Reply-To: References: Message-ID: <26YeWITCjMku2htnJLmg4nhTJCbcX_m_lWxWI9SFxMI=.c2096393-9546-4686-97d4-3156b57964e4@github.com> On Wed, 1 Sep 2021 01:40:17 GMT, Coleen Phillimore wrote: > Make lock be declared as safepoint_check_never. > Ran tier1-3 tests and test that uses this code: serviceability/dcmd/gc/ClassHistogramTest.java Thanks David and Patricio! ------------- PR: https://git.openjdk.java.net/jdk/pull/5323 From naoto at openjdk.java.net Wed Sep 1 17:42:29 2021 From: naoto at openjdk.java.net (Naoto Sato) Date: Wed, 1 Sep 2021 17:42:29 GMT Subject: RFR: 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs In-Reply-To: <8yAn_t7lLh2Gj_GEB7rsCHIji0tbZbIV-SPRJR67HXE=.5a12bad5-c883-4982-bbcd-77fb90e5a5e9@github.com> References: <8yAn_t7lLh2Gj_GEB7rsCHIji0tbZbIV-SPRJR67HXE=.5a12bad5-c883-4982-bbcd-77fb90e5a5e9@github.com> Message-ID: On Wed, 1 Sep 2021 17:33:13 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs. Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5337 From dcubed at openjdk.java.net Wed Sep 1 17:42:28 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 1 Sep 2021 17:42:28 GMT Subject: RFR: 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs Message-ID: <8yAn_t7lLh2Gj_GEB7rsCHIji0tbZbIV-SPRJR67HXE=.5a12bad5-c883-4982-bbcd-77fb90e5a5e9@github.com> A trivial fix to ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs. ------------- Commit messages: - 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs Changes: https://git.openjdk.java.net/jdk/pull/5337/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5337&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273248 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5337.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5337/head:pull/5337 PR: https://git.openjdk.java.net/jdk/pull/5337 From dcubed at openjdk.java.net Wed Sep 1 17:48:33 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 1 Sep 2021 17:48:33 GMT Subject: Integrated: 8273197: ProblemList 2 jtools tests due to JDK-8273187 In-Reply-To: References: Message-ID: On Tue, 31 Aug 2021 20:02:37 GMT, Naoto Sato wrote: >> Trivial fixes to reduce the noise in the JDK18 CI: >> JDK-8273197 ProblemList 2 jtools tests due to JDK-8273187 >> JDK-8273198 ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh due to JDK-8273188 >> >> These failures happen in Tier5 so I'm ProblemListing them now to give @naotoj time to >> work on the issues introduced by JDK-8260265 UTF-8 by Default. > > Marked as reviewed by naoto (Reviewer). @naotoj - Thanks for the review! (I forgot to post yesterday) ------------- PR: https://git.openjdk.java.net/jdk/pull/5321 From dcubed at openjdk.java.net Wed Sep 1 17:49:34 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 1 Sep 2021 17:49:34 GMT Subject: Integrated: 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs In-Reply-To: <8yAn_t7lLh2Gj_GEB7rsCHIji0tbZbIV-SPRJR67HXE=.5a12bad5-c883-4982-bbcd-77fb90e5a5e9@github.com> References: <8yAn_t7lLh2Gj_GEB7rsCHIji0tbZbIV-SPRJR67HXE=.5a12bad5-c883-4982-bbcd-77fb90e5a5e9@github.com> Message-ID: <70I-zujvEsVJGyVtWwjn5PnAFeflQvGoI50doKfVPq8=.190805d3-c45a-4fca-ab25-e1e04a8ce43b@github.com> On Wed, 1 Sep 2021 17:33:13 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs. This pull request has now been integrated. Changeset: 4ee0dace Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk/commit/4ee0dacecd5afc5876ea839ffbb5df962ff6cd08 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs Reviewed-by: naoto ------------- PR: https://git.openjdk.java.net/jdk/pull/5337 From dcubed at openjdk.java.net Wed Sep 1 17:49:33 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 1 Sep 2021 17:49:33 GMT Subject: RFR: 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs In-Reply-To: References: <8yAn_t7lLh2Gj_GEB7rsCHIji0tbZbIV-SPRJR67HXE=.5a12bad5-c883-4982-bbcd-77fb90e5a5e9@github.com> Message-ID: <3WYXAfBSiqZ7xd-6idwuc6Vn_3AD9GdclWawnV6n41g=.81682de0-90f0-4378-aa6a-25c924e782cd@github.com> On Wed, 1 Sep 2021 17:35:12 GMT, Naoto Sato wrote: >> A trivial fix to ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs. > > Marked as reviewed by naoto (Reviewer). @naotoj - Thanks for the review! ------------- PR: https://git.openjdk.java.net/jdk/pull/5337 From pchilanomate at openjdk.java.net Wed Sep 1 21:38:42 2021 From: pchilanomate at openjdk.java.net (Patricio Chilano Mateo) Date: Wed, 1 Sep 2021 21:38:42 GMT Subject: RFR: 8273251: Call check_possible_safepoint() from SafepointMechanism::process_if_requested() Message-ID: Hi, Please review this small fix to call check_possible_safepoint() from SafepointMechanism::process_if_requested() and remove the same call from transition_and_process(). See the bug description for more detail. Since there were only two lines left of common code from transition_from_native() and transition_from_vm() I just removed transition_and_process() altogether. This also saves an unneeded extra transition to _thread_in_vm when transitioning from vm to Java. Testing tiers 1-6. Thanks, Patricio ------------- Commit messages: - v1 Changes: https://git.openjdk.java.net/jdk/pull/5342/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5342&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273251 Stats: 34 lines in 3 files changed: 13 ins; 17 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/5342.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5342/head:pull/5342 PR: https://git.openjdk.java.net/jdk/pull/5342 From coleenp at openjdk.java.net Wed Sep 1 21:59:33 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Wed, 1 Sep 2021 21:59:33 GMT Subject: RFR: 8273251: Call check_possible_safepoint() from SafepointMechanism::process_if_requested() In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 20:53:46 GMT, Patricio Chilano Mateo wrote: > Hi, > > Please review this small fix to call check_possible_safepoint() from SafepointMechanism::process_if_requested() and remove the same call from transition_and_process(). See the bug description for more detail. > Since there were only two lines left of common code from transition_from_native() and transition_from_vm() I just removed transition_and_process() altogether. This also saves an unneeded extra transition to _thread_in_vm when transitioning from vm to Java. > > Testing tiers 1-6. > > Thanks, > Patricio Looks good to me! src/hotspot/share/runtime/interfaceSupport.inline.hpp line 81: > 79: > 80: private: > 81: static inline void transition_and_process(JavaThread *thread, JavaThreadState to, bool check_asyncs) { ?? src/hotspot/share/runtime/thread.cpp line 959: > 957: assert_wx_state(WXWrite); > 958: } > 959: #endif I was wondering why you moved this, but it's assert code so it makes sense to me to be with the other assert code. Maybe check_possible_safepoint could have a better name to encompass all these checking and assertions actions but I don't know what better name to give it. With this code moved here, all the other callers where there's a possible safepoint but one not taken will also check this. Did you test on macosx aarch64 too? ------------- Marked as reviewed by coleenp (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5342 From minqi at openjdk.java.net Wed Sep 1 22:19:48 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Wed, 1 Sep 2021 22:19:48 GMT Subject: RFR: 8273240: Dynamic test ArchiveConsistency.java should use CDSArchiveUtils Message-ID: Please review the simple fix to simplify the test case appcds/dynamicArchive/ArchiveConsistency.java to use CDSArchiveUtils, which was added in JDK-8271419. Tests: mach5 tier1,tier4 Thanks Yumin ------------- Commit messages: - 8273240: Dynamic test ArchiveConsistency.java should use CDSArchiveUtils Changes: https://git.openjdk.java.net/jdk/pull/5344/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5344&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273240 Stats: 110 lines in 2 files changed: 25 ins; 80 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/5344.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5344/head:pull/5344 PR: https://git.openjdk.java.net/jdk/pull/5344 From pchilanomate at openjdk.java.net Wed Sep 1 23:09:32 2021 From: pchilanomate at openjdk.java.net (Patricio Chilano Mateo) Date: Wed, 1 Sep 2021 23:09:32 GMT Subject: RFR: 8273251: Call check_possible_safepoint() from SafepointMechanism::process_if_requested() In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 21:56:30 GMT, Coleen Phillimore wrote: > Looks good to me! > Thanks for the review Coleen! Patricio > src/hotspot/share/runtime/thread.cpp line 959: > >> 957: assert_wx_state(WXWrite); >> 958: } >> 959: #endif > > I was wondering why you moved this, but it's assert code so it makes sense to me to be with the other assert code. Maybe check_possible_safepoint could have a better name to encompass all these checking and assertions actions but I don't know what better name to give it. > With this code moved here, all the other callers where there's a possible safepoint but one not taken will also check this. Did you test on macosx aarch64 too? I already run tiers 1-3 and I'm currently running tiers 4-6. Since we already include macosx-aarch64 tasks in those tiers I didn't run any additional tests. I will run an additional test cycle macosx-aarch64 specific. I'm not expecting any failures in that area though since those other places are methods with conditional statements where in one branch we might directly call process_if_requested() already due to some _safepoint_check_always lock. Caller method check_for_valid_safepoint_state() should also be safe since it asserts we are in _thread_in_vm implying WXWrite(in any case the callers of that method could also directly call process_if_requested()). We should probably merge this two methods after I fix callers of process_if_requested() to be in _thread_in_vm. ------------- PR: https://git.openjdk.java.net/jdk/pull/5342 From jiefu at openjdk.java.net Wed Sep 1 23:47:45 2021 From: jiefu at openjdk.java.net (Jie Fu) Date: Wed, 1 Sep 2021 23:47:45 GMT Subject: RFR: 8273256: runtime/cds/appcds/TestEpsilonGCWithCDS.java fails due to Unrecognized VM option 'ObjectAlignmentInBytes=64' on x86_32 Message-ID: <_xKHNYcCLl6ylPFKBmZRS1vp6dbHSq8flgaScRf3qeY=.4d15a248-97b0-4ff4-9314-26f133e4cf88@github.com> Hi all, It fails on x86_32 since `ObjectAlignmentInBytes` is not a VM option. Let's fix it. Thanks. Best regards, Jie ------------- Commit messages: - 8273256: runtime/cds/appcds/TestEpsilonGCWithCDS.java fails due to Unrecognized VM option 'ObjectAlignmentInBytes=64' on x86_32 Changes: https://git.openjdk.java.net/jdk/pull/5345/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5345&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273256 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5345.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5345/head:pull/5345 PR: https://git.openjdk.java.net/jdk/pull/5345 From dholmes at openjdk.java.net Thu Sep 2 02:52:29 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 2 Sep 2021 02:52:29 GMT Subject: RFR: 8273256: runtime/cds/appcds/TestEpsilonGCWithCDS.java fails due to Unrecognized VM option 'ObjectAlignmentInBytes=64' on x86_32 In-Reply-To: <_xKHNYcCLl6ylPFKBmZRS1vp6dbHSq8flgaScRf3qeY=.4d15a248-97b0-4ff4-9314-26f133e4cf88@github.com> References: <_xKHNYcCLl6ylPFKBmZRS1vp6dbHSq8flgaScRf3qeY=.4d15a248-97b0-4ff4-9314-26f133e4cf88@github.com> Message-ID: On Wed, 1 Sep 2021 23:39:17 GMT, Jie Fu wrote: > Hi all, > > It fails on x86_32 since `ObjectAlignmentInBytes` is not a VM option. > Let's fix it. > > Thanks. > Best regards, > Jie Seems a reasonable way to fix this. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5345 From github.com+39413832+weixlu at openjdk.java.net Thu Sep 2 03:01:31 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Thu, 2 Sep 2021 03:01:31 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 16:39:23 GMT, Ioi Lam wrote: >>> I find it very unfortunate that it states that `-verbose:gc` will be overridden by `-Xloggc:` and `-Xlog` as that makes the logic for dealing with this GC case very convoluted. It would make much more sense that `-verbose:x` simply be treated as its corresponding `-Xlog` variant. Then we would need no special logic at all. >> >> Things are quite easy if `-verbose:x` is treated as `-Xlog`. Multiple -Xlog arguments for the same output override each other in their given order, according to https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html. >> >>> I'm unclear how the non-GC versions of `-verbose:x` are treated with respect to explicit `-Xlog:x` commands? >> >> I have looked up some documents but unfortunately haven't found relevant statements. > >> > I find it very unfortunate that it states that `-verbose:gc` will be overridden by `-Xloggc:` and `-Xlog` as that makes the logic for dealing with this GC case very convoluted. It would make much more sense that `-verbose:x` simply be treated as its corresponding `-Xlog` variant. Then we would need no special logic at all. >> >> Things are quite easy if `-verbose:x` is treated as `-Xlog`. Multiple -Xlog arguments for the same output override each other in their given order, according to https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html. >> >> > I'm unclear how the non-GC versions of `-verbose:x` are treated with respect to explicit `-Xlog:x` commands? >> >> I have looked up some documents but unfortunately haven't found relevant statements. > > History: > > See https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html > > Before UL was implemented, we had this: > > " -Xloggc:filename -- Sets the file to which verbose GC events information should be redirected for logging. The information written to this file is similar to the output of -verbose:gc with the time elapsed since the first GC event preceding each logged event. The -Xloggc option overrides -verbose:gc if both are given with the same java command." > > > > ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -verbose:gc -cp ~/tmp HelloGC > [GC (System.gc()) 391K->536K(1029632K), 0.0243973 secs] > [Full GC (System.gc()) 536K->259K(1029632K), 0.0079780 secs] > ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -Xloggc:foo -verbose:gc -cp ~/tmp HelloGC > ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -verbose:gc -Xloggc:foo -cp ~/tmp HelloGC > ~/jdk/official/jdk8_b132/linux_amd64$ > > > After UL was implemented, we changed the man page to say this, but unfortunately the "overrides" part is no longer working: > > "Sets the file to which verbose GC events information should be redirected for logging. The -Xloggc option overrides -verbose:gc if both are given with the same java command. -Xloggc:filename is replaced by -Xlog:gc:filename. See Enable Logging with the JVM Unified Logging Framework." > > **************************** > UL doesn't support the notion of "overriding" as required by the java8 man page. If -Xlog:gc is specified for both a file and stdout, both will be written: > > > $ rm foo > $ tbjava -Xlog:gc:file=foo -Xlog:gc:stdout -version > [0.003s][info][gc] Using G1 > java version "18-internal" 2022-03-15 > Java(TM) SE Runtime Environment (build 18-internal+0-adhoc.iklam.open) > Java HotSpot(TM) 64-Bit Server VM (build 18-internal+0-adhoc.iklam.open, mixed mode, sharing) > $ cat foo > [0.003s][info][gc] Using G1 > $ rm foo > $ tbjava -Xlog:gc:stdout -Xlog:gc:file=foo -version > [0.003s][info][gc] Using G1 > java version "18-internal" 2022-03-15 > Java(TM) SE Runtime Environment (build 18-internal+0-adhoc.iklam.open) > Java HotSpot(TM) 64-Bit Server VM (build 18-internal+0-adhoc.iklam.open, mixed mode, sharing) > $ cat foo > [0.003s][info][gc] Using G1 > $ > > > I think the ability to "override" -verbose:gc with -Xloggc:filename is rather useless. We should just change the man page to match the current behavior (i.e., -verbose:gc is an alias to -Xlog:gc:stdout) and remove the mention of overriding. If someone really wants the old behavior, they should remove -verbose:gc from their command-line. @iklam Yes, the introduction of UL has reconstructed many codes about logging. But a lot of Java users, as far as we know, are quite confused about the not working of such overrides for many days. These users have just upgraded to new java versions from java8 under our persuasion and they are more familiar with the behavior in java8. So I guess the ability to override may be useful for them. ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From github.com+39413832+weixlu at openjdk.java.net Thu Sep 2 03:13:26 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Thu, 2 Sep 2021 03:13:26 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 09:44:31 GMT, David Holmes wrote: >> According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. >> >> $java -Xloggc:gc.log -verbose:gc -version >> [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. >> [0.003s][info ][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. >> >> $java -Xlog:gc:gc.log -verbose:gc -version >> [0.003s][info][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. > > I also can't see how to implement the "overrides" semantics without scanning the entire command-line to collate the different forms of the flag and then collapse them into a single appropriate `-Xlog` definition. And that would be a startup hit. @dholmes-ora In my commit, the behavior of override is much like "ignore" as you say. We put off the process of `-verbose:gc` until the entire command-line has been parsed. Then we decide whether to ignore `-verbose:gc` or not. As far as I'm concerned, we have to scan the entire command-line firstly. ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From iklam at openjdk.java.net Thu Sep 2 03:56:32 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 2 Sep 2021 03:56:32 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 16:39:23 GMT, Ioi Lam wrote: >>> I find it very unfortunate that it states that `-verbose:gc` will be overridden by `-Xloggc:` and `-Xlog` as that makes the logic for dealing with this GC case very convoluted. It would make much more sense that `-verbose:x` simply be treated as its corresponding `-Xlog` variant. Then we would need no special logic at all. >> >> Things are quite easy if `-verbose:x` is treated as `-Xlog`. Multiple -Xlog arguments for the same output override each other in their given order, according to https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html. >> >>> I'm unclear how the non-GC versions of `-verbose:x` are treated with respect to explicit `-Xlog:x` commands? >> >> I have looked up some documents but unfortunately haven't found relevant statements. > >> > I find it very unfortunate that it states that `-verbose:gc` will be overridden by `-Xloggc:` and `-Xlog` as that makes the logic for dealing with this GC case very convoluted. It would make much more sense that `-verbose:x` simply be treated as its corresponding `-Xlog` variant. Then we would need no special logic at all. >> >> Things are quite easy if `-verbose:x` is treated as `-Xlog`. Multiple -Xlog arguments for the same output override each other in their given order, according to https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html. >> >> > I'm unclear how the non-GC versions of `-verbose:x` are treated with respect to explicit `-Xlog:x` commands? >> >> I have looked up some documents but unfortunately haven't found relevant statements. > > History: > > See https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html > > Before UL was implemented, we had this: > > " -Xloggc:filename -- Sets the file to which verbose GC events information should be redirected for logging. The information written to this file is similar to the output of -verbose:gc with the time elapsed since the first GC event preceding each logged event. The -Xloggc option overrides -verbose:gc if both are given with the same java command." > > > > ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -verbose:gc -cp ~/tmp HelloGC > [GC (System.gc()) 391K->536K(1029632K), 0.0243973 secs] > [Full GC (System.gc()) 536K->259K(1029632K), 0.0079780 secs] > ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -Xloggc:foo -verbose:gc -cp ~/tmp HelloGC > ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -verbose:gc -Xloggc:foo -cp ~/tmp HelloGC > ~/jdk/official/jdk8_b132/linux_amd64$ > > > After UL was implemented, we changed the man page to say this, but unfortunately the "overrides" part is no longer working: > > "Sets the file to which verbose GC events information should be redirected for logging. The -Xloggc option overrides -verbose:gc if both are given with the same java command. -Xloggc:filename is replaced by -Xlog:gc:filename. See Enable Logging with the JVM Unified Logging Framework." > > **************************** > UL doesn't support the notion of "overriding" as required by the java8 man page. If -Xlog:gc is specified for both a file and stdout, both will be written: > > > $ rm foo > $ tbjava -Xlog:gc:file=foo -Xlog:gc:stdout -version > [0.003s][info][gc] Using G1 > java version "18-internal" 2022-03-15 > Java(TM) SE Runtime Environment (build 18-internal+0-adhoc.iklam.open) > Java HotSpot(TM) 64-Bit Server VM (build 18-internal+0-adhoc.iklam.open, mixed mode, sharing) > $ cat foo > [0.003s][info][gc] Using G1 > $ rm foo > $ tbjava -Xlog:gc:stdout -Xlog:gc:file=foo -version > [0.003s][info][gc] Using G1 > java version "18-internal" 2022-03-15 > Java(TM) SE Runtime Environment (build 18-internal+0-adhoc.iklam.open) > Java HotSpot(TM) 64-Bit Server VM (build 18-internal+0-adhoc.iklam.open, mixed mode, sharing) > $ cat foo > [0.003s][info][gc] Using G1 > $ > > > I think the ability to "override" -verbose:gc with -Xloggc:filename is rather useless. We should just change the man page to match the current behavior (i.e., -verbose:gc is an alias to -Xlog:gc:stdout) and remove the mention of overriding. If someone really wants the old behavior, they should remove -verbose:gc from their command-line. > @iklam Yes, the introduction of UL has reconstructed many codes about logging. But a lot of Java users, as far as we know, are quite confused about the not working of such overrides for many days. These users have just upgraded to new java versions from java8 under our persuasion and they are more familiar with the behavior in java8. So I guess the ability to override may be useful for them. If that's the case, those users aren't using -Xlog:gc yet. Maybe we should implement strictly what the man page says: if `-Xloggc:` is used, then `-verbose` (or `-verbose:gc`) will not cause gc logs to be printed to the stdout. We shouldn't do anything to the other components of `-verbose`, and we shouldn't consider the interaction between `-Xlog` and `-verbose`. ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From iklam at openjdk.java.net Thu Sep 2 04:14:37 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 2 Sep 2021 04:14:37 GMT Subject: RFR: 8273240: Dynamic test ArchiveConsistency.java should use CDSArchiveUtils In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 22:11:58 GMT, Yumin Qi wrote: > Please review the simple fix to simplify the test case appcds/dynamicArchive/ArchiveConsistency.java to use CDSArchiveUtils, which was added in JDK-8271419. > > Tests: mach5 tier1,tier4 > > Thanks > Yumin LGTM. ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5344 From iklam at openjdk.java.net Thu Sep 2 04:14:38 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 2 Sep 2021 04:14:38 GMT Subject: RFR: 8273256: runtime/cds/appcds/TestEpsilonGCWithCDS.java fails due to Unrecognized VM option 'ObjectAlignmentInBytes=64' on x86_32 In-Reply-To: <_xKHNYcCLl6ylPFKBmZRS1vp6dbHSq8flgaScRf3qeY=.4d15a248-97b0-4ff4-9314-26f133e4cf88@github.com> References: <_xKHNYcCLl6ylPFKBmZRS1vp6dbHSq8flgaScRf3qeY=.4d15a248-97b0-4ff4-9314-26f133e4cf88@github.com> Message-ID: On Wed, 1 Sep 2021 23:39:17 GMT, Jie Fu wrote: > Hi all, > > It fails on x86_32 since `ObjectAlignmentInBytes` is not a VM option. > Let's fix it. > > Thanks. > Best regards, > Jie LGTM. Thanks for fixing this. ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5345 From jiefu at openjdk.java.net Thu Sep 2 04:14:38 2021 From: jiefu at openjdk.java.net (Jie Fu) Date: Thu, 2 Sep 2021 04:14:38 GMT Subject: RFR: 8273256: runtime/cds/appcds/TestEpsilonGCWithCDS.java fails due to Unrecognized VM option 'ObjectAlignmentInBytes=64' on x86_32 In-Reply-To: References: <_xKHNYcCLl6ylPFKBmZRS1vp6dbHSq8flgaScRf3qeY=.4d15a248-97b0-4ff4-9314-26f133e4cf88@github.com> Message-ID: On Thu, 2 Sep 2021 02:49:51 GMT, David Holmes wrote: >> Hi all, >> >> It fails on x86_32 since `ObjectAlignmentInBytes` is not a VM option. >> Let's fix it. >> >> Thanks. >> Best regards, >> Jie > > Seems a reasonable way to fix this. > > Thanks, > David Thanks @dholmes-ora and @iklam . ------------- PR: https://git.openjdk.java.net/jdk/pull/5345 From jiefu at openjdk.java.net Thu Sep 2 04:14:38 2021 From: jiefu at openjdk.java.net (Jie Fu) Date: Thu, 2 Sep 2021 04:14:38 GMT Subject: Integrated: 8273256: runtime/cds/appcds/TestEpsilonGCWithCDS.java fails due to Unrecognized VM option 'ObjectAlignmentInBytes=64' on x86_32 In-Reply-To: <_xKHNYcCLl6ylPFKBmZRS1vp6dbHSq8flgaScRf3qeY=.4d15a248-97b0-4ff4-9314-26f133e4cf88@github.com> References: <_xKHNYcCLl6ylPFKBmZRS1vp6dbHSq8flgaScRf3qeY=.4d15a248-97b0-4ff4-9314-26f133e4cf88@github.com> Message-ID: On Wed, 1 Sep 2021 23:39:17 GMT, Jie Fu wrote: > Hi all, > > It fails on x86_32 since `ObjectAlignmentInBytes` is not a VM option. > Let's fix it. > > Thanks. > Best regards, > Jie This pull request has now been integrated. Changeset: a9a83b24 Author: Jie Fu URL: https://git.openjdk.java.net/jdk/commit/a9a83b248e4a575e3d22541c122b27246a52dc7b Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8273256: runtime/cds/appcds/TestEpsilonGCWithCDS.java fails due to Unrecognized VM option 'ObjectAlignmentInBytes=64' on x86_32 Reviewed-by: dholmes, iklam ------------- PR: https://git.openjdk.java.net/jdk/pull/5345 From dholmes at openjdk.java.net Thu Sep 2 05:57:28 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 2 Sep 2021 05:57:28 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose In-Reply-To: References: Message-ID: On Mon, 30 Aug 2021 07:09:54 GMT, Xiaowei Lu wrote: > According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. > > $java -Xloggc:gc.log -verbose:gc -version > [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. > [0.003s][info ][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. > > $java -Xlog:gc:gc.log -verbose:gc -version > [0.003s][info][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. Before UL `-verbose:gc` simply set `PrintGC=true`. If you specified `-Xloggc:` then it also set `PrintGC=true` and `PrintGCTimestamps=true`. So to describe this as "overriding" is misleading in the extreme - it simply changed the output destination and added a timestamp. It also made no difference what order the flags were specified in, or even if they were passed mutiple times. With UL `-verbose:gc` enables logging of "gc" at "Info" level to stdout. However `-Xloggc:` sets `_gc_log_filename` which in turns causes logging at either the "gc" or "gc*" levels depending on `PrintGCDetails`. That logging is at the default level - which is Info. So as far as I can see, we are doing the right thing in terms of preserving the pre-UL relationship between `-verbose:gc` and `-Xloggc:` - except that with UL ordering does matter and that is where we have lost the "override" so to speak. So as far as I can see the only thing we need to fix here is to track the use of both legacy flags, and to hold back on the actual UL configuration until processing of the command-line is complete. That also avoids the need of scanning the entire command-line. This isn't completely trivial to track but I'd be using a simple struct/class as follows: struct LegacyGCLogging { char* tags; // "gc" or "gc*" char* file; // NULL ->stdout int lastFlag; // -1 not set; 0 -> -verbose:gc; 1 -> -Xloggc } If lastFlag was 1 and we encounter -verbose:gc then we do nothing - ensuring the override. Then at the end of argument processing we see what has been set and use that to configure GC logging. This has the side-effect of ignoring some explicit `-Xlog:gc` arguments, but that is okay in my view because we are simply treating the legacy flags as-if they appeared last on the command-line and where converted to -Xlog in place. Cheers, David ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From mbaesken at openjdk.java.net Thu Sep 2 06:50:40 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 2 Sep 2021 06:50:40 GMT Subject: RFR: JDK-8273229: Update OS detection code to recognize Windows Server 2022 Message-ID: Hello, please review this small change. The OS detection code of the JDK/JVM should recognize the new Windows server 2022 : https://docs.microsoft.com/en-us/lifecycle/products/windows-server-2022 https://docs.microsoft.com/en-us/windows-server/get-started/windows-server-release-info The build number of Windows server 2022 according to the documentation in the second link is 20348 . Thanks, Matthias ------------- Commit messages: - JDK-8273229 Changes: https://git.openjdk.java.net/jdk/pull/5347/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5347&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273229 Stats: 11 lines in 2 files changed: 8 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/5347.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5347/head:pull/5347 PR: https://git.openjdk.java.net/jdk/pull/5347 From alanb at openjdk.java.net Thu Sep 2 07:49:27 2021 From: alanb at openjdk.java.net (Alan Bateman) Date: Thu, 2 Sep 2021 07:49:27 GMT Subject: RFR: JDK-8273229: Update OS detection code to recognize Windows Server 2022 In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 06:43:16 GMT, Matthias Baesken wrote: > Hello, please review this small change. > The OS detection code of the JDK/JVM should recognize the new Windows server 2022 : > > https://docs.microsoft.com/en-us/lifecycle/products/windows-server-2022 > https://docs.microsoft.com/en-us/windows-server/get-started/windows-server-release-info > > The build number of Windows server 2022 according to the documentation in the second link is 20348 . > Thanks, Matthias The link to the "Windows Server release information" page is useful to check the build number - thanks! ------------- Marked as reviewed by alanb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5347 From dholmes at openjdk.java.net Thu Sep 2 07:53:29 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 2 Sep 2021 07:53:29 GMT Subject: RFR: JDK-8273229: Update OS detection code to recognize Windows Server 2022 In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 06:43:16 GMT, Matthias Baesken wrote: > Hello, please review this small change. > The OS detection code of the JDK/JVM should recognize the new Windows server 2022 : > > https://docs.microsoft.com/en-us/lifecycle/products/windows-server-2022 > https://docs.microsoft.com/en-us/windows-server/get-started/windows-server-release-info > > The build number of Windows server 2022 according to the documentation in the second link is 20348 . > Thanks, Matthias Hi Matthias, Some minor suggestions but okay as-is. Thanks, David src/hotspot/os/windows/os_windows.cpp line 1871: > 1869: // distinguish Windows Server 2016, 2019 and 2022 by build number > 1870: // Windows server 2019 GA 10/2018 build number is 17763 > 1871: // Windows server 2022 build number is 20348 Perhaps to avoid too much future editing: // Distinguish Windows Server by build number: // - 2016 GA 10/2016 build: 14393 // - 2019 GA 11/2018 build: 17763 // - 2022 GA 08/2021 build: 20348 src/java.base/windows/native/libjava/java_props_md.c line 478: > 476: * where (buildNumber > 17762) > 477: * Windows Server 2022 10 0 (!VER_NT_WORKSTATION) > 478: * where (buildNumber > 20347) There is a comment at line 392 that you may want to adjust too - perhaps just say "Windows Server 2016+" to avoid the need to keep updating it. ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5347 From shade at openjdk.java.net Thu Sep 2 07:59:36 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 2 Sep 2021 07:59:36 GMT Subject: RFR: 8272970: Parallelize runtime/InvocationTests/ [v2] In-Reply-To: <_3hdfNIcBw_oQNsiCpOTt0CBkzYMO6OrP5XHtCSVHp0=.509392f8-66cc-44f7-9a2e-e324fb527620@github.com> References: <_3hdfNIcBw_oQNsiCpOTt0CBkzYMO6OrP5XHtCSVHp0=.509392f8-66cc-44f7-9a2e-e324fb527620@github.com> Message-ID: On Wed, 1 Sep 2021 08:01:20 GMT, Aleksey Shipilev wrote: >> Current runtime/InvocationTests/ are long and serial. They take about half an hour on a modern desktop, mostly using a single CPU. They can be parallelized better, at least on sub-test level. This would be important as [JDK-8272914](https://bugs.openjdk.java.net/browse/JDK-8272914) would start to run them in tier3. >> >> Sample run times: >> >> >> $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=runtime/InvocationTests/ >> >> # Before >> real 32m2.188s >> user 59m12.818s >> sys 0m45.612s >> >> # After >> real 17m21.110s >> user 63m31.851s >> sys 0m55.391s >> >> >> I think we can technically go even deeper, for example parallelising by `packageSet` in the generators themselves, but that would be much more intrusive. I think 17 minutes is already quite good, given other tests running in prospective `hotspot:tier3`. > > Aleksey Shipilev 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 three additional commits since the last revision: > > - Merge branch 'master' into JDK-8272970-parallel-invocation-tests > - Trim down redundant compile tags > - 8272970: Parallelize runtime/InvocationTests/ Thanks, I think this is good to go in. ------------- PR: https://git.openjdk.java.net/jdk/pull/5250 From shade at openjdk.java.net Thu Sep 2 07:59:37 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 2 Sep 2021 07:59:37 GMT Subject: Integrated: 8272970: Parallelize runtime/InvocationTests/ In-Reply-To: References: Message-ID: On Wed, 25 Aug 2021 11:58:27 GMT, Aleksey Shipilev wrote: > Current runtime/InvocationTests/ are long and serial. They take about half an hour on a modern desktop, mostly using a single CPU. They can be parallelized better, at least on sub-test level. This would be important as [JDK-8272914](https://bugs.openjdk.java.net/browse/JDK-8272914) would start to run them in tier3. > > Sample run times: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=runtime/InvocationTests/ > > # Before > real 32m2.188s > user 59m12.818s > sys 0m45.612s > > # After > real 17m21.110s > user 63m31.851s > sys 0m55.391s > > > I think we can technically go even deeper, for example parallelising by `packageSet` in the generators themselves, but that would be much more intrusive. I think 17 minutes is already quite good, given other tests running in prospective `hotspot:tier3`. This pull request has now been integrated. Changeset: 6cfe3142 Author: Aleksey Shipilev URL: https://git.openjdk.java.net/jdk/commit/6cfe314262dacd6ca1a74c000d045b1cabd374db Stats: 263 lines in 6 files changed: 215 ins; 25 del; 23 mod 8272970: Parallelize runtime/InvocationTests/ Reviewed-by: dholmes, iignatyev ------------- PR: https://git.openjdk.java.net/jdk/pull/5250 From dholmes at openjdk.java.net Thu Sep 2 08:02:36 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 2 Sep 2021 08:02:36 GMT Subject: RFR: 8273251: Call check_possible_safepoint() from SafepointMechanism::process_if_requested() In-Reply-To: References: Message-ID: <-1P0pjNDg02W8ICX1LzP1CMNufiYvQMm6Dv99TEiUmk=.f93db33d-9356-4a88-9286-4543d79f5d2f@github.com> On Wed, 1 Sep 2021 20:53:46 GMT, Patricio Chilano Mateo wrote: > Hi, > > Please review this small fix to call check_possible_safepoint() from SafepointMechanism::process_if_requested() and remove the same call from transition_and_process(). See the bug description for more detail. > Since there were only two lines left of common code from transition_from_native() and transition_from_vm() I just removed transition_and_process() altogether. This also saves an unneeded extra transition to _thread_in_vm when transitioning from vm to Java. > > Testing tiers 1-6. > > Thanks, > Patricio Looks good! Thanks for the cleanup Patricio: fewer functions and no redundant state changes. Cheers, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5342 From dholmes at openjdk.java.net Thu Sep 2 08:02:37 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 2 Sep 2021 08:02:37 GMT Subject: RFR: 8273251: Call check_possible_safepoint() from SafepointMechanism::process_if_requested() In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 23:06:32 GMT, Patricio Chilano Mateo wrote: >> src/hotspot/share/runtime/thread.cpp line 959: >> >>> 957: assert_wx_state(WXWrite); >>> 958: } >>> 959: #endif >> >> I was wondering why you moved this, but it's assert code so it makes sense to me to be with the other assert code. Maybe check_possible_safepoint could have a better name to encompass all these checking and assertions actions but I don't know what better name to give it. >> With this code moved here, all the other callers where there's a possible safepoint but one not taken will also check this. Did you test on macosx aarch64 too? > > I already run tiers 1-3 and I'm currently running tiers 4-6. Since we already include macosx-aarch64 tasks in those tiers I didn't run any additional tests. I will run an additional test cycle macosx-aarch64 specific. I'm not expecting any failures in that area though since those other places are methods with conditional statements where in one branch we might directly call process_if_requested() already due to some _safepoint_check_always lock. Caller method check_for_valid_safepoint_state() should also be safe since it asserts we are in _thread_in_vm implying WXWrite(in any case the callers of that method could also directly call process_if_requested()). We should probably merge this two methods after I fix callers of process_if_requested() to be in _thread_in_vm. Maybe `check_safepoint_ready` for the new name? (Not needed for this PR though.) ------------- PR: https://git.openjdk.java.net/jdk/pull/5342 From mbaesken at openjdk.java.net Thu Sep 2 08:16:53 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 2 Sep 2021 08:16:53 GMT Subject: RFR: JDK-8273229: Update OS detection code to recognize Windows Server 2022 [v2] In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 07:49:55 GMT, David Holmes wrote: >> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: >> >> Adjust comments > > src/hotspot/os/windows/os_windows.cpp line 1871: > >> 1869: // distinguish Windows Server 2016, 2019 and 2022 by build number >> 1870: // Windows server 2019 GA 10/2018 build number is 17763 >> 1871: // Windows server 2022 build number is 20348 > > Perhaps to avoid too much future editing: > > // Distinguish Windows Server by build number: > // - 2016 GA 10/2016 build: 14393 > // - 2019 GA 11/2018 build: 17763 > // - 2022 GA 08/2021 build: 20348 Hi David , thanks for your suggestions. I adjusted the comments. Best regards, Matthias ------------- PR: https://git.openjdk.java.net/jdk/pull/5347 From mbaesken at openjdk.java.net Thu Sep 2 08:16:52 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 2 Sep 2021 08:16:52 GMT Subject: RFR: JDK-8273229: Update OS detection code to recognize Windows Server 2022 [v2] In-Reply-To: References: Message-ID: > Hello, please review this small change. > The OS detection code of the JDK/JVM should recognize the new Windows server 2022 : > > https://docs.microsoft.com/en-us/lifecycle/products/windows-server-2022 > https://docs.microsoft.com/en-us/windows-server/get-started/windows-server-release-info > > The build number of Windows server 2022 according to the documentation in the second link is 20348 . > Thanks, Matthias Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Adjust comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5347/files - new: https://git.openjdk.java.net/jdk/pull/5347/files/c7ce4abc..f8952e3e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5347&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5347&range=00-01 Stats: 5 lines in 2 files changed: 1 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/5347.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5347/head:pull/5347 PR: https://git.openjdk.java.net/jdk/pull/5347 From dholmes at openjdk.java.net Thu Sep 2 08:51:28 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 2 Sep 2021 08:51:28 GMT Subject: RFR: JDK-8273229: Update OS detection code to recognize Windows Server 2022 [v2] In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 08:16:52 GMT, Matthias Baesken wrote: >> Hello, please review this small change. >> The OS detection code of the JDK/JVM should recognize the new Windows server 2022 : >> >> https://docs.microsoft.com/en-us/lifecycle/products/windows-server-2022 >> https://docs.microsoft.com/en-us/windows-server/get-started/windows-server-release-info >> >> The build number of Windows server 2022 according to the documentation in the second link is 20348 . >> Thanks, Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust comments Thanks for the updates ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5347 From github.com+39413832+weixlu at openjdk.java.net Thu Sep 2 11:07:51 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Thu, 2 Sep 2021 11:07:51 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose [v2] In-Reply-To: References: Message-ID: <3iodGk__FeWss6QvgOa5INJHhpRk5_7wNCF2u5nL8kk=.1c3fa531-7048-4889-a7cc-181de17784b2@github.com> > According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. > > $java -Xloggc:gc.log -verbose:gc -version > [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. > [0.003s][info ][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. > > $java -Xlog:gc:gc.log -verbose:gc -version > [0.003s][info][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. Xiaowei Lu has updated the pull request incrementally with one additional commit since the last revision: 8273112: -Xloggc should override -verbose ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5295/files - new: https://git.openjdk.java.net/jdk/pull/5295/files/639eafc0..0681dae1 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5295&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5295&range=00-01 Stats: 60 lines in 2 files changed: 13 ins; 37 del; 10 mod Patch: https://git.openjdk.java.net/jdk/pull/5295.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5295/head:pull/5295 PR: https://git.openjdk.java.net/jdk/pull/5295 From github.com+39413832+weixlu at openjdk.java.net Thu Sep 2 11:13:51 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Thu, 2 Sep 2021 11:13:51 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose [v3] In-Reply-To: References: Message-ID: > According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. > > $java -Xloggc:gc.log -verbose:gc -version > [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. > [0.003s][info ][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. > > $java -Xlog:gc:gc.log -verbose:gc -version > [0.003s][info][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. Xiaowei Lu has updated the pull request incrementally with one additional commit since the last revision: remove code in previous commit ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5295/files - new: https://git.openjdk.java.net/jdk/pull/5295/files/0681dae1..f355e598 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5295&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5295&range=01-02 Stats: 10 lines in 2 files changed: 0 ins; 10 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5295.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5295/head:pull/5295 PR: https://git.openjdk.java.net/jdk/pull/5295 From github.com+39413832+weixlu at openjdk.java.net Thu Sep 2 11:16:29 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Thu, 2 Sep 2021 11:16:29 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose [v2] In-Reply-To: <3iodGk__FeWss6QvgOa5INJHhpRk5_7wNCF2u5nL8kk=.1c3fa531-7048-4889-a7cc-181de17784b2@github.com> References: <3iodGk__FeWss6QvgOa5INJHhpRk5_7wNCF2u5nL8kk=.1c3fa531-7048-4889-a7cc-181de17784b2@github.com> Message-ID: On Thu, 2 Sep 2021 11:07:51 GMT, Xiaowei Lu wrote: >> According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. >> >> $java -Xloggc:gc.log -verbose:gc -version >> [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. >> [0.003s][info ][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. >> >> $java -Xlog:gc:gc.log -verbose:gc -version >> [0.003s][info][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. > > Xiaowei Lu has updated the pull request incrementally with one additional commit since the last revision: > > 8273112: -Xloggc should override -verbose Thanks for your suggestions. Yes, I think we should merely focus on the man page and let `-Xloggc:` override `-verbose:gc`. Thus in the new commit, I put off the process of these two legacy flags (in Arguments::handle_deprecated_print_gc_flags()) until the entire command-line has been parsed. ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From mbaesken at openjdk.java.net Thu Sep 2 11:26:35 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 2 Sep 2021 11:26:35 GMT Subject: Integrated: JDK-8273229: Update OS detection code to recognize Windows Server 2022 In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 06:43:16 GMT, Matthias Baesken wrote: > Hello, please review this small change. > The OS detection code of the JDK/JVM should recognize the new Windows server 2022 : > > https://docs.microsoft.com/en-us/lifecycle/products/windows-server-2022 > https://docs.microsoft.com/en-us/windows-server/get-started/windows-server-release-info > > The build number of Windows server 2022 according to the documentation in the second link is 20348 . > Thanks, Matthias This pull request has now been integrated. Changeset: c2e015c3 Author: Matthias Baesken URL: https://git.openjdk.java.net/jdk/commit/c2e015c3c1a2274112bb8e6671a85bc7fb624fde Stats: 14 lines in 2 files changed: 9 ins; 0 del; 5 mod 8273229: Update OS detection code to recognize Windows Server 2022 Reviewed-by: alanb, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5347 From pchilanomate at openjdk.java.net Thu Sep 2 14:45:38 2021 From: pchilanomate at openjdk.java.net (Patricio Chilano Mateo) Date: Thu, 2 Sep 2021 14:45:38 GMT Subject: RFR: 8273251: Call check_possible_safepoint() from SafepointMechanism::process_if_requested() In-Reply-To: <-1P0pjNDg02W8ICX1LzP1CMNufiYvQMm6Dv99TEiUmk=.f93db33d-9356-4a88-9286-4543d79f5d2f@github.com> References: <-1P0pjNDg02W8ICX1LzP1CMNufiYvQMm6Dv99TEiUmk=.f93db33d-9356-4a88-9286-4543d79f5d2f@github.com> Message-ID: <4dnSLeL8sVfZd0eObFf9KJhmFdhxK86oFEu3hIvDZQU=.ced9888c-75cf-4f04-9e33-a2fb9a83968f@github.com> On Thu, 2 Sep 2021 07:59:30 GMT, David Holmes wrote: > Looks good! Thanks for the cleanup Patricio: fewer functions and no redundant state changes. > Thanks for the review David! Patricio ------------- PR: https://git.openjdk.java.net/jdk/pull/5342 From pchilanomate at openjdk.java.net Thu Sep 2 14:45:39 2021 From: pchilanomate at openjdk.java.net (Patricio Chilano Mateo) Date: Thu, 2 Sep 2021 14:45:39 GMT Subject: RFR: 8273251: Call check_possible_safepoint() from SafepointMechanism::process_if_requested() In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 07:58:43 GMT, David Holmes wrote: >> I already run tiers 1-3 and I'm currently running tiers 4-6. Since we already include macosx-aarch64 tasks in those tiers I didn't run any additional tests. I will run an additional test cycle macosx-aarch64 specific. I'm not expecting any failures in that area though since those other places are methods with conditional statements where in one branch we might directly call process_if_requested() already due to some _safepoint_check_always lock. Caller method check_for_valid_safepoint_state() should also be safe since it asserts we are in _thread_in_vm implying WXWrite(in any case the callers of that method could also directly call process_if_requested()). We should probably merge this two methods after I fix callers of process_if_requested() to be in _thread_in_vm. > > Maybe `check_safepoint_ready` for the new name? (Not needed for this PR though.) Sounds good, I'll address that in another RFE then. ------------- PR: https://git.openjdk.java.net/jdk/pull/5342 From pchilanomate at openjdk.java.net Thu Sep 2 21:26:33 2021 From: pchilanomate at openjdk.java.net (Patricio Chilano Mateo) Date: Thu, 2 Sep 2021 21:26:33 GMT Subject: Integrated: 8273251: Call check_possible_safepoint() from SafepointMechanism::process_if_requested() In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 20:53:46 GMT, Patricio Chilano Mateo wrote: > Hi, > > Please review this small fix to call check_possible_safepoint() from SafepointMechanism::process_if_requested() and remove the same call from transition_and_process(). See the bug description for more detail. > Since there were only two lines left of common code from transition_from_native() and transition_from_vm() I just removed transition_and_process() altogether. This also saves an unneeded extra transition to _thread_in_vm when transitioning from vm to Java. > > Testing tiers 1-6. > > Thanks, > Patricio This pull request has now been integrated. Changeset: 92b05fe0 Author: Patricio Chilano Mateo URL: https://git.openjdk.java.net/jdk/commit/92b05fe0f41b91aa88e77473725ae92ee13b052f Stats: 34 lines in 3 files changed: 13 ins; 17 del; 4 mod 8273251: Call check_possible_safepoint() from SafepointMechanism::process_if_requested() Reviewed-by: coleenp, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5342 From iklam at openjdk.java.net Fri Sep 3 02:07:29 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Fri, 3 Sep 2021 02:07:29 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose [v3] In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 11:13:51 GMT, Xiaowei Lu wrote: >> According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. >> >> $java -Xloggc:gc.log -verbose:gc -version >> [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. >> [0.003s][info ][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. >> >> $java -Xlog:gc:gc.log -verbose:gc -version >> [0.003s][info][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. > > Xiaowei Lu has updated the pull request incrementally with one additional commit since the last revision: > > remove code in previous commit LGTM ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5295 From dholmes at openjdk.java.net Fri Sep 3 02:07:29 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Fri, 3 Sep 2021 02:07:29 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose [v3] In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 11:13:51 GMT, Xiaowei Lu wrote: >> According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. >> >> $java -Xloggc:gc.log -verbose:gc -version >> [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. >> [0.003s][info ][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> In addition, since -Xloggc:filename is replaced by -Xlog:gc:filename, can we assume that -Xlog:gc:filename should override -verbose:gc as -Xloggc:filename? Currently, gclog still outputs to both stdout and file if -Xlog and -verbose are given with the same java command. >> >> $java -Xlog:gc:gc.log -verbose:gc -version >> [0.003s][info][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> As a result, we propose to put off the log configuration of -verbose option until we are confident that there isn?t -Xloggc or -Xlog options. > > Xiaowei Lu has updated the pull request incrementally with one additional commit since the last revision: > > remove code in previous commit Not surprisingly this looks good to me! :) I think this captures the desired/expected behaviour. Thanks, David src/hotspot/share/runtime/arguments.cpp line 95: > 93: char* Arguments::SharedDynamicArchivePath = NULL; > 94: > 95: LegacyGCLogging Arguments::_legacyGCLogging = { 0 }; `{ 0, 0}` ? Or is it implied the other members are zero-initialized? ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5295 From github.com+39413832+weixlu at openjdk.java.net Fri Sep 3 02:31:29 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Fri, 3 Sep 2021 02:31:29 GMT Subject: RFR: 8273112: -Xloggc and -Xlog should override -verbose [v3] In-Reply-To: References: Message-ID: On Fri, 3 Sep 2021 02:03:29 GMT, David Holmes wrote: >> Xiaowei Lu has updated the pull request incrementally with one additional commit since the last revision: >> >> remove code in previous commit > > src/hotspot/share/runtime/arguments.cpp line 95: > >> 93: char* Arguments::SharedDynamicArchivePath = NULL; >> 94: >> 95: LegacyGCLogging Arguments::_legacyGCLogging = { 0 }; > > `{ 0, 0}` ? Or is it implied the other members are zero-initialized? @dholmes-ora I think compiler will assign 0 to all members of this struct. Since you have mentioned this here, let's explicitly use { 0, 0} to avoid potential problems. ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From github.com+39413832+weixlu at openjdk.java.net Fri Sep 3 02:48:59 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Fri, 3 Sep 2021 02:48:59 GMT Subject: RFR: 8273112: -Xloggc: should override -verbose:gc [v4] In-Reply-To: References: Message-ID: > According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. > > $java -Xloggc:gc.log -verbose:gc -version > [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. > [0.003s][info ][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > As a result, we propose to put off the log configuration of -verbose:gc option until we are confident that there isn?t -Xloggc option. Xiaowei Lu has updated the pull request incrementally with one additional commit since the last revision: fix initialization of _legacyGCLogging ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5295/files - new: https://git.openjdk.java.net/jdk/pull/5295/files/f355e598..5f69d62d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5295&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5295&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5295.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5295/head:pull/5295 PR: https://git.openjdk.java.net/jdk/pull/5295 From github.com+39413832+weixlu at openjdk.java.net Fri Sep 3 02:49:00 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Fri, 3 Sep 2021 02:49:00 GMT Subject: RFR: 8273112: -Xloggc: should override -verbose:gc In-Reply-To: References: Message-ID: <62fCMHqLqTRQilnSQvWKxp3V2uKEQT0O3tPHs0coUPQ=.5e6860a9-a572-423e-8057-256cdb026608@github.com> On Thu, 2 Sep 2021 03:53:06 GMT, Ioi Lam wrote: >>> > I find it very unfortunate that it states that `-verbose:gc` will be overridden by `-Xloggc:` and `-Xlog` as that makes the logic for dealing with this GC case very convoluted. It would make much more sense that `-verbose:x` simply be treated as its corresponding `-Xlog` variant. Then we would need no special logic at all. >>> >>> Things are quite easy if `-verbose:x` is treated as `-Xlog`. Multiple -Xlog arguments for the same output override each other in their given order, according to https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html. >>> >>> > I'm unclear how the non-GC versions of `-verbose:x` are treated with respect to explicit `-Xlog:x` commands? >>> >>> I have looked up some documents but unfortunately haven't found relevant statements. >> >> History: >> >> See https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html >> >> Before UL was implemented, we had this: >> >> " -Xloggc:filename -- Sets the file to which verbose GC events information should be redirected for logging. The information written to this file is similar to the output of -verbose:gc with the time elapsed since the first GC event preceding each logged event. The -Xloggc option overrides -verbose:gc if both are given with the same java command." >> >> >> >> ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -verbose:gc -cp ~/tmp HelloGC >> [GC (System.gc()) 391K->536K(1029632K), 0.0243973 secs] >> [Full GC (System.gc()) 536K->259K(1029632K), 0.0079780 secs] >> ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -Xloggc:foo -verbose:gc -cp ~/tmp HelloGC >> ~/jdk/official/jdk8_b132/linux_amd64$ ./bin/java -verbose:gc -Xloggc:foo -cp ~/tmp HelloGC >> ~/jdk/official/jdk8_b132/linux_amd64$ >> >> >> After UL was implemented, we changed the man page to say this, but unfortunately the "overrides" part is no longer working: >> >> "Sets the file to which verbose GC events information should be redirected for logging. The -Xloggc option overrides -verbose:gc if both are given with the same java command. -Xloggc:filename is replaced by -Xlog:gc:filename. See Enable Logging with the JVM Unified Logging Framework." >> >> **************************** >> UL doesn't support the notion of "overriding" as required by the java8 man page. If -Xlog:gc is specified for both a file and stdout, both will be written: >> >> >> $ rm foo >> $ tbjava -Xlog:gc:file=foo -Xlog:gc:stdout -version >> [0.003s][info][gc] Using G1 >> java version "18-internal" 2022-03-15 >> Java(TM) SE Runtime Environment (build 18-internal+0-adhoc.iklam.open) >> Java HotSpot(TM) 64-Bit Server VM (build 18-internal+0-adhoc.iklam.open, mixed mode, sharing) >> $ cat foo >> [0.003s][info][gc] Using G1 >> $ rm foo >> $ tbjava -Xlog:gc:stdout -Xlog:gc:file=foo -version >> [0.003s][info][gc] Using G1 >> java version "18-internal" 2022-03-15 >> Java(TM) SE Runtime Environment (build 18-internal+0-adhoc.iklam.open) >> Java HotSpot(TM) 64-Bit Server VM (build 18-internal+0-adhoc.iklam.open, mixed mode, sharing) >> $ cat foo >> [0.003s][info][gc] Using G1 >> $ >> >> >> I think the ability to "override" -verbose:gc with -Xloggc:filename is rather useless. We should just change the man page to match the current behavior (i.e., -verbose:gc is an alias to -Xlog:gc:stdout) and remove the mention of overriding. If someone really wants the old behavior, they should remove -verbose:gc from their command-line. > >> @iklam Yes, the introduction of UL has reconstructed many codes about logging. But a lot of Java users, as far as we know, are quite confused about the not working of such overrides for many days. These users have just upgraded to new java versions from java8 under our persuasion and they are more familiar with the behavior in java8. So I guess the ability to override may be useful for them. > > If that's the case, those users aren't using -Xlog:gc yet. Maybe we should implement strictly what the man page says: if `-Xloggc:` is used, then `-verbose` (or `-verbose:gc`) will not cause gc logs to be printed to the stdout. > > We shouldn't do anything to the other components of `-verbose`, and we shouldn't consider the interaction between `-Xlog` and `-verbose`. @iklam @dholmes-ora Thanks for your review and helpful suggestions. Could you please sponsor this change? ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From dholmes at openjdk.java.net Fri Sep 3 05:27:30 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Fri, 3 Sep 2021 05:27:30 GMT Subject: RFR: 8273112: -Xloggc: should override -verbose:gc [v4] In-Reply-To: References: Message-ID: On Fri, 3 Sep 2021 02:48:59 GMT, Xiaowei Lu wrote: >> According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. >> >> $java -Xloggc:gc.log -verbose:gc -version >> [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. >> [0.003s][info ][gc] Using G1 >> $cat gc.log >> [0.003s][info][gc] Using G1 >> >> As a result, we propose to put off the log configuration of -verbose:gc option until we are confident that there isn?t -Xloggc option. > > Xiaowei Lu has updated the pull request incrementally with one additional commit since the last revision: > > fix initialization of _legacyGCLogging Marked as reviewed by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From github.com+39413832+weixlu at openjdk.java.net Fri Sep 3 05:32:32 2021 From: github.com+39413832+weixlu at openjdk.java.net (Xiaowei Lu) Date: Fri, 3 Sep 2021 05:32:32 GMT Subject: Integrated: 8273112: -Xloggc: should override -verbose:gc In-Reply-To: References: Message-ID: On Mon, 30 Aug 2021 07:09:54 GMT, Xiaowei Lu wrote: > According to java 16 specifications for java command (https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html), the command line option -Xloggc should override -verbose:gc if both options are given with the same java command. However, gc information still outputs to console even if gc log file is specified. > > $java -Xloggc:gc.log -verbose:gc -version > [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead. > [0.003s][info ][gc] Using G1 > $cat gc.log > [0.003s][info][gc] Using G1 > > As a result, we propose to put off the log configuration of -verbose:gc option until we are confident that there isn?t -Xloggc option. This pull request has now been integrated. Changeset: fa9c8657 Author: Xiaowei Lu Committer: David Holmes URL: https://git.openjdk.java.net/jdk/commit/fa9c8657dfaa2018f501de1a8aa62f004342c245 Stats: 19 lines in 2 files changed: 11 ins; 1 del; 7 mod 8273112: -Xloggc: should override -verbose:gc Reviewed-by: iklam, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5295 From github.com+8503711+danheidinga at openjdk.java.net Fri Sep 3 15:25:43 2021 From: github.com+8503711+danheidinga at openjdk.java.net (Dan Heidinga) Date: Fri, 3 Sep 2021 15:25:43 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj Message-ID: I picked up a simple unassigned bug to work through the contribution process. `make run-test-tier1` passes with this change. Signed-off-by: Dan Heidinga ------------- Commit messages: - 8272164: DumpAllocStats shouldn't subclass from ResourceObj Changes: https://git.openjdk.java.net/jdk/pull/5362/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5362&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8272164 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5362.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5362/head:pull/5362 PR: https://git.openjdk.java.net/jdk/pull/5362 From shade at openjdk.java.net Fri Sep 3 15:36:39 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Fri, 3 Sep 2021 15:36:39 GMT Subject: RFR: 8273333: Zero should warn about unimplemented -XX:+LogTouchedMethods Message-ID: <6cEjhB-bKG4AVrMptM2RPyRl9Ku9sZEssV_VbjWH_-k=.c61781ad-c123-449f-8904-abdb3699fd6b@github.com> Currently Zero VM does not implement -XX:+LogTouchedMethods runtime features, which makes `runtime/CommandLine/PrintTouchedMethods.java` tier1 test fail with it. Instead of implementing it (risking performance and rare bugs), Zero should just reject the option. Additional testing: - [x] Eyeballing failure message - [x] Affected test does not run with Zero anymore - [x] Affected test still runs with Server ------------- Commit messages: - Implement Changes: https://git.openjdk.java.net/jdk/pull/5363/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5363&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273333 Stats: 7 lines in 2 files changed: 6 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5363.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5363/head:pull/5363 PR: https://git.openjdk.java.net/jdk/pull/5363 From shade at openjdk.java.net Fri Sep 3 15:41:27 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Fri, 3 Sep 2021 15:41:27 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj In-Reply-To: References: Message-ID: On Fri, 3 Sep 2021 15:17:49 GMT, Dan Heidinga wrote: > I picked up a simple unassigned bug to work through the contribution process. > > `make run-test-tier1` passes with this change. > > Signed-off-by: Dan Heidinga Looks fine to me. Please configure and run GHA testing: look at "Pre-submit test status" or "Checks" tab. ------------- Marked as reviewed by shade (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5362 From minqi at openjdk.java.net Fri Sep 3 16:39:24 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Fri, 3 Sep 2021 16:39:24 GMT Subject: RFR: 8273333: Zero should warn about unimplemented -XX:+LogTouchedMethods In-Reply-To: <6cEjhB-bKG4AVrMptM2RPyRl9Ku9sZEssV_VbjWH_-k=.c61781ad-c123-449f-8904-abdb3699fd6b@github.com> References: <6cEjhB-bKG4AVrMptM2RPyRl9Ku9sZEssV_VbjWH_-k=.c61781ad-c123-449f-8904-abdb3699fd6b@github.com> Message-ID: <1liU1MFbbf5Scj-RK0h7C11P_IgoIT2FsCUY34fFkyQ=.1745b339-fe7c-4161-ba85-bbf933d5f815@github.com> On Fri, 3 Sep 2021 15:29:36 GMT, Aleksey Shipilev wrote: > Currently Zero VM does not implement -XX:+LogTouchedMethods runtime features, which makes `runtime/CommandLine/PrintTouchedMethods.java` tier1 test fail with it. > > Instead of implementing it (risking performance and rare bugs), Zero should just reject the option. > > Additional testing: > - [x] Eyeballing failure message > - [x] Affected test does not run with Zero anymore > - [x] Affected test still runs with Server LGTM. ------------- Marked as reviewed by minqi (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5363 From github.com+8503711+danheidinga at openjdk.java.net Fri Sep 3 18:37:57 2021 From: github.com+8503711+danheidinga at openjdk.java.net (Dan Heidinga) Date: Fri, 3 Sep 2021 18:37:57 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj In-Reply-To: References: Message-ID: On Fri, 3 Sep 2021 15:17:49 GMT, Dan Heidinga wrote: > I picked up a simple unassigned bug to work through the contribution process. > > `make run-test-tier1` passes with this change. > > Signed-off-by: Dan Heidinga I see the `` test failed on Linux_x64 and that there's a fix has already been merged for it: https://github.com/openjdk/jdk/commit/7212561dd1ec65d7f31792959f0eaaab6229eaf4 I'll rebase to pick up the latest to get a clean test run ------------- PR: https://git.openjdk.java.net/jdk/pull/5362 From github.com+8503711+danheidinga at openjdk.java.net Fri Sep 3 18:48:50 2021 From: github.com+8503711+danheidinga at openjdk.java.net (Dan Heidinga) Date: Fri, 3 Sep 2021 18:48:50 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj [v2] In-Reply-To: References: Message-ID: <0VqWcVfSyL2mgxG8QSPXwBrLofpCTu2MUblrz-XF36k=.8c5a71d7-42f1-46ad-973f-5fc74d124eb4@github.com> > I picked up a simple unassigned bug to work through the contribution process. > > `make run-test-tier1` passes with this change. > > Signed-off-by: Dan Heidinga Dan Heidinga has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit: 8272164: DumpAllocStats shouldn't subclass from ResourceObj Signed-off-by: Dan Heidinga ------------- Changes: https://git.openjdk.java.net/jdk/pull/5362/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5362&range=01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5362.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5362/head:pull/5362 PR: https://git.openjdk.java.net/jdk/pull/5362 From iklam at openjdk.java.net Fri Sep 3 18:48:55 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Fri, 3 Sep 2021 18:48:55 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj [v2] In-Reply-To: <0VqWcVfSyL2mgxG8QSPXwBrLofpCTu2MUblrz-XF36k=.8c5a71d7-42f1-46ad-973f-5fc74d124eb4@github.com> References: <0VqWcVfSyL2mgxG8QSPXwBrLofpCTu2MUblrz-XF36k=.8c5a71d7-42f1-46ad-973f-5fc74d124eb4@github.com> Message-ID: On Fri, 3 Sep 2021 18:44:50 GMT, Dan Heidinga wrote: >> I picked up a simple unassigned bug to work through the contribution process. >> >> `make run-test-tier1` passes with this change. >> >> Signed-off-by: Dan Heidinga > > Dan Heidinga has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit: > > 8272164: DumpAllocStats shouldn't subclass from ResourceObj > > Signed-off-by: Dan Heidinga LGTM ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5362 From shade at openjdk.java.net Fri Sep 3 18:48:57 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Fri, 3 Sep 2021 18:48:57 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj In-Reply-To: References: Message-ID: On Fri, 3 Sep 2021 18:32:59 GMT, Dan Heidinga wrote: > I'll rebase to pick up the latest to get a clean test run You can, but no need to spend CPU time on this, as long as you know the test failure was not caused by this PR. GHA results are not required to be fully green for integration. Also, do merges not rebases, if you can -- leaves the reviews/webrevs consistent, especially when comments are bound to particular code locations. ------------- PR: https://git.openjdk.java.net/jdk/pull/5362 From github.com+8503711+danheidinga at openjdk.java.net Fri Sep 3 18:49:00 2021 From: github.com+8503711+danheidinga at openjdk.java.net (Dan Heidinga) Date: Fri, 3 Sep 2021 18:49:00 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj In-Reply-To: References: Message-ID: <0A-SYOzToiEbOj5KhootDQ4P8wG-cizDgooP27axdlg=.e5d3fdbe-ec38-4b9c-b7d2-0d47a72ee08b@github.com> On Fri, 3 Sep 2021 15:17:49 GMT, Dan Heidinga wrote: > I picked up a simple unassigned bug to work through the contribution process. > > `make run-test-tier1` passes with this change. > > Signed-off-by: Dan Heidinga Apologies - I've already pushed the rebase. Will use merges in the future ------------- PR: https://git.openjdk.java.net/jdk/pull/5362 From minqi at openjdk.java.net Fri Sep 3 20:39:26 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Fri, 3 Sep 2021 20:39:26 GMT Subject: RFR: 8273240: Dynamic test ArchiveConsistency.java should use CDSArchiveUtils In-Reply-To: References: Message-ID: On Thu, 2 Sep 2021 04:11:03 GMT, Ioi Lam wrote: >> Please review the simple fix to simplify the test case appcds/dynamicArchive/ArchiveConsistency.java to use CDSArchiveUtils, which was added in JDK-8271419. >> >> Tests: mach5 tier1,tier4 >> >> Thanks >> Yumin > > LGTM. @iklam Thanks for review ------------- PR: https://git.openjdk.java.net/jdk/pull/5344 From minqi at openjdk.java.net Fri Sep 3 20:39:27 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Fri, 3 Sep 2021 20:39:27 GMT Subject: Integrated: 8273240: Dynamic test ArchiveConsistency.java should use CDSArchiveUtils In-Reply-To: References: Message-ID: On Wed, 1 Sep 2021 22:11:58 GMT, Yumin Qi wrote: > Please review the simple fix to simplify the test case appcds/dynamicArchive/ArchiveConsistency.java to use CDSArchiveUtils, which was added in JDK-8271419. > > Tests: mach5 tier1,tier4 > > Thanks > Yumin This pull request has now been integrated. Changeset: d414a88d Author: Yumin Qi URL: https://git.openjdk.java.net/jdk/commit/d414a88d88a5734d6c431e74d735a780a90d60cf Stats: 110 lines in 2 files changed: 25 ins; 80 del; 5 mod 8273240: Dynamic test ArchiveConsistency.java should use CDSArchiveUtils Reviewed-by: iklam ------------- PR: https://git.openjdk.java.net/jdk/pull/5344 From dholmes at openjdk.java.net Fri Sep 3 22:39:54 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Fri, 3 Sep 2021 22:39:54 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj [v2] In-Reply-To: <0VqWcVfSyL2mgxG8QSPXwBrLofpCTu2MUblrz-XF36k=.8c5a71d7-42f1-46ad-973f-5fc74d124eb4@github.com> References: <0VqWcVfSyL2mgxG8QSPXwBrLofpCTu2MUblrz-XF36k=.8c5a71d7-42f1-46ad-973f-5fc74d124eb4@github.com> Message-ID: On Fri, 3 Sep 2021 18:48:50 GMT, Dan Heidinga wrote: >> I picked up a simple unassigned bug to work through the contribution process. >> >> `make run-test-tier1` passes with this change. >> >> Signed-off-by: Dan Heidinga > > Dan Heidinga has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit: > > 8272164: DumpAllocStats shouldn't subclass from ResourceObj > > Signed-off-by: Dan Heidinga > This class is never allocated from resource area or C-heap. It's just stack allocated. So the obvious question - should it subclass StackObj instead? > Signed-off-by: Dan Heidinga heidinga at redhat.com What does this signify Dan? Cheers, David ------------- PR: https://git.openjdk.java.net/jdk/pull/5362 From mseledtsov at openjdk.java.net Sat Sep 4 00:13:12 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Sat, 4 Sep 2021 00:13:12 GMT Subject: RFR: JDK-8195809: [TESTBUG] jps and jcmd -l support for containers is not tested Message-ID: Please review this addition of new testing: - new test for sending jcmd commands across container boundaries - updated existing sidecar test, enabling jcmd test case ------------- Commit messages: - Cleanup - Adding TestJcmd - Made getBaseImageName() and version() public to allow tests access these methods - Test JCMD with side car pattern works Changes: https://git.openjdk.java.net/jdk/pull/5368/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5368&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8195809 Stats: 201 lines in 3 files changed: 194 ins; 2 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/5368.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5368/head:pull/5368 PR: https://git.openjdk.java.net/jdk/pull/5368 From mseledtsov at openjdk.java.net Sat Sep 4 00:13:12 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Sat, 4 Sep 2021 00:13:12 GMT Subject: RFR: JDK-8195809: [TESTBUG] jps and jcmd -l support for containers is not tested In-Reply-To: References: Message-ID: On Sat, 4 Sep 2021 00:03:14 GMT, Mikhailo Seledtsov wrote: > Please review this addition of new testing: > - new test for sending jcmd commands across container boundaries > - updated existing sidecar test, enabling jcmd test case @hseigel and Kevin Walls, please review when you have a chance ------------- PR: https://git.openjdk.java.net/jdk/pull/5368 From github.com+8503711+danheidinga at openjdk.java.net Sat Sep 4 01:38:54 2021 From: github.com+8503711+danheidinga at openjdk.java.net (Dan Heidinga) Date: Sat, 4 Sep 2021 01:38:54 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj [v2] In-Reply-To: <0VqWcVfSyL2mgxG8QSPXwBrLofpCTu2MUblrz-XF36k=.8c5a71d7-42f1-46ad-973f-5fc74d124eb4@github.com> References: <0VqWcVfSyL2mgxG8QSPXwBrLofpCTu2MUblrz-XF36k=.8c5a71d7-42f1-46ad-973f-5fc74d124eb4@github.com> Message-ID: <5RaDqUOnPFHNtbm400mghe9b2x7WNYe-u4qm8CFU3d4=.f23e043f-6cf6-4125-832f-ea337399938f@github.com> On Fri, 3 Sep 2021 18:48:50 GMT, Dan Heidinga wrote: >> I picked up a simple unassigned bug to work through the contribution process. >> >> `make run-test-tier1` passes with this change. >> >> Signed-off-by: Dan Heidinga > > Dan Heidinga has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit: > > 8272164: DumpAllocStats shouldn't subclass from ResourceObj > > Signed-off-by: Dan Heidinga > > Signed-off-by: Dan Heidinga [heidinga at redhat.com](mailto:heidinga at redhat.com) > > What does this signify Dan? I've gotten in the habit of using `git commit -s` to sign commits as this is required for contributing to Eclipse projects. The intent of the line is to show that the author is signing off that they have the rights to share the patch. It's usually used to ensure that the author of the pull request has signed the Eclipse Contributor agreement. I guess it's not used here? ------------- PR: https://git.openjdk.java.net/jdk/pull/5362 From github.com+8503711+danheidinga at openjdk.java.net Sat Sep 4 03:30:19 2021 From: github.com+8503711+danheidinga at openjdk.java.net (Dan Heidinga) Date: Sat, 4 Sep 2021 03:30:19 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj [v3] In-Reply-To: References: Message-ID: > I picked up a simple unassigned bug to work through the contribution process. > > `make run-test-tier1` passes with this change. > > Signed-off-by: Dan Heidinga Dan Heidinga has updated the pull request incrementally with one additional commit since the last revision: Explicitly mark as StackObj subclass ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5362/files - new: https://git.openjdk.java.net/jdk/pull/5362/files/8438b691..b0781da0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5362&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5362&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5362.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5362/head:pull/5362 PR: https://git.openjdk.java.net/jdk/pull/5362 From dholmes at openjdk.java.net Sat Sep 4 04:48:51 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sat, 4 Sep 2021 04:48:51 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj [v2] In-Reply-To: <5RaDqUOnPFHNtbm400mghe9b2x7WNYe-u4qm8CFU3d4=.f23e043f-6cf6-4125-832f-ea337399938f@github.com> References: <0VqWcVfSyL2mgxG8QSPXwBrLofpCTu2MUblrz-XF36k=.8c5a71d7-42f1-46ad-973f-5fc74d124eb4@github.com> <5RaDqUOnPFHNtbm400mghe9b2x7WNYe-u4qm8CFU3d4=.f23e043f-6cf6-4125-832f-ea337399938f@github.com> Message-ID: On Sat, 4 Sep 2021 01:35:35 GMT, Dan Heidinga wrote: > I guess it's not used here? Right, not used here. The patch author has to have signed the OCA for the PR to be accepted by the skara tooling. Cheers, David ------------- PR: https://git.openjdk.java.net/jdk/pull/5362 From dholmes at openjdk.java.net Sat Sep 4 04:57:46 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sat, 4 Sep 2021 04:57:46 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj [v3] In-Reply-To: References: Message-ID: On Sat, 4 Sep 2021 03:30:19 GMT, Dan Heidinga wrote: >> I picked up a simple unassigned bug to work through the contribution process. >> >> `make run-test-tier1` passes with this change. >> >> Signed-off-by: Dan Heidinga > > Dan Heidinga has updated the pull request incrementally with one additional commit since the last revision: > > Explicitly mark as StackObj subclass Hi Dan, This version also seems fine. I'm not sure where we stand with using `StackObj` these days in terms of style (ie is it just a historical anachronism?). But in this case `DumpAllocStats` only has a single use embedded within `ArchiveBuilder` which is itself a `StackObj` - so this seems fine either way. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5362 From dholmes at openjdk.java.net Sun Sep 5 23:46:54 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sun, 5 Sep 2021 23:46:54 GMT Subject: RFR: 8273333: Zero should warn about unimplemented -XX:+LogTouchedMethods In-Reply-To: <6cEjhB-bKG4AVrMptM2RPyRl9Ku9sZEssV_VbjWH_-k=.c61781ad-c123-449f-8904-abdb3699fd6b@github.com> References: <6cEjhB-bKG4AVrMptM2RPyRl9Ku9sZEssV_VbjWH_-k=.c61781ad-c123-449f-8904-abdb3699fd6b@github.com> Message-ID: On Fri, 3 Sep 2021 15:29:36 GMT, Aleksey Shipilev wrote: > Currently Zero VM does not implement -XX:+LogTouchedMethods runtime features, which makes `runtime/CommandLine/PrintTouchedMethods.java` tier1 test fail with it. > > Instead of implementing it (risking performance and rare bugs), Zero should just reject the option. > > Additional testing: > - [x] Eyeballing failure message > - [x] Affected test does not run with Zero anymore > - [x] Affected test still runs with Server Looks fine. One style nit. Thanks, David test/hotspot/jtreg/runtime/CommandLine/PrintTouchedMethods.java line 27: > 25: * @test > 26: * @requires vm.flavor != "zero" > 27: * @bug 8025692 8273333 Nit: these lines tend to be in the other order ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5363 From lzang at openjdk.java.net Mon Sep 6 06:50:12 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Mon, 6 Sep 2021 06:50:12 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v31] In-Reply-To: References: Message-ID: > 8252842: Extend jmap to support parallel heap dump Lin Zang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 40 commits: - Merge branch 'master' into par-dump - Merge branch 'master' into par-dump - fix build issue - Merge branch 'master' into par-dump - Merge branch 'master' into par-dump - Merge branch 'master' into par-dump - fix build issue after rebase and fix one issue - Merge branch 'master' - Merge branch 'master' into pd - update copyright info - ... and 30 more: https://git.openjdk.java.net/jdk/compare/c640fe42...062110e2 ------------- Changes: https://git.openjdk.java.net/jdk/pull/2261/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2261&range=30 Stats: 835 lines in 5 files changed: 648 ins; 57 del; 130 mod Patch: https://git.openjdk.java.net/jdk/pull/2261.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2261/head:pull/2261 PR: https://git.openjdk.java.net/jdk/pull/2261 From shade at openjdk.java.net Mon Sep 6 07:31:15 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Mon, 6 Sep 2021 07:31:15 GMT Subject: RFR: 8273333: Zero should warn about unimplemented -XX:+LogTouchedMethods [v2] In-Reply-To: <6cEjhB-bKG4AVrMptM2RPyRl9Ku9sZEssV_VbjWH_-k=.c61781ad-c123-449f-8904-abdb3699fd6b@github.com> References: <6cEjhB-bKG4AVrMptM2RPyRl9Ku9sZEssV_VbjWH_-k=.c61781ad-c123-449f-8904-abdb3699fd6b@github.com> Message-ID: > Currently Zero VM does not implement -XX:+LogTouchedMethods runtime features, which makes `runtime/CommandLine/PrintTouchedMethods.java` tier1 test fail with it. > > Instead of implementing it (risking performance and rare bugs), Zero should just reject the option. > > Additional testing: > - [x] Eyeballing failure message > - [x] Affected test does not run with Zero anymore > - [x] Affected test still runs with Server Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Change the @requries line order ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5363/files - new: https://git.openjdk.java.net/jdk/pull/5363/files/9e0a3218..0bdca3f8 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5363&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5363&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5363.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5363/head:pull/5363 PR: https://git.openjdk.java.net/jdk/pull/5363 From shade at openjdk.java.net Mon Sep 6 09:54:58 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Mon, 6 Sep 2021 09:54:58 GMT Subject: RFR: 8273373: Zero: Handle thread stack sizes with a generic Linux code Message-ID: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> See the bug for more discussion. Additional testing: - [x] Linux Zero x86_64 passes most gtests now (there are unrelated failures) - [x] Linux Zero x86_32 passes most gtests now (there are unrelated failures) ------------- Commit messages: - Fix Changes: https://git.openjdk.java.net/jdk/pull/5376/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5376&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273373 Stats: 88 lines in 2 files changed: 3 ins; 85 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5376.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5376/head:pull/5376 PR: https://git.openjdk.java.net/jdk/pull/5376 From github.com+8503711+danheidinga at openjdk.java.net Mon Sep 6 13:34:43 2021 From: github.com+8503711+danheidinga at openjdk.java.net (Dan Heidinga) Date: Mon, 6 Sep 2021 13:34:43 GMT Subject: RFR: 8272164: DumpAllocStats shouldn't subclass from ResourceObj [v3] In-Reply-To: References: Message-ID: On Sat, 4 Sep 2021 03:30:19 GMT, Dan Heidinga wrote: >> I picked up a simple unassigned bug to work through the contribution process. >> >> `make run-test-tier1` passes with this change. >> >> Signed-off-by: Dan Heidinga > > Dan Heidinga has updated the pull request incrementally with one additional commit since the last revision: > > Explicitly mark as StackObj subclass The pre-submit test failures are all in `tools/javac/options/modes/InfoOptsTest.java` and I can't reproduce the failure locally. There a a number of other open PRs with the same failure so it looks like an unrelated failure. ------------- PR: https://git.openjdk.java.net/jdk/pull/5362 From github.com+8503711+danheidinga at openjdk.java.net Mon Sep 6 13:43:42 2021 From: github.com+8503711+danheidinga at openjdk.java.net (Dan Heidinga) Date: Mon, 6 Sep 2021 13:43:42 GMT Subject: Integrated: 8272164: DumpAllocStats shouldn't subclass from ResourceObj In-Reply-To: References: Message-ID: On Fri, 3 Sep 2021 15:17:49 GMT, Dan Heidinga wrote: > I picked up a simple unassigned bug to work through the contribution process. > > `make run-test-tier1` passes with this change. > > Signed-off-by: Dan Heidinga This pull request has now been integrated. Changeset: 44c5c23b Author: Dan Heidinga Committer: Aleksey Shipilev URL: https://git.openjdk.java.net/jdk/commit/44c5c23b96adf071339b39cfaea08c2d3a19d839 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8272164: DumpAllocStats shouldn't subclass from ResourceObj Reviewed-by: shade, iklam, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5362 From lkorinth at openjdk.java.net Mon Sep 6 14:03:46 2021 From: lkorinth at openjdk.java.net (Leo Korinth) Date: Mon, 6 Sep 2021 14:03:46 GMT Subject: RFR: 8231356: Fix broken ResourceObj::operator new[] in debug builds [v2] In-Reply-To: References: Message-ID: On Wed, 11 Aug 2021 12:30:45 GMT, Kim Barrett wrote: >> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove all other new [] operators in RsourceObj and the delete [] operator as well > > src/hotspot/share/memory/allocation.hpp line 444: > >> 442: } >> 443: >> 444: void* operator new [](size_t size) throw() = delete; > > I think it should suffice to `delete` this one, with the others completely removed. I think that name lookup will find this, and one will either get an error because the arguments don't match or because they do match to a deleted function. Sorry for the delay, can I keep all `= delete`? I have an idea how to fix them in the future. ------------- PR: https://git.openjdk.java.net/jdk/pull/5055 From dholmes at openjdk.java.net Mon Sep 6 23:10:42 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Mon, 6 Sep 2021 23:10:42 GMT Subject: RFR: 8273333: Zero should warn about unimplemented -XX:+LogTouchedMethods [v2] In-Reply-To: References: <6cEjhB-bKG4AVrMptM2RPyRl9Ku9sZEssV_VbjWH_-k=.c61781ad-c123-449f-8904-abdb3699fd6b@github.com> Message-ID: On Mon, 6 Sep 2021 07:31:15 GMT, Aleksey Shipilev wrote: >> Currently Zero VM does not implement -XX:+LogTouchedMethods runtime features, which makes `runtime/CommandLine/PrintTouchedMethods.java` tier1 test fail with it. >> >> Instead of implementing it (risking performance and rare bugs), Zero should just reject the option. >> >> Additional testing: >> - [x] Eyeballing failure message >> - [x] Affected test does not run with Zero anymore >> - [x] Affected test still runs with Server > > Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: > > Change the @requries line order Marked as reviewed by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5363 From dholmes at openjdk.java.net Mon Sep 6 23:18:38 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Mon, 6 Sep 2021 23:18:38 GMT Subject: RFR: 8273373: Zero: Handle thread stack sizes with a generic Linux code In-Reply-To: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: On Mon, 6 Sep 2021 09:45:12 GMT, Aleksey Shipilev wrote: > See the bug for more discussion. > > Additional testing: > - [x] Linux Zero x86_64 passes most gtests now (there are unrelated failures) > - [x] Linux Zero x86_32 passes most gtests now (there are unrelated failures) Hi Aleksey, The assert in the shared code seems fine. I can't really comment on the Zero changes and the dropping of IA64 support here. Thanks, David ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From ysuenaga at openjdk.java.net Mon Sep 6 23:32:38 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Mon, 6 Sep 2021 23:32:38 GMT Subject: RFR: 8273104: Refactoring option parser for UL In-Reply-To: References: Message-ID: On Sun, 29 Aug 2021 03:48:06 GMT, Yasumasa Suenaga wrote: > As we discussed in PR #4885 and in [its CSR](https://bugs.openjdk.java.net/browse/JDK-8271188), we want to introduce `foldmultilines` to stdout/err UL output. However we have no chance to configure `LogOutput` for stdout/err (`LogStdoutOutput`/`LogStderrOutput`) becasuse they will be instantiated statically in logFileStreamOutput.cpp. > > So we need to refactor UL option parser to propagate options to all extended classes of `LogOutput`. > > * Move `parse_option()` to `LogOutput` from `LogFileOutput`, then it becames public member. > * Introduce `set_option()` in `LogOutput` as a pure virtual member to apply options to each log output, then it is implemented in both `LogFileStreamOutput` and `LogFileOutput`. > * Move both `FoldMultilinesOptionKey` and `_fold_mulilines` in `LogFileStreamOutput` to private member because they are no longer to need to be public. > > I want to send PR to introduce `foldmultilines` to stdout/err like https://github.com/YaSuenag/jdk/compare/ul-refactoring...YaSuenag:foldmultilines-for-stdout after this. PING: Can I get second reviewer? ------------- PR: https://git.openjdk.java.net/jdk/pull/5293 From dholmes at openjdk.java.net Tue Sep 7 00:24:38 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Tue, 7 Sep 2021 00:24:38 GMT Subject: RFR: 8273104: Refactoring option parser for UL In-Reply-To: References: Message-ID: On Sun, 29 Aug 2021 03:48:06 GMT, Yasumasa Suenaga wrote: > As we discussed in PR #4885 and in [its CSR](https://bugs.openjdk.java.net/browse/JDK-8271188), we want to introduce `foldmultilines` to stdout/err UL output. However we have no chance to configure `LogOutput` for stdout/err (`LogStdoutOutput`/`LogStderrOutput`) becasuse they will be instantiated statically in logFileStreamOutput.cpp. > > So we need to refactor UL option parser to propagate options to all extended classes of `LogOutput`. > > * Move `parse_option()` to `LogOutput` from `LogFileOutput`, then it becames public member. > * Introduce `set_option()` in `LogOutput` as a pure virtual member to apply options to each log output, then it is implemented in both `LogFileStreamOutput` and `LogFileOutput`. > * Move both `FoldMultilinesOptionKey` and `_fold_mulilines` in `LogFileStreamOutput` to private member because they are no longer to need to be public. > > I want to send PR to introduce `foldmultilines` to stdout/err like https://github.com/YaSuenag/jdk/compare/ul-refactoring...YaSuenag:foldmultilines-for-stdout after this. Hi Yasumasa, I have one query below about a possible correctness issue with the error messages. IIUC these dynamic changes to the options will only apply after argument processing is complete - so anything logged prior to that will not be affected. That isn't an issue for options that don't directly change the output but for FoldMultiLines it means we would not do the folding initially. That probably isn't a practical concern given what logging can happen prior to argument processing ... or am I mistaken in thinking that UL can be used prior to that point? Thanks, David src/hotspot/share/logging/logOutput.cpp line 370: > 368: if (!success) { > 369: if (errstream->count() > errstream_count_before) { > 370: errstream->print_cr("Invalid option '%s' for log output (%s).", key, name()); I don't quite follow this. If the error count has increased then this was a known option with a bad value that has already been reported in set_option. Here we should be catching an unknown option that wasn't recognized by set_option, in which case the error count should be unchanged no? ------------- PR: https://git.openjdk.java.net/jdk/pull/5293 From kbarrett at openjdk.java.net Tue Sep 7 01:26:39 2021 From: kbarrett at openjdk.java.net (Kim Barrett) Date: Tue, 7 Sep 2021 01:26:39 GMT Subject: RFR: 8231356: Fix broken ResourceObj::operator new[] in debug builds [v2] In-Reply-To: References: Message-ID: <1NjQaJUOFt69yR7xHay_RVEb4qq9BpepENkpfeD4b9Q=.6038ddab-a9d6-40fc-aeb8-603798807757@github.com> On Wed, 11 Aug 2021 11:36:43 GMT, Leo Korinth wrote: >> ResourceObj::operator new[] calls ResourceObj::operator new (non array version). In debug builds, each resource object (on C_HEAP) will be initialized with set_allocation_type() (which is correct). What is not correct is that the constructor (and thus) set_allocation_type() is called on the array itself (which is not a ResourceObj). This initialization will be partially overwritten by the header that keeps track of the array size. When the array destructor later is called, it will also chain call the non-array destructor. In debug builds the verification of _allocation_t[0] will fail as it has been overwritten by the code that keeps track of the array size. >> >> The following assert will fail: >> assert(~(_allocation_t[0] | allocation_mask) == (uintptr_t)this, "lost resource object"); >> >> The reason that it has not been detected is that no one uses ResourceObj::operator new[] on resource objects with C_HEAP storage. > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > Remove all other new [] operators in RsourceObj and the delete [] operator as well Looks good. ------------- Marked as reviewed by kbarrett (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5055 From kbarrett at openjdk.java.net Tue Sep 7 01:26:39 2021 From: kbarrett at openjdk.java.net (Kim Barrett) Date: Tue, 7 Sep 2021 01:26:39 GMT Subject: RFR: 8231356: Fix broken ResourceObj::operator new[] in debug builds [v2] In-Reply-To: References: Message-ID: <10xoZG2JntvCbFEDr0rlnAD1iQlmJEzuIoywkD4N8Rk=.cadf8dc8-092f-4b60-b188-696411deb2e8@github.com> On Mon, 6 Sep 2021 14:00:12 GMT, Leo Korinth wrote: >> src/hotspot/share/memory/allocation.hpp line 444: >> >>> 442: } >>> 443: >>> 444: void* operator new [](size_t size) throw() = delete; >> >> I think it should suffice to `delete` this one, with the others completely removed. I think that name lookup will find this, and one will either get an error because the arguments don't match or because they do match to a deleted function. > > Sorry for the delay, can I keep all `= delete`? I have an idea how to fix them in the future. Sure. ------------- PR: https://git.openjdk.java.net/jdk/pull/5055 From ysuenaga at openjdk.java.net Tue Sep 7 01:43:03 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Tue, 7 Sep 2021 01:43:03 GMT Subject: RFR: 8273104: Refactoring option parser for UL [v2] In-Reply-To: References: Message-ID: > As we discussed in PR #4885 and in [its CSR](https://bugs.openjdk.java.net/browse/JDK-8271188), we want to introduce `foldmultilines` to stdout/err UL output. However we have no chance to configure `LogOutput` for stdout/err (`LogStdoutOutput`/`LogStderrOutput`) becasuse they will be instantiated statically in logFileStreamOutput.cpp. > > So we need to refactor UL option parser to propagate options to all extended classes of `LogOutput`. > > * Move `parse_option()` to `LogOutput` from `LogFileOutput`, then it becames public member. > * Introduce `set_option()` in `LogOutput` as a pure virtual member to apply options to each log output, then it is implemented in both `LogFileStreamOutput` and `LogFileOutput`. > * Move both `FoldMultilinesOptionKey` and `_fold_mulilines` in `LogFileStreamOutput` to private member because they are no longer to need to be public. > > I want to send PR to introduce `foldmultilines` to stdout/err like https://github.com/YaSuenag/jdk/compare/ul-refactoring...YaSuenag:foldmultilines-for-stdout after this. Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: Fix condition for error stream ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5293/files - new: https://git.openjdk.java.net/jdk/pull/5293/files/e1f098e0..6bc61af5 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5293&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5293&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5293.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5293/head:pull/5293 PR: https://git.openjdk.java.net/jdk/pull/5293 From ysuenaga at openjdk.java.net Tue Sep 7 01:58:40 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Tue, 7 Sep 2021 01:58:40 GMT Subject: RFR: 8273104: Refactoring option parser for UL [v2] In-Reply-To: References: Message-ID: <4rT85QeTrnFD941rL8uRJ2Ph9IE41wUtWWJqc8KXqc8=.e3823c57-e262-4ba4-a9a8-b08499dfcbe3@github.com> On Tue, 7 Sep 2021 00:15:25 GMT, David Holmes wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix condition for error stream > > src/hotspot/share/logging/logOutput.cpp line 370: > >> 368: if (!success) { >> 369: if (errstream->count() > errstream_count_before) { >> 370: errstream->print_cr("Invalid option '%s' for log output (%s).", key, name()); > > I don't quite follow this. If the error count has increased then this was a known option with a bad value that has already been reported in set_option. Here we should be catching an unknown option that wasn't recognized by set_option, in which case the error count should be unchanged no? Good catch! I fixed it in new commit. ------------- PR: https://git.openjdk.java.net/jdk/pull/5293 From ysuenaga at openjdk.java.net Tue Sep 7 01:58:39 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Tue, 7 Sep 2021 01:58:39 GMT Subject: RFR: 8273104: Refactoring option parser for UL [v2] In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 01:43:03 GMT, Yasumasa Suenaga wrote: >> As we discussed in PR #4885 and in [its CSR](https://bugs.openjdk.java.net/browse/JDK-8271188), we want to introduce `foldmultilines` to stdout/err UL output. However we have no chance to configure `LogOutput` for stdout/err (`LogStdoutOutput`/`LogStderrOutput`) becasuse they will be instantiated statically in logFileStreamOutput.cpp. >> >> So we need to refactor UL option parser to propagate options to all extended classes of `LogOutput`. >> >> * Move `parse_option()` to `LogOutput` from `LogFileOutput`, then it becames public member. >> * Introduce `set_option()` in `LogOutput` as a pure virtual member to apply options to each log output, then it is implemented in both `LogFileStreamOutput` and `LogFileOutput`. >> * Move both `FoldMultilinesOptionKey` and `_fold_mulilines` in `LogFileStreamOutput` to private member because they are no longer to need to be public. >> >> I want to send PR to introduce `foldmultilines` to stdout/err like https://github.com/YaSuenag/jdk/compare/ul-refactoring...YaSuenag:foldmultilines-for-stdout after this. > > Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: > > Fix condition for error stream Thanks David for the comment! > IIUC these dynamic changes to the options will only apply after argument processing is complete All of output options can't be changed dynamically. We can see following error when we attempt to do so. As you said UL for stdout/err can be used before argument processing, however file output isn't so. All of argument processing can be happened at `LogFileOutput::initialize()` and it would call `parse_options()`. $ jcmd 62838 VM.log list Log output configuration: #0: stdout all=warning uptime,level,tags #1: stderr all=off uptime,level,tags #2: file=test.log all=info uptime,level,tags filecount=5,filesize=20480K,async=false (reconfigured) $ jcmd 62838 VM.log output=#2 output_options=foldmultilines=true 62838: Output options for existing outputs are ignored. (I can see `reconfigured` label in JDK 16 even if any output options are not accepted from jcmd - it may be bug) ------------- PR: https://git.openjdk.java.net/jdk/pull/5293 From iklam at openjdk.java.net Tue Sep 7 02:02:42 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Tue, 7 Sep 2021 02:02:42 GMT Subject: RFR: 8231356: Fix broken ResourceObj::operator new[] in debug builds [v2] In-Reply-To: References: Message-ID: <4wPp3hzp2jnWUSviHMQMb3NM84P4IkzKFoLxgyA9ZGs=.3ef50054-0b6a-49c9-bf0f-f4dc4111905a@github.com> On Wed, 11 Aug 2021 11:36:43 GMT, Leo Korinth wrote: >> ResourceObj::operator new[] calls ResourceObj::operator new (non array version). In debug builds, each resource object (on C_HEAP) will be initialized with set_allocation_type() (which is correct). What is not correct is that the constructor (and thus) set_allocation_type() is called on the array itself (which is not a ResourceObj). This initialization will be partially overwritten by the header that keeps track of the array size. When the array destructor later is called, it will also chain call the non-array destructor. In debug builds the verification of _allocation_t[0] will fail as it has been overwritten by the code that keeps track of the array size. >> >> The following assert will fail: >> assert(~(_allocation_t[0] | allocation_mask) == (uintptr_t)this, "lost resource object"); >> >> The reason that it has not been detected is that no one uses ResourceObj::operator new[] on resource objects with C_HEAP storage. > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > Remove all other new [] operators in RsourceObj and the delete [] operator as well LGTM ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5055 From dholmes at openjdk.java.net Tue Sep 7 02:42:40 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Tue, 7 Sep 2021 02:42:40 GMT Subject: RFR: 8273104: Refactoring option parser for UL [v2] In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 01:43:03 GMT, Yasumasa Suenaga wrote: >> As we discussed in PR #4885 and in [its CSR](https://bugs.openjdk.java.net/browse/JDK-8271188), we want to introduce `foldmultilines` to stdout/err UL output. However we have no chance to configure `LogOutput` for stdout/err (`LogStdoutOutput`/`LogStderrOutput`) becasuse they will be instantiated statically in logFileStreamOutput.cpp. >> >> So we need to refactor UL option parser to propagate options to all extended classes of `LogOutput`. >> >> * Move `parse_option()` to `LogOutput` from `LogFileOutput`, then it becames public member. >> * Introduce `set_option()` in `LogOutput` as a pure virtual member to apply options to each log output, then it is implemented in both `LogFileStreamOutput` and `LogFileOutput`. >> * Move both `FoldMultilinesOptionKey` and `_fold_mulilines` in `LogFileStreamOutput` to private member because they are no longer to need to be public. >> >> I want to send PR to introduce `foldmultilines` to stdout/err like https://github.com/YaSuenag/jdk/compare/ul-refactoring...YaSuenag:foldmultilines-for-stdout after this. > > Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: > > Fix condition for error stream Hi Yasumasa, Update looks good. So my comment about foldMultiLines could only be true for stdout/err and only in the future when it is enabled for those. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5293 From ysuenaga at openjdk.java.net Tue Sep 7 03:08:38 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Tue, 7 Sep 2021 03:08:38 GMT Subject: RFR: 8273104: Refactoring option parser for UL [v2] In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 01:43:03 GMT, Yasumasa Suenaga wrote: >> As we discussed in PR #4885 and in [its CSR](https://bugs.openjdk.java.net/browse/JDK-8271188), we want to introduce `foldmultilines` to stdout/err UL output. However we have no chance to configure `LogOutput` for stdout/err (`LogStdoutOutput`/`LogStderrOutput`) becasuse they will be instantiated statically in logFileStreamOutput.cpp. >> >> So we need to refactor UL option parser to propagate options to all extended classes of `LogOutput`. >> >> * Move `parse_option()` to `LogOutput` from `LogFileOutput`, then it becames public member. >> * Introduce `set_option()` in `LogOutput` as a pure virtual member to apply options to each log output, then it is implemented in both `LogFileStreamOutput` and `LogFileOutput`. >> * Move both `FoldMultilinesOptionKey` and `_fold_mulilines` in `LogFileStreamOutput` to private member because they are no longer to need to be public. >> >> I want to send PR to introduce `foldmultilines` to stdout/err like https://github.com/YaSuenag/jdk/compare/ul-refactoring...YaSuenag:foldmultilines-for-stdout after this. > > Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: > > Fix condition for error stream Thanks David for your review! > So my comment about foldMultiLines could only be true for stdout/err and only in the future when it is enabled for those. I agree with you that the problem is not practical concern because the log which happens before argument processing is determinative, so I think we can excuse they are not folded. I'll check what logs can happen before argument processing. ------------- PR: https://git.openjdk.java.net/jdk/pull/5293 From github.com+38446717+matias9927 at openjdk.java.net Tue Sep 7 04:05:54 2021 From: github.com+38446717+matias9927 at openjdk.java.net (Matias Saavedra Silva) Date: Tue, 7 Sep 2021 04:05:54 GMT Subject: RFR: 8272608: java_lang_System::allow_security_manager() doesn't set its initialization flag Message-ID: Originally the initialized flag was always false causing the System fields to be read each time the method is called. The flag is now set the first time it runs. Tested with tier1, specifically with runtime/logging/ProtectionDomainVerificationTest.java. ------------- Commit messages: - Set initialized to true Changes: https://git.openjdk.java.net/jdk/pull/5268/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5268&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8272608 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5268.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5268/head:pull/5268 PR: https://git.openjdk.java.net/jdk/pull/5268 From coleenp at openjdk.java.net Tue Sep 7 04:05:55 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Tue, 7 Sep 2021 04:05:55 GMT Subject: RFR: 8272608: java_lang_System::allow_security_manager() doesn't set its initialization flag In-Reply-To: References: Message-ID: On Thu, 26 Aug 2021 16:00:01 GMT, Matias Saavedra Silva wrote: > Originally the initialized flag was always false causing the System fields to be read each time the method is called. The flag is now set the first time it runs. > Tested with tier1, specifically with runtime/logging/ProtectionDomainVerificationTest.java. This change looks good! thank you for fixing it. ------------- Marked as reviewed by coleenp (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5268 From dholmes at openjdk.java.net Tue Sep 7 04:58:37 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Tue, 7 Sep 2021 04:58:37 GMT Subject: RFR: 8272608: java_lang_System::allow_security_manager() doesn't set its initialization flag In-Reply-To: References: Message-ID: <0kQyG2u82TKci4Wq1dbcegDCpq7GZl8YOLTXdfuxloc=.d6a71b9f-5f2e-43f3-8926-ca870bd5ddb5@github.com> On Thu, 26 Aug 2021 16:00:01 GMT, Matias Saavedra Silva wrote: > Originally the initialized flag was always false causing the System fields to be read each time the method is called. The flag is now set the first time it runs. > Tested with tier1, specifically with runtime/logging/ProtectionDomainVerificationTest.java. Thanks for the fix Matias! David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5268 From shade at openjdk.java.net Tue Sep 7 07:38:42 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 7 Sep 2021 07:38:42 GMT Subject: RFR: 8273333: Zero should warn about unimplemented -XX:+LogTouchedMethods [v2] In-Reply-To: References: <6cEjhB-bKG4AVrMptM2RPyRl9Ku9sZEssV_VbjWH_-k=.c61781ad-c123-449f-8904-abdb3699fd6b@github.com> Message-ID: On Mon, 6 Sep 2021 07:31:15 GMT, Aleksey Shipilev wrote: >> Currently Zero VM does not implement -XX:+LogTouchedMethods runtime features, which makes `runtime/CommandLine/PrintTouchedMethods.java` tier1 test fail with it. >> >> Instead of implementing it (risking performance and rare bugs), Zero should just reject the option. >> >> Additional testing: >> - [x] Eyeballing failure message >> - [x] Affected test does not run with Zero anymore >> - [x] Affected test still runs with Server > > Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: > > Change the @requries line order Thanks for reviews! ------------- PR: https://git.openjdk.java.net/jdk/pull/5363 From shade at openjdk.java.net Tue Sep 7 07:38:43 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 7 Sep 2021 07:38:43 GMT Subject: Integrated: 8273333: Zero should warn about unimplemented -XX:+LogTouchedMethods In-Reply-To: <6cEjhB-bKG4AVrMptM2RPyRl9Ku9sZEssV_VbjWH_-k=.c61781ad-c123-449f-8904-abdb3699fd6b@github.com> References: <6cEjhB-bKG4AVrMptM2RPyRl9Ku9sZEssV_VbjWH_-k=.c61781ad-c123-449f-8904-abdb3699fd6b@github.com> Message-ID: <13crlnLanY6t625pENBzEuYvKKxLnvUJUJT2YBL_i_A=.b1951fe4-a28f-426c-aaf1-2a496b846671@github.com> On Fri, 3 Sep 2021 15:29:36 GMT, Aleksey Shipilev wrote: > Currently Zero VM does not implement -XX:+LogTouchedMethods runtime features, which makes `runtime/CommandLine/PrintTouchedMethods.java` tier1 test fail with it. > > Instead of implementing it (risking performance and rare bugs), Zero should just reject the option. > > Additional testing: > - [x] Eyeballing failure message > - [x] Affected test does not run with Zero anymore > - [x] Affected test still runs with Server This pull request has now been integrated. Changeset: 81c719be Author: Aleksey Shipilev URL: https://git.openjdk.java.net/jdk/commit/81c719be3995fa54974e8b8826ad81bf07bd012f Stats: 7 lines in 2 files changed: 6 ins; 0 del; 1 mod 8273333: Zero should warn about unimplemented -XX:+LogTouchedMethods Reviewed-by: minqi, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5363 From lkorinth at openjdk.java.net Tue Sep 7 08:27:50 2021 From: lkorinth at openjdk.java.net (Leo Korinth) Date: Tue, 7 Sep 2021 08:27:50 GMT Subject: Integrated: 8231356: Fix broken ResourceObj::operator new[] in debug builds In-Reply-To: References: Message-ID: On Mon, 9 Aug 2021 14:31:22 GMT, Leo Korinth wrote: > ResourceObj::operator new[] calls ResourceObj::operator new (non array version). In debug builds, each resource object (on C_HEAP) will be initialized with set_allocation_type() (which is correct). What is not correct is that the constructor (and thus) set_allocation_type() is called on the array itself (which is not a ResourceObj). This initialization will be partially overwritten by the header that keeps track of the array size. When the array destructor later is called, it will also chain call the non-array destructor. In debug builds the verification of _allocation_t[0] will fail as it has been overwritten by the code that keeps track of the array size. > > The following assert will fail: > assert(~(_allocation_t[0] | allocation_mask) == (uintptr_t)this, "lost resource object"); > > The reason that it has not been detected is that no one uses ResourceObj::operator new[] on resource objects with C_HEAP storage. This pull request has now been integrated. Changeset: 3cd95a29 Author: Leo Korinth URL: https://git.openjdk.java.net/jdk/commit/3cd95a2932ab6a2cb39322354f7ad181de8bfc9e Stats: 37 lines in 2 files changed: 0 ins; 31 del; 6 mod 8231356: Fix broken ResourceObj::operator new[] in debug builds Reviewed-by: kbarrett, iklam ------------- PR: https://git.openjdk.java.net/jdk/pull/5055 From lkorinth at openjdk.java.net Tue Sep 7 09:48:48 2021 From: lkorinth at openjdk.java.net (Leo Korinth) Date: Tue, 7 Sep 2021 09:48:48 GMT Subject: RFR: 8273414: ResourceObj::operator delete should handle nullptr in debug builds Message-ID: This is how delete usually works, This is also how FreeHeap and CHeapObj::operator delete works. Delete does handle nullptr in release builds, it is the assert that may crash. Also, as a user it is nice to call delete without first checking the argument for nullptr. ------------- Commit messages: - 8273414: ResourceObj::operator delete should handle nullptr in debug builds Changes: https://git.openjdk.java.net/jdk/pull/5385/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5385&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273414 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5385.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5385/head:pull/5385 PR: https://git.openjdk.java.net/jdk/pull/5385 From stuefe at openjdk.java.net Tue Sep 7 10:00:45 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Tue, 7 Sep 2021 10:00:45 GMT Subject: RFR: 8273414: ResourceObj::operator delete should handle nullptr in debug builds In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 09:40:33 GMT, Leo Korinth wrote: > This is how delete usually works, This is also how FreeHeap and CHeapObj::operator delete works. Delete does handle nullptr in release builds, it is the assert that may crash. Also, as a user it is nice to call delete without first checking the argument for nullptr. Seems good and trivial. However, unrelated to this change, I think operator delete should also work for RA-allocated objects. It should call Arena::Afree() to release the memory if it happens to be on top of the arena. At some point we may also improve the arenas and add some form of free block handling for Arena::Afree(), like Metaspace arenas already do. In that case, it would also be able to reclaim memory not on top of the arena. Cheers, Thomas ------------- Marked as reviewed by stuefe (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5385 From myano at openjdk.java.net Tue Sep 7 11:12:56 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Tue, 7 Sep 2021 11:12:56 GMT Subject: RFR: 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform [v3] In-Reply-To: References: Message-ID: > Hi all, > > Could you please review the 8269373 bug fixes? > > These tests call java.lang.ProcessBuilder in direct, so not used jtreg command option. To run non-localized tests, -Duser.language=en and -Duser.country=US options should be added in ProcessBuilder. Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4594/files - new: https://git.openjdk.java.net/jdk/pull/4594/files/99925f72..655f5db0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4594&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4594&range=01-02 Stats: 31 lines in 6 files changed: 16 ins; 9 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/4594.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4594/head:pull/4594 PR: https://git.openjdk.java.net/jdk/pull/4594 From myano at openjdk.java.net Tue Sep 7 11:18:55 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Tue, 7 Sep 2021 11:18:55 GMT Subject: RFR: 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform [v3] In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 11:12:56 GMT, Masanori Yano wrote: >> Hi all, >> >> Could you please review the 8269373 bug fixes? >> >> These tests call java.lang.ProcessBuilder in direct, so not used jtreg command option. To run non-localized tests, -Duser.language=en and -Duser.country=US options should be added in ProcessBuilder. > > Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: > > 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform I fixed it to exit silently in case the locale is not US. Thank you. ------------- PR: https://git.openjdk.java.net/jdk/pull/4594 From myano at openjdk.java.net Tue Sep 7 11:18:54 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Tue, 7 Sep 2021 11:18:54 GMT Subject: RFR: 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform [v4] In-Reply-To: References: Message-ID: > Hi all, > > Could you please review the 8269373 bug fixes? > > These tests call java.lang.ProcessBuilder in direct, so not used jtreg command option. To run non-localized tests, -Duser.language=en and -Duser.country=US options should be added in ProcessBuilder. Masanori Yano has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: - Merge branch 'master' into 8269373 - 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform - 8269373: use test opts for process arguments - 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform ------------- Changes: https://git.openjdk.java.net/jdk/pull/4594/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4594&range=03 Stats: 15 lines in 3 files changed: 12 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/4594.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4594/head:pull/4594 PR: https://git.openjdk.java.net/jdk/pull/4594 From myano at openjdk.java.net Tue Sep 7 11:26:01 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Tue, 7 Sep 2021 11:26:01 GMT Subject: RFR: 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform [v5] In-Reply-To: References: Message-ID: > Hi all, > > Could you please review the 8269373 bug fixes? > > These tests call java.lang.ProcessBuilder in direct, so not used jtreg command option. To run non-localized tests, -Duser.language=en and -Duser.country=US options should be added in ProcessBuilder. Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4594/files - new: https://git.openjdk.java.net/jdk/pull/4594/files/98e7cfcb..b5a46b4a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4594&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4594&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/4594.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4594/head:pull/4594 PR: https://git.openjdk.java.net/jdk/pull/4594 From shade at openjdk.java.net Tue Sep 7 13:24:49 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 7 Sep 2021 13:24:49 GMT Subject: RFR: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests Message-ID: Current `vmTestbase_nsk_sysdict` suite contains about 20 tests, each running exclusively. There seem to be no reason to run them exclusively, though: they complete in reasonable time, are single-threaded, and consume the usual amount of memory. We should consider enabling parallelism for them and get improved test performance. Currently it is blocked by `TEST.properties` with `exclusiveAccess.dirs` directives in them. Motivational performance improvements below. Before: $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s ... 00:45:14 ============================== 00:45:14 Test summary 00:45:14 ============================== 00:45:14 TEST TOTAL PASS FAIL ERROR 00:45:14 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 00:45:14 ============================== 00:45:14 TEST SUCCESS 00:45:14 00:45:15 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' real 45m14.839s user 149m49.850s sys 13m25.849s After: $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s ... 00:03:25 ============================== 00:03:25 Test summary 00:03:25 ============================== 00:03:25 TEST TOTAL PASS FAIL ERROR 00:03:25 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 00:03:25 ============================== 00:03:25 TEST SUCCESS 00:03:25 00:03:25 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' real 3m24.702s user 119m7.488s sys 8m11.716s ------------- Commit messages: - Remove TEST.properties Changes: https://git.openjdk.java.net/jdk/pull/5389/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5389&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273433 Stats: 20 lines in 20 files changed: 0 ins; 20 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5389.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5389/head:pull/5389 PR: https://git.openjdk.java.net/jdk/pull/5389 From david.holmes at oracle.com Tue Sep 7 13:31:14 2021 From: david.holmes at oracle.com (David Holmes) Date: Tue, 7 Sep 2021 23:31:14 +1000 Subject: RFR: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests In-Reply-To: References: Message-ID: <274e39a8-f674-788e-3a31-ceee1afc9ae8@oracle.com> Hi Aleksey, On 7/09/2021 11:24 pm, Aleksey Shipilev wrote: > Current `vmTestbase_nsk_sysdict` suite contains about 20 tests, each running exclusively. There seem to be no reason to run them exclusively, though: they complete in reasonable time, are single-threaded, and consume the usual amount of memory. I (or someone) will to need to check the history here. There's always a reason tests were set to run exclusively. Thanks, David > We should consider enabling parallelism for them and get improved test performance. Currently it is blocked by `TEST.properties` with `exclusiveAccess.dirs` directives in them. > > Motivational performance improvements below. > > Before: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:45:14 ============================== > 00:45:14 Test summary > 00:45:14 ============================== > 00:45:14 TEST TOTAL PASS FAIL ERROR > 00:45:14 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:45:14 ============================== > 00:45:14 TEST SUCCESS > 00:45:14 > 00:45:15 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 45m14.839s > user 149m49.850s > sys 13m25.849s > > > After: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:03:25 ============================== > 00:03:25 Test summary > 00:03:25 ============================== > 00:03:25 TEST TOTAL PASS FAIL ERROR > 00:03:25 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:03:25 ============================== > 00:03:25 TEST SUCCESS > 00:03:25 > 00:03:25 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 3m24.702s > user 119m7.488s > sys 8m11.716s > > ------------- > > Commit messages: > - Remove TEST.properties > > Changes: https://git.openjdk.java.net/jdk/pull/5389/files > Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5389&range=00 > Issue: https://bugs.openjdk.java.net/browse/JDK-8273433 > Stats: 20 lines in 20 files changed: 0 ins; 20 del; 0 mod > Patch: https://git.openjdk.java.net/jdk/pull/5389.diff > Fetch: git fetch https://git.openjdk.java.net/jdk pull/5389/head:pull/5389 > > PR: https://git.openjdk.java.net/jdk/pull/5389 > From stuefe at openjdk.java.net Tue Sep 7 13:41:39 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Tue, 7 Sep 2021 13:41:39 GMT Subject: RFR: 8273373: Zero: Handle thread stack sizes with a generic Linux code In-Reply-To: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: On Mon, 6 Sep 2021 09:45:12 GMT, Aleksey Shipilev wrote: > See the bug for more discussion. > > Additional testing: > - [x] Linux Zero x86_64 passes most gtests now (there are unrelated failures) > - [x] Linux Zero x86_32 passes most gtests now (there are unrelated failures) Hi, I do not see a reason why this would be dependent on !zero. Maybe @GoeLin did not want to deal with it, or the problem did not show up on zero in the first place. I think you are right in that gtestlauncher is the only launcher where we end up running in the primordial thread. Removing ia64 code block is fine. Arguably zero may be the last variant where ia64 would still be useful. Debian seems still to build Zero+ia64 in openjdk15: https://buildd.debian.org/status/logs.php?pkg=openjdk-15&arch=ia64 About the zero gtest errors, do you understand why they only happen in other_vm resp. death tests? Something must be special here. I am curious since invoking JNI on the primordial thread may not be that well tested. I tried to understand the primordial-thread-stack-boundaries coding, but it left a number of questions. For instance we try to find the primordial stack dimensions by: - read /proc/self/stat, column 28 ("stackstart", bottom address) - then we go and find the VMA containing this address, and assume the highest address of this VM is the stack top. I am not sure the latter always works. Is that not dependent on memory layout? It relies on the process stack having its own VMA, but could the kernel not fold it with a neighboring VMA and show it as one line in /proc/self/maps? In that case, the stack start address we calculate could be bogus. src/hotspot/os/linux/os_linux.cpp line 3371: > 3369: assert((uintptr_t)addr >= stack_extent, > 3370: "Sanity: addr should be larger than extent, " PTR_FORMAT " >= " PTR_FORMAT, > 3371: p2i(addr), stack_extent); Should we not do something in non-debug builds too? Maybe guarantee() instead? ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From lkorinth at openjdk.java.net Tue Sep 7 13:42:35 2021 From: lkorinth at openjdk.java.net (Leo Korinth) Date: Tue, 7 Sep 2021 13:42:35 GMT Subject: RFR: 8273414: ResourceObj::operator delete should handle nullptr in debug builds In-Reply-To: References: Message-ID: <-3pH7xZ8tEPoREFy7AWcBRa51OicLNSQ-62fTsQkMp8=.8700405a-e2ea-4b09-9673-7b287601f08f@github.com> On Tue, 7 Sep 2021 09:40:33 GMT, Leo Korinth wrote: > This is how delete usually works, This is also how FreeHeap and CHeapObj::operator delete works. Delete does handle nullptr in release builds, it is the assert that may crash. Also, as a user it is nice to call delete without first checking the argument for nullptr. Thanks for the review Thomas! The test failure of `Pre-submit tests - Linux x64 - Test (tier1)` is due to Shenandoah (JDK-8271834). I added a comment to that bug that it is probably not solved, I saw that you reported the bug so you might be interested. ------------- PR: https://git.openjdk.java.net/jdk/pull/5385 From shade at openjdk.java.net Tue Sep 7 13:47:33 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 7 Sep 2021 13:47:33 GMT Subject: RFR: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests In-Reply-To: <274e39a8-f674-788e-3a31-ceee1afc9ae8@oracle.com> References: <274e39a8-f674-788e-3a31-ceee1afc9ae8@oracle.com> Message-ID: On Tue, 7 Sep 2021 13:33:09 GMT, David Holmes wrote: > I (or someone) will to need to check the history here. There's always a reason tests were set to run exclusively. Please do. `TEST.properties` have no history before OpenJDK, and I found no relevant problems in JBS. These `exclusiveAccess.dir`-s look as something added for extra safety, but we pay dearly for that extra with test time. ------------- PR: https://git.openjdk.java.net/jdk/pull/5389 From stuefe at openjdk.java.net Tue Sep 7 13:47:35 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Tue, 7 Sep 2021 13:47:35 GMT Subject: RFR: 8273414: ResourceObj::operator delete should handle nullptr in debug builds In-Reply-To: <-3pH7xZ8tEPoREFy7AWcBRa51OicLNSQ-62fTsQkMp8=.8700405a-e2ea-4b09-9673-7b287601f08f@github.com> References: <-3pH7xZ8tEPoREFy7AWcBRa51OicLNSQ-62fTsQkMp8=.8700405a-e2ea-4b09-9673-7b287601f08f@github.com> Message-ID: On Tue, 7 Sep 2021 13:40:07 GMT, Leo Korinth wrote: > Thanks for the review Thomas! > > The test failure of `Pre-submit tests - Linux x64 - Test (tier1)` is due to Shenandoah (JDK-8271834). I added a comment to that bug that it is probably not solved, I saw that you reported the bug so you might be interested. Thanks, I see you already commented on the issue. @zhengyu123 is handling that one. I ignore those bugs in GHA for now. ------------- PR: https://git.openjdk.java.net/jdk/pull/5385 From shade at openjdk.java.net Tue Sep 7 15:48:52 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 7 Sep 2021 15:48:52 GMT Subject: RFR: 8273440: Zero: Disable runtime/Unsafe/InternalErrorTest.java Message-ID: <5NepcV6jQcYqw016mvnedX3Sc0kX_Xtf8Tm_oddmBR8=.63a22715-1a98-4fd4-8cc4-03a2717f2a3b@github.com> JDK-8191278 added a `runtime/Unsafe/InternalErrorTest.java` test to verify that `SIGBUS` during Unsafe copy is converted into the exception. Zero currently crashes this test on `ShouldNotCall()` in signal handler: # Internal Error (/home/shade/trunks/jdk/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp:155), pid=2752575, tid=2752589 # Error: ShouldNotCall() It is unlikely that Zero would implement this functionality, so it seems prudent to disable the test to get clean tier1 for Zero. Additional testing: - [x] Linux x86_64 Zero, test is now disabled - [x] Linux x86_64 Server, test still runs ------------- Commit messages: - Fix Changes: https://git.openjdk.java.net/jdk/pull/5394/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5394&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273440 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5394.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5394/head:pull/5394 PR: https://git.openjdk.java.net/jdk/pull/5394 From naoto at openjdk.java.net Tue Sep 7 16:14:37 2021 From: naoto at openjdk.java.net (Naoto Sato) Date: Tue, 7 Sep 2021 16:14:37 GMT Subject: RFR: 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform [v5] In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 11:26:01 GMT, Masanori Yano wrote: >> Hi all, >> >> Could you please review the 8269373 bug fixes? >> >> These tests call java.lang.ProcessBuilder in direct, so not used jtreg command option. To run non-localized tests, -Duser.language=en and -Duser.country=US options should be added in ProcessBuilder. > > Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: > > 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform Thanks. Looks good to me. ------------- Marked as reviewed by naoto (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/4594 From cjplummer at openjdk.java.net Tue Sep 7 18:07:39 2021 From: cjplummer at openjdk.java.net (Chris Plummer) Date: Tue, 7 Sep 2021 18:07:39 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump In-Reply-To: References: Message-ID: On Thu, 28 Jan 2021 07:30:29 GMT, Serguei Spitsyn wrote: >> 8252842: Extend jmap to support parallel heap dump > > Hi Lin, > It is also in my memory that you actually did not have 4 arguments. > The real incompatibility issue was that the order of arguments was swapped. > It is why it was relatively easy to fall back and just update the constants with 3 instead of 4 and swap the order of arguments back. > Thanks, > Serguei @sspitsyn or @schmelter-sap Can one of you provide a second review for this change. The GC team would like to start a review for changes that will heavily impact this same code, so it would be best if these changes could be pushed first. ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From lmesnik at openjdk.java.net Tue Sep 7 19:44:19 2021 From: lmesnik at openjdk.java.net (Leonid Mesnik) Date: Tue, 7 Sep 2021 19:44:19 GMT Subject: RFR: 8273451: Remove unreachable return in mutexLocker::wait Message-ID: Refactored mutexLocker::wait to return redundant unreachable "return false;" ------------- Commit messages: - 8273451 Changes: https://git.openjdk.java.net/jdk/pull/5398/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5398&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273451 Stats: 6 lines in 1 file changed: 0 ins; 4 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5398.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5398/head:pull/5398 PR: https://git.openjdk.java.net/jdk/pull/5398 From minqi at openjdk.java.net Tue Sep 7 20:49:03 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Tue, 7 Sep 2021 20:49:03 GMT Subject: RFR: 8273451: Remove unreachable return in mutexLocker::wait In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 19:38:43 GMT, Leonid Mesnik wrote: > Refactored mutexLocker::wait to return redundant unreachable "return false;" LGTM. ------------- Marked as reviewed by minqi (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5398 From coleenp at openjdk.java.net Tue Sep 7 21:46:06 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Tue, 7 Sep 2021 21:46:06 GMT Subject: RFR: 8273451: Remove unreachable return in mutexLocker::wait In-Reply-To: References: Message-ID: <_hMY7xDYWNjeRSSxldNfJSi8b_8NLCg4C1oUgdcLVUI=.5b03ab2f-dce8-4a05-840b-77c47f0139e8@github.com> On Tue, 7 Sep 2021 19:38:43 GMT, Leonid Mesnik wrote: > Refactored mutexLocker::wait to return redundant unreachable "return false;" This looks good! ------------- Marked as reviewed by coleenp (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5398 From coleenp at openjdk.java.net Tue Sep 7 22:25:05 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Tue, 7 Sep 2021 22:25:05 GMT Subject: RFR: 8272608: java_lang_System::allow_security_manager() doesn't set its initialization flag In-Reply-To: References: Message-ID: <0CLRTqyi_biYeCJM7GQyEWTA7qFkYcuHsl_t07fQNFA=.7165a24f-c67c-4772-8cb4-9b1f6286920c@github.com> On Thu, 26 Aug 2021 16:00:01 GMT, Matias Saavedra Silva wrote: > Originally the initialized flag was always false causing the System fields to be read each time the method is called. The flag is now set the first time it runs. > Tested with tier1, specifically with runtime/logging/ProtectionDomainVerificationTest.java. I can sponsor this now that Matias has OCA coverage. Thanks Matias! ------------- PR: https://git.openjdk.java.net/jdk/pull/5268 From dcubed at openjdk.java.net Wed Sep 8 00:37:27 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 8 Sep 2021 00:37:27 GMT Subject: Integrated: 8273462: ProblemList vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java in -Xcomp mode Message-ID: A trivial fix to ProblemList vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java in -Xcomp mode. There are currently 17 sightings (so far) on linux-X64, macOS-X64, and win-X64. ------------- Commit messages: - 8273462: ProblemList vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java in -Xcomp mode Changes: https://git.openjdk.java.net/jdk/pull/5404/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5404&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273462 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5404.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5404/head:pull/5404 PR: https://git.openjdk.java.net/jdk/pull/5404 From dholmes at openjdk.java.net Wed Sep 8 00:37:27 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 8 Sep 2021 00:37:27 GMT Subject: Integrated: 8273462: ProblemList vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java in -Xcomp mode In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 00:25:37 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java in -Xcomp mode. > > There are currently 17 sightings (so far) on linux-X64, macOS-X64, and win-X64. Marked as reviewed by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5404 From dcubed at openjdk.java.net Wed Sep 8 00:37:27 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 8 Sep 2021 00:37:27 GMT Subject: Integrated: 8273462: ProblemList vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java in -Xcomp mode In-Reply-To: References: Message-ID: <_zKNzeAcTOC1VeRlLLZsAQFv1APHBM5EvdTKd_CeNe8=.6335cfa1-8e2f-49f6-9cfa-9e6b93c2e9ff@github.com> On Wed, 8 Sep 2021 00:27:12 GMT, David Holmes wrote: >> A trivial fix to ProblemList vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java in -Xcomp mode. >> >> There are currently 17 sightings (so far) on linux-X64, macOS-X64, and win-X64. > > Marked as reviewed by dholmes (Reviewer). @dholmes-ora - Thanks for the lightning fast review! ------------- PR: https://git.openjdk.java.net/jdk/pull/5404 From dcubed at openjdk.java.net Wed Sep 8 00:37:27 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 8 Sep 2021 00:37:27 GMT Subject: Integrated: 8273462: ProblemList vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java in -Xcomp mode In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 00:25:37 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java in -Xcomp mode. > > There are currently 17 sightings (so far) on linux-X64, macOS-X64, and win-X64. This pull request has now been integrated. Changeset: 8884d2f8 Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk/commit/8884d2f854fafdc5f775fce557053d072e4a882c Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod 8273462: ProblemList vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java in -Xcomp mode Reviewed-by: dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5404 From dholmes at openjdk.java.net Wed Sep 8 01:01:08 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 8 Sep 2021 01:01:08 GMT Subject: RFR: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 13:17:10 GMT, Aleksey Shipilev wrote: > Current `vmTestbase_nsk_sysdict` suite contains about 20 tests, each running exclusively. There seem to be no reason to run them exclusively, though: they complete in reasonable time, are single-threaded, and consume the usual amount of memory. > > We should consider enabling parallelism for them and get improved test performance. Currently it is blocked by `TEST.properties` with `exclusiveAccess.dirs` directives in them. > > Motivational performance improvements below. > > Before: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:45:14 ============================== > 00:45:14 Test summary > 00:45:14 ============================== > 00:45:14 TEST TOTAL PASS FAIL ERROR > 00:45:14 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:45:14 ============================== > 00:45:14 TEST SUCCESS > 00:45:14 > 00:45:15 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 45m14.839s > user 149m49.850s > sys 13m25.849s > > > After: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:03:25 ============================== > 00:03:25 Test summary > 00:03:25 ============================== > 00:03:25 TEST TOTAL PASS FAIL ERROR > 00:03:25 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:03:25 ============================== > 00:03:25 TEST SUCCESS > 00:03:25 > 00:03:25 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 3m24.702s > user 119m7.488s > sys 8m11.716s I suspect it was simply the fact that these were stress tests that resulted in them being executed in isolation. Otherwise if the concurrency level is just wrong I would expect these to cause intermittent failures when run in parallel. I will ask Misha to respond here (can't locate his OpenJDK tag :( ). ------------- PR: https://git.openjdk.java.net/jdk/pull/5389 From dholmes at openjdk.java.net Wed Sep 8 01:06:08 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 8 Sep 2021 01:06:08 GMT Subject: RFR: 8273451: Remove unreachable return in mutexLocker::wait In-Reply-To: References: Message-ID: <3Xgs6Xw6soT6VPT8Kc6IAi8SfgcEQ4l8mDSj13JbfXU=.9dddf4ec-a9a8-4181-b4b8-ac2ebb86b66e@github.com> On Tue, 7 Sep 2021 19:38:43 GMT, Leonid Mesnik wrote: > Refactored mutexLocker::wait to return redundant unreachable "return false;" I think the change to the ?: operator was unnecessary and does not improve readability. YMMV. ------------- PR: https://git.openjdk.java.net/jdk/pull/5398 From dholmes at openjdk.java.net Wed Sep 8 01:08:10 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 8 Sep 2021 01:08:10 GMT Subject: RFR: 8273440: Zero: Disable runtime/Unsafe/InternalErrorTest.java In-Reply-To: <5NepcV6jQcYqw016mvnedX3Sc0kX_Xtf8Tm_oddmBR8=.63a22715-1a98-4fd4-8cc4-03a2717f2a3b@github.com> References: <5NepcV6jQcYqw016mvnedX3Sc0kX_Xtf8Tm_oddmBR8=.63a22715-1a98-4fd4-8cc4-03a2717f2a3b@github.com> Message-ID: On Tue, 7 Sep 2021 15:40:56 GMT, Aleksey Shipilev wrote: > JDK-8191278 added a `runtime/Unsafe/InternalErrorTest.java` test to verify that `SIGBUS` during Unsafe copy is converted into the exception. Zero currently crashes this test on `ShouldNotCall()` in signal handler: > > > # Internal Error (/home/shade/trunks/jdk/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp:155), pid=2752575, tid=2752589 > # Error: ShouldNotCall() > > > It is unlikely that Zero would implement this functionality, so it seems prudent to disable the test to get clean tier1 for Zero. > > Additional testing: > - [x] Linux x86_64 Zero, test is now disabled > - [x] Linux x86_64 Server, test still runs Seems fine and trivial. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5394 From ysuenaga at openjdk.java.net Wed Sep 8 01:30:09 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Wed, 8 Sep 2021 01:30:09 GMT Subject: Integrated: 8273104: Refactoring option parser for UL In-Reply-To: References: Message-ID: <5Wyf1YgqElPMlTaMvWeUGHNHkcsyjMOLHBYkASbTKuo=.0551f84a-da3a-4993-be4b-77e1db3dc946@github.com> On Sun, 29 Aug 2021 03:48:06 GMT, Yasumasa Suenaga wrote: > As we discussed in PR #4885 and in [its CSR](https://bugs.openjdk.java.net/browse/JDK-8271188), we want to introduce `foldmultilines` to stdout/err UL output. However we have no chance to configure `LogOutput` for stdout/err (`LogStdoutOutput`/`LogStderrOutput`) becasuse they will be instantiated statically in logFileStreamOutput.cpp. > > So we need to refactor UL option parser to propagate options to all extended classes of `LogOutput`. > > * Move `parse_option()` to `LogOutput` from `LogFileOutput`, then it becames public member. > * Introduce `set_option()` in `LogOutput` as a pure virtual member to apply options to each log output, then it is implemented in both `LogFileStreamOutput` and `LogFileOutput`. > * Move both `FoldMultilinesOptionKey` and `_fold_mulilines` in `LogFileStreamOutput` to private member because they are no longer to need to be public. > > I want to send PR to introduce `foldmultilines` to stdout/err like https://github.com/YaSuenag/jdk/compare/ul-refactoring...YaSuenag:foldmultilines-for-stdout after this. This pull request has now been integrated. Changeset: 4eacdb38 Author: Yasumasa Suenaga URL: https://git.openjdk.java.net/jdk/commit/4eacdb38a83b545603928392eccb116c744ef3b3 Stats: 126 lines in 7 files changed: 65 ins; 45 del; 16 mod 8273104: Refactoring option parser for UL Reviewed-by: iklam, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5293 From dholmes at openjdk.java.net Wed Sep 8 01:36:07 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 8 Sep 2021 01:36:07 GMT Subject: RFR: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 13:17:10 GMT, Aleksey Shipilev wrote: > Current `vmTestbase_nsk_sysdict` suite contains about 20 tests, each running exclusively. There seem to be no reason to run them exclusively, though: they complete in reasonable time, are single-threaded, and consume the usual amount of memory. > > We should consider enabling parallelism for them and get improved test performance. Currently it is blocked by `TEST.properties` with `exclusiveAccess.dirs` directives in them. > > Motivational performance improvements below. > > Before: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:45:14 ============================== > 00:45:14 Test summary > 00:45:14 ============================== > 00:45:14 TEST TOTAL PASS FAIL ERROR > 00:45:14 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:45:14 ============================== > 00:45:14 TEST SUCCESS > 00:45:14 > 00:45:15 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 45m14.839s > user 149m49.850s > sys 13m25.849s > > > After: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:03:25 ============================== > 00:03:25 Test summary > 00:03:25 ============================== > 00:03:25 TEST TOTAL PASS FAIL ERROR > 00:03:25 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:03:25 ============================== > 00:03:25 TEST SUCCESS > 00:03:25 > 00:03:25 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 3m24.702s > user 119m7.488s > sys 8m11.716s I'm also concerned that hard-wiring this sort of thing is never going to make everyone happy. Probably what we need is a way to disable "exclusiveDirs" processing on the jtreg command-line ... though that would need some finer-level of control to make it useful. ------------- PR: https://git.openjdk.java.net/jdk/pull/5389 From dcubed at openjdk.java.net Wed Sep 8 02:16:18 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 8 Sep 2021 02:16:18 GMT Subject: Integrated: 8273047: test jfr/api/consumer/TestRecordedFrame.java timing out Message-ID: A trivial fix to bump the timeout value for the second sub-test in jfr/api/consumer/TestRecordedFrame.java. See the bug report for the gory details. ------------- Commit messages: - 8273047: test jfr/api/consumer/TestRecordedFrame.java timing out Changes: https://git.openjdk.java.net/jdk/pull/5405/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5405&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273047 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5405.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5405/head:pull/5405 PR: https://git.openjdk.java.net/jdk/pull/5405 From dholmes at openjdk.java.net Wed Sep 8 02:16:18 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 8 Sep 2021 02:16:18 GMT Subject: Integrated: 8273047: test jfr/api/consumer/TestRecordedFrame.java timing out In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 02:04:50 GMT, Daniel D. Daugherty wrote: > A trivial fix to bump the timeout value for the second sub-test in > jfr/api/consumer/TestRecordedFrame.java. See the bug report > for the gory details. LGTM! Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5405 From dcubed at openjdk.java.net Wed Sep 8 02:16:18 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 8 Sep 2021 02:16:18 GMT Subject: Integrated: 8273047: test jfr/api/consumer/TestRecordedFrame.java timing out In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 02:04:50 GMT, Daniel D. Daugherty wrote: > A trivial fix to bump the timeout value for the second sub-test in > jfr/api/consumer/TestRecordedFrame.java. See the bug report > for the gory details. This pull request has now been integrated. Changeset: ea4907a8 Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk/commit/ea4907a8789e00f9ec8d4175241246b8cf53f3f6 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8273047: test jfr/api/consumer/TestRecordedFrame.java timing out Reviewed-by: dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5405 From dcubed at openjdk.java.net Wed Sep 8 02:16:18 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 8 Sep 2021 02:16:18 GMT Subject: Integrated: 8273047: test jfr/api/consumer/TestRecordedFrame.java timing out In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 02:07:47 GMT, David Holmes wrote: >> A trivial fix to bump the timeout value for the second sub-test in >> jfr/api/consumer/TestRecordedFrame.java. See the bug report >> for the gory details. > > LGTM! > > Thanks, > David @dholmes-ora - Thanks for the lightning fast review! ------------- PR: https://git.openjdk.java.net/jdk/pull/5405 From lmesnik at openjdk.java.net Wed Sep 8 03:12:05 2021 From: lmesnik at openjdk.java.net (Leonid Mesnik) Date: Wed, 8 Sep 2021 03:12:05 GMT Subject: RFR: 8273451: Remove unreachable return in mutexLocker::wait In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 19:38:43 GMT, Leonid Mesnik wrote: > Refactored mutexLocker::wait to return redundant unreachable "return false;" I don't see a big difference here but prefer ?: in such cases. Just a little more compact. ------------- PR: https://git.openjdk.java.net/jdk/pull/5398 From rschmelter at openjdk.java.net Wed Sep 8 05:05:13 2021 From: rschmelter at openjdk.java.net (Ralf Schmelter) Date: Wed, 8 Sep 2021 05:05:13 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: On Mon, 6 Sep 2021 08:03:22 GMT, Lin Zang wrote: >> 8252842: Extend jmap to support parallel heap dump > > Lin Zang has updated the pull request incrementally with one additional commit since the last revision: > > fix build error I will start reviewing this today. ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From stuefe at openjdk.java.net Wed Sep 8 07:46:06 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Wed, 8 Sep 2021 07:46:06 GMT Subject: RFR: 8273373: Zero: Handle thread stack sizes with a generic Linux code In-Reply-To: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: On Mon, 6 Sep 2021 09:45:12 GMT, Aleksey Shipilev wrote: > See the bug for more discussion. > > Additional testing: > - [x] Linux Zero x86_64 passes most gtests now (there are unrelated failures) > - [x] Linux Zero x86_32 passes most gtests now (there are unrelated failures) I got curious and analyzed this further. Let's see if I got this correctly. When we create the VM on the primordial thread, we locate the stack boundaries for the primordial thread in `os::Linux::capture_initial_stack()`: There, we basically look for the boundaries of the primordial thread stack in `/proc/pid/maps`. We manage to locate the correct VMA for the primordial stack. But then we do not simply take the boundary of that VMA as stack boundary. Instead, we take the high VMA address, subtract an assumed stack size (calculated from -Xss and RLIMIT_STACK), then take that address as stack bottom (`_initial_thread_stack_bottom`). Seems that that assumed stack size can be smaller than the real size of the stack, resulting in an offset between the real stack VMA low address and `_initial_thread_stack_bottom`. That in itself would be not a problem, but in `StackOverflow::create_stack_guard_pages()` we place the guard pages at an address which we calculate from `os::current_stack_base()`. `os::current_stack_base()` calls `current_stack_region()`, which on Zero just calls `pthread_attr_getstack(3)`, ignoring the previously captured `_initial_thread_stack_bottom`. In `os::pd_create_stack_guard_pages()` we then essentially use both values - `os::current_stack_base()` and `_initial_thread_stack_bottom` - to calculate the arguments to `get_stack_commited_bottom()`. The resulting assert is caused by mixing those conflicting values. Bottomline, we should either be using `pthread_attr_getstack(3)` or our `_initial_thread_stack_(bottom|size)` but not mix them since they may differ. Therefore the proposed patch is correct. The non-zero version of `current_stack_region()` in os_linux.cpp handles the primordial thread stack correctly. --- There are a number of additional beauty spots, like the fact that in `get_stack_commited_bottom()` the `pages` variable is 32bit unsigned. So the assert itself is random in that it depends on whether or not the overflow produces a negative overflow. Also, I don't understand the logic in `os::pd_create_stack_guard_pages()` where the "fallback" is to call mincore() with what basically would be a zero size? Since both `addr` and `stack_extend` are the stack bottom. --- I would probably rename the issue to "Cannot invoke JVM in primordial threads on Zero". Cheers, Thomas ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From shade at openjdk.java.net Wed Sep 8 07:48:14 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 8 Sep 2021 07:48:14 GMT Subject: RFR: 8273440: Zero: Disable runtime/Unsafe/InternalErrorTest.java In-Reply-To: <5NepcV6jQcYqw016mvnedX3Sc0kX_Xtf8Tm_oddmBR8=.63a22715-1a98-4fd4-8cc4-03a2717f2a3b@github.com> References: <5NepcV6jQcYqw016mvnedX3Sc0kX_Xtf8Tm_oddmBR8=.63a22715-1a98-4fd4-8cc4-03a2717f2a3b@github.com> Message-ID: On Tue, 7 Sep 2021 15:40:56 GMT, Aleksey Shipilev wrote: > JDK-8191278 added a `runtime/Unsafe/InternalErrorTest.java` test to verify that `SIGBUS` during Unsafe copy is converted into the exception. Zero currently crashes this test on `ShouldNotCall()` in signal handler: > > > # Internal Error (/home/shade/trunks/jdk/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp:155), pid=2752575, tid=2752589 > # Error: ShouldNotCall() > > > It is unlikely that Zero would implement this functionality, so it seems prudent to disable the test to get clean tier1 for Zero. > > Additional testing: > - [x] Linux x86_64 Zero, test is now disabled > - [x] Linux x86_64 Server, test still runs Thanks! ------------- PR: https://git.openjdk.java.net/jdk/pull/5394 From shade at openjdk.java.net Wed Sep 8 07:48:15 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 8 Sep 2021 07:48:15 GMT Subject: Integrated: 8273440: Zero: Disable runtime/Unsafe/InternalErrorTest.java In-Reply-To: <5NepcV6jQcYqw016mvnedX3Sc0kX_Xtf8Tm_oddmBR8=.63a22715-1a98-4fd4-8cc4-03a2717f2a3b@github.com> References: <5NepcV6jQcYqw016mvnedX3Sc0kX_Xtf8Tm_oddmBR8=.63a22715-1a98-4fd4-8cc4-03a2717f2a3b@github.com> Message-ID: On Tue, 7 Sep 2021 15:40:56 GMT, Aleksey Shipilev wrote: > JDK-8191278 added a `runtime/Unsafe/InternalErrorTest.java` test to verify that `SIGBUS` during Unsafe copy is converted into the exception. Zero currently crashes this test on `ShouldNotCall()` in signal handler: > > > # Internal Error (/home/shade/trunks/jdk/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp:155), pid=2752575, tid=2752589 > # Error: ShouldNotCall() > > > It is unlikely that Zero would implement this functionality, so it seems prudent to disable the test to get clean tier1 for Zero. > > Additional testing: > - [x] Linux x86_64 Zero, test is now disabled > - [x] Linux x86_64 Server, test still runs This pull request has now been integrated. Changeset: 286a1f6b Author: Aleksey Shipilev URL: https://git.openjdk.java.net/jdk/commit/286a1f6b7c6d7c598ced456f1a5f63cac1be8539 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8273440: Zero: Disable runtime/Unsafe/InternalErrorTest.java Reviewed-by: dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5394 From shade at openjdk.java.net Wed Sep 8 08:25:06 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 8 Sep 2021 08:25:06 GMT Subject: RFR: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 00:58:19 GMT, David Holmes wrote: > I suspect it was simply the fact that these were stress tests that resulted in them being executed in isolation. Otherwise if the concurrency level is just wrong I would expect these to cause intermittent failures when run in parallel. Yeah, I generally agree with this. Blind parallelism improvements should not be done, and we should only allow the stress tests that are not heavy on resources to run in parallel. The tests affected in this PR seem to be rather short, effectively single-threaded, and memory-dense tests, so they seem to qualify for this kind of relaxation. I'll wait for Misha to respond. ------------- PR: https://git.openjdk.java.net/jdk/pull/5389 From ysuenaga at openjdk.java.net Wed Sep 8 09:21:24 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Wed, 8 Sep 2021 09:21:24 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err Message-ID: We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` In addition, we might see following logs which relate to UL: [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied [0.000s][error][logging] Invalid tag 'aaa' in log selection. [0.000s][error][logging] Invalid level 'aaa' in log selection. [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. ------------- Commit messages: - 8273471: Add foldmultilines to UL for stdout/err Changes: https://git.openjdk.java.net/jdk/pull/5407/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273471 Stats: 76 lines in 3 files changed: 50 ins; 8 del; 18 mod Patch: https://git.openjdk.java.net/jdk/pull/5407.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5407/head:pull/5407 PR: https://git.openjdk.java.net/jdk/pull/5407 From ysuenaga at openjdk.java.net Wed Sep 8 09:21:24 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Wed, 8 Sep 2021 09:21:24 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err In-Reply-To: References: Message-ID: <-37L2bthVqBlqErqtJRx3_yMH9keeKgA2SQTyWuB8Xo=.1dc46f2a-eb37-4251-9209-e0aec0423f79@github.com> On Wed, 8 Sep 2021 06:12:21 GMT, Yasumasa Suenaga wrote: > We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. > > `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. > > `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. > They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. > > > share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); > share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); > > share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " > > share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); > share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); > share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); > > > I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` > > In addition, we might see following logs which relate to UL: > > > [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied > [0.000s][error][logging] Invalid tag 'aaa' in log selection. > [0.000s][error][logging] Invalid level 'aaa' in log selection. > [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). > [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file > [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. gc/metaspace/TestMetaspacePerfCounters.java#id3 failed on GitHub Actions, but it does not seem to be caused by this change. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From shade at openjdk.java.net Wed Sep 8 09:22:08 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 8 Sep 2021 09:22:08 GMT Subject: RFR: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero In-Reply-To: References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: On Wed, 8 Sep 2021 07:43:01 GMT, Thomas Stuefe wrote: > Bottomline, we should either be using `pthread_attr_getstack(3)` or our `_initial_thread_stack_(bottom|size)` but not mix them since they may differ. Therefore the proposed patch is correct. The non-zero version of `current_stack_region()` in os_linux.cpp handles the primordial thread stack correctly. Yes, that seems to be the gist of it. In fact, if I reply `_initial_thread_stack_(bottom|size)` in Zero version of `current_stack_region()` for a primordial thread, gtests also start to pass. But I gather there is no need to continue supporting Zero-specific `current_stack_region()`, and thus dodge the issue altogether by using the code the rest of VM code uses. > src/hotspot/os/linux/os_linux.cpp line 3371: > >> 3369: assert((uintptr_t)addr >= stack_extent, >> 3370: "Sanity: addr should be larger than extent, " PTR_FORMAT " >= " PTR_FORMAT, >> 3371: p2i(addr), stack_extent); > > Should we not do something in non-debug builds too? Maybe guarantee() instead? Nah, I think `assert` is okay here. It is supposed to aid debugging, not crash hard. ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From shade at openjdk.java.net Wed Sep 8 10:26:06 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 8 Sep 2021 10:26:06 GMT Subject: RFR: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero In-Reply-To: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: On Mon, 6 Sep 2021 09:45:12 GMT, Aleksey Shipilev wrote: > See the bug for more discussion. > > Additional testing: > - [x] Linux Zero x86_64 passes most gtests now (there are unrelated failures) > - [x] Linux Zero x86_32 passes most gtests now (there are unrelated failures) I looked around Debian's support for IA64, and I think we don't want to drop the support for it just yet. Zero VM is one of those last stands for weird arches portability :) Instead of adding the `IA64` block to a shared code, I shall try to make a more conservative fix to Zero-specific code then... ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From shade at openjdk.java.net Wed Sep 8 11:06:18 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 8 Sep 2021 11:06:18 GMT Subject: RFR: 8273487: Zero: Handle "zero" variant in runtime tests Message-ID: JDK-8179317 rewritten runtime shell tests to Java. There is a little omission in VM variant selection, which makes Zero fail some of the tier1 tests, like: $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/StackGap/TestStackGap.java STDERR: java.lang.Error: TESTBUG: unsupported vm variant at jdk.test.lib.Platform.variant(Platform.java:368) at jdk.test.lib.Platform.jvmLibDir(Platform.java:357) at jdk.test.lib.process.ProcessTools.addJvmLib(ProcessTools.java:585) at jdk.test.lib.process.ProcessTools.createNativeTestProcessBuilder(ProcessTools.java:575) Additional testing: - [ ] Linux x86_64 Zero affected tests (StackGap, StackGuardPages, TestTLS) now run ------------- Commit messages: - Fix Changes: https://git.openjdk.java.net/jdk/pull/5413/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5413&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273487 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5413.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5413/head:pull/5413 PR: https://git.openjdk.java.net/jdk/pull/5413 From alanb at openjdk.java.net Wed Sep 8 11:19:06 2021 From: alanb at openjdk.java.net (Alan Bateman) Date: Wed, 8 Sep 2021 11:19:06 GMT Subject: RFR: 8273487: Zero: Handle "zero" variant in runtime tests In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 10:57:33 GMT, Aleksey Shipilev wrote: > JDK-8179317 rewritten runtime shell tests to Java. There is a little omission in VM variant selection, which makes Zero fail some of the tier1 tests, like: > > > $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/StackGap/TestStackGap.java > > STDERR: > java.lang.Error: TESTBUG: unsupported vm variant > at jdk.test.lib.Platform.variant(Platform.java:368) > at jdk.test.lib.Platform.jvmLibDir(Platform.java:357) > at jdk.test.lib.process.ProcessTools.addJvmLib(ProcessTools.java:585) > at jdk.test.lib.process.ProcessTools.createNativeTestProcessBuilder(ProcessTools.java:575) > > > Additional testing: > - [ ] Linux x86_64 Zero affected tests (StackGap, StackGuardPages, TestTLS) now run Marked as reviewed by alanb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5413 From coleenp at openjdk.java.net Wed Sep 8 12:00:10 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Wed, 8 Sep 2021 12:00:10 GMT Subject: RFR: 8272608: java_lang_System::allow_security_manager() doesn't set its initialization flag In-Reply-To: References: Message-ID: On Thu, 26 Aug 2021 16:00:01 GMT, Matias Saavedra Silva wrote: > Originally the initialized flag was always false causing the System fields to be read each time the method is called. The flag is now set the first time it runs. > Tested with tier1, specifically with runtime/logging/ProtectionDomainVerificationTest.java. @matias9927 check your email! You can /integrate this and have to do this before I /sponsor it. ------------- PR: https://git.openjdk.java.net/jdk/pull/5268 From dholmes at openjdk.java.net Wed Sep 8 13:02:05 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 8 Sep 2021 13:02:05 GMT Subject: RFR: 8273487: Zero: Handle "zero" variant in runtime tests In-Reply-To: References: Message-ID: <86fqEtk6YKiecpQFyPaSgjD5XM2xKYfT-BrVcie34lQ=.4ea5f855-cb1a-4246-a1d2-7854c2c04966@github.com> On Wed, 8 Sep 2021 10:57:33 GMT, Aleksey Shipilev wrote: > JDK-8179317 rewritten runtime shell tests to Java. There is a little omission in VM variant selection, which makes Zero fail some of the tier1 tests, like: > > > $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/StackGap/TestStackGap.java > > STDERR: > java.lang.Error: TESTBUG: unsupported vm variant > at jdk.test.lib.Platform.variant(Platform.java:368) > at jdk.test.lib.Platform.jvmLibDir(Platform.java:357) > at jdk.test.lib.process.ProcessTools.addJvmLib(ProcessTools.java:585) > at jdk.test.lib.process.ProcessTools.createNativeTestProcessBuilder(ProcessTools.java:575) > > > Additional testing: > - [ ] Linux x86_64 Zero affected tests (StackGap, StackGuardPages, TestTLS) now run Marked as reviewed by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5413 From shade at openjdk.java.net Wed Sep 8 13:25:27 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 8 Sep 2021 13:25:27 GMT Subject: RFR: 8273487: Zero: Handle "zero" variant in runtime tests In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 10:57:33 GMT, Aleksey Shipilev wrote: > JDK-8179317 rewritten runtime shell tests to Java. There is a little omission in VM variant selection, which makes Zero fail some of the tier1 tests, like: > > > $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/StackGap/TestStackGap.java > > STDERR: > java.lang.Error: TESTBUG: unsupported vm variant > at jdk.test.lib.Platform.variant(Platform.java:368) > at jdk.test.lib.Platform.jvmLibDir(Platform.java:357) > at jdk.test.lib.process.ProcessTools.addJvmLib(ProcessTools.java:585) > at jdk.test.lib.process.ProcessTools.createNativeTestProcessBuilder(ProcessTools.java:575) > > > Additional testing: > - [x] Linux x86_64 Zero affected tests (StackGap, StackGuardPages, TestTLS) now run Huh, it turns out there is the awkwardness in the build system that puts product `libjvm.so` to `server` for Zero. See [JDK-8273494](https://bugs.openjdk.java.net/browse/JDK-8273494). This was not the cause for gtest `libjvm.so`, which is in `zero` folder for Zero. So I had to make it more awkward until the build system fix is here. See new commit. ------------- PR: https://git.openjdk.java.net/jdk/pull/5413 From shade at openjdk.java.net Wed Sep 8 13:25:27 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 8 Sep 2021 13:25:27 GMT Subject: RFR: 8273487: Zero: Handle "zero" variant in runtime tests [v2] In-Reply-To: References: Message-ID: > JDK-8179317 rewritten runtime shell tests to Java. There is a little omission in VM variant selection, which makes Zero fail some of the tier1 tests, like: > > > $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/StackGap/TestStackGap.java > > STDERR: > java.lang.Error: TESTBUG: unsupported vm variant > at jdk.test.lib.Platform.variant(Platform.java:368) > at jdk.test.lib.Platform.jvmLibDir(Platform.java:357) > at jdk.test.lib.process.ProcessTools.addJvmLib(ProcessTools.java:585) > at jdk.test.lib.process.ProcessTools.createNativeTestProcessBuilder(ProcessTools.java:575) > > > Additional testing: > - [x] Linux x86_64 Zero affected tests (StackGap, StackGuardPages, TestTLS) now run Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Build system awkwardness ensues ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5413/files - new: https://git.openjdk.java.net/jdk/pull/5413/files/141d8184..40998df5 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5413&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5413&range=00-01 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5413.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5413/head:pull/5413 PR: https://git.openjdk.java.net/jdk/pull/5413 From myano at openjdk.java.net Wed Sep 8 15:51:10 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Wed, 8 Sep 2021 15:51:10 GMT Subject: Integrated: 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform In-Reply-To: References: Message-ID: On Fri, 25 Jun 2021 12:10:18 GMT, Masanori Yano wrote: > Hi all, > > Could you please review the 8269373 bug fixes? > > These tests call java.lang.ProcessBuilder in direct, so not used jtreg command option. To run non-localized tests, -Duser.language=en and -Duser.country=US options should be added in ProcessBuilder. This pull request has now been integrated. Changeset: cb112aff Author: Masanori Yano Committer: Naoto Sato URL: https://git.openjdk.java.net/jdk/commit/cb112affd6061e8ace6dad4e92c7b394a413e37f Stats: 14 lines in 2 files changed: 12 ins; 0 del; 2 mod 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform Reviewed-by: naoto ------------- PR: https://git.openjdk.java.net/jdk/pull/4594 From xxinliu at amazon.com Wed Sep 8 17:21:25 2021 From: xxinliu at amazon.com (Liu, Xin) Date: Wed, 8 Sep 2021 10:21:25 -0700 Subject: RFC: call report_java_out_of_memory_error() for -XX:AbortVMOnException=java.lang.OutOfMemoryError In-Reply-To: <6ac33111-de76-3606-4a5e-817f115dacab@oracle.com> References: <4ef699cc-a5bb-f93c-c62a-ef9d6cbd2e4f@amazon.com> <6ac33111-de76-3606-4a5e-817f115dacab@oracle.com> Message-ID: <4ee742a3-ec29-5f54-d9b3-557cd09148b3@amazon.com> Hi, David, Thanks for the head-up. yes, it works for me. There's one more thing. One drawback is that the script providing to OnError can't trap hotspot itself or we end up with a deadlock. If we use 'jcmd %p Thread.print' or 'jcmd %p GC.heap_dump ' in OnError=, (%p means the java process itself), the main java thread which is waiting for os::fork_and_exec(cmd) will prevent hotspot reach to the safepoint. It's deadlock because no safepoint mean fork_and_exec can't complete. eg. $java -Xmx50m -XX:AbortVMOnException=java.lang.OutOfMemoryError -XX:OnError='jcmd %p Thread.print' -XX:+SafepointTimeout OomDumpExample direct # To suppress the following error report, specify this argument # after -XX: or in .hotspotrc: SuppressErrorAt=/exceptions.cpp:541 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/home/xxinliu/Devel/jdk/src/hotspot/share/utilities/exceptions.cpp:541), pid=107552, tid=107553 # fatal error: Saw java.lang.OutOfMemoryError, aborting # # JRE version: OpenJDK Runtime Environment (18.0) (slowdebug build 18-internal+0-adhoc.xxinliu.jdk) # Java VM: OpenJDK 64-Bit Server VM (slowdebug 18-internal+0-adhoc.xxinliu.jdk, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x924e8c] Exceptions::debug_check_abort(char const*, char const*)+0x8a # # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /local/home/xxinliu/JDK-2085/hs_err_pid107552.log # # If you would like to submit a bug report, please visit: # https://bugreport.java.com/bugreport/crash.jsp # # # -XX:OnError="jcmd %p Thread.print" # Executing /bin/sh -c "jcmd 107552 Thread.print" ... 107552: [13.045s][warning][safepoint] [13.045s][warning][safepoint] # SafepointSynchronize::begin: Timeout detected: [13.045s][warning][safepoint] # SafepointSynchronize::begin: Timed out while spinning to reach a safepoint. [13.045s][warning][safepoint] # SafepointSynchronize::begin: Threads which did not reach the safepoint: [13.045s][warning][safepoint] # "main" #1 prio=5 os_prio=0 cpu=1552.12ms elapsed=13.04s tid=0x00007f43600278e0 nid=107553 runnable [0x00007f4369d9f000] [13.045s][warning][safepoint] java.lang.Thread.State: RUNNABLE [13.045s][warning][safepoint] Thread: 0x00007f43600278e0 [0x1a421] State: _running _at_poll_safepoint 0 [13.045s][warning][safepoint] JavaThread state: _thread_in_vm [13.045s][warning][safepoint] [13.045s][warning][safepoint] # SafepointSynchronize::begin: (End of list) I haven't figured out how yet, but I think I can lift this constraint. Once I did, OnError would have more freedom to dump thread or heap before dieing. Can I file bug about this? thanks, --lx On 8/30/21 9:26 PM, David Holmes wrote: > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. > > > > Hi, > > On 28/08/2021 4:54 am, Liu, Xin wrote: >> Hi, >> >> Recently I revisit JDK-8155004/JDK-8257790 because a new team trip over. >> -XX:AbortVMOnException=java.lang.OutOfMemoryError works. I wonder >> whether it is a good idea to call report_java_out_of_memory_error() when >> OOME is trapped. In this way, HotSpot will trigger OnOutOfMemoryError >> callbacks. > > Why not just use AbortVMOnException together with OnError to get the > callbacks? > > Cheers, > David > >> I understand JDK-8257790 is not a bug. I don't want to overthrow that >> conclusion. I just wonder if we can handle it better in the presence of >> -XX:AbortVMOnException=java.lang.OutOfMemoryError. >> >> For Java webservers, OOME may lead to a zombie process. We may have a >> bug in code or indeed run out of memory. OOME is suppressed or terminate >> the thread but don't terminate the java process. eg. >> >> public class Main { >> volatile static boolean done = false; >> >> public static void main(String[] args) { >> String msg = "a long long message."; >> // write your code here >> Runnable runnable = () -> { >> int cnt = Integer.MAX_VALUE / msg.length() + 1; >> //it will throw a OutOfMemoryError. >> msg.repeat(cnt); >> done = true; >> }; >> >> Thread thread = new Thread(runnable); >> thread.start(); >> while(!done) { >> } // this simulates the main loop of event handling >> } >> } >> >> Java developers can use >> -XX:AbortVMOnException=java.lang.OutOfMemoryError to exercise fail-fast >> principle. Java web application which handle traffics are usually >> distributed in a cluster. A failure of a single host usually is not a >> big deal. As long as java exits, it's easy to restart and backfill it. >> >> My proposing change is very simple. Just call >> report_java_out_of_memory() if value_string is OOME. It's no-op if users >> never specify anything. If they do specify flags like >> Crash/ExitOnOutOfMemory, OnOutOfMemoryError or >> HeapDumpOnOutOfMemoryError, HotSpot will let report_java_out_of_memory >> does the cleanup job. fatal() works but too brutal. I think we should >> let java exits with error code. >> >> >> diff --git a/src/hotspot/share/utilities/exceptions.cpp >> b/src/hotspot/share/utilities/exceptions.cpp >> index bd95b8306be..fd8a83deaf3 100644 >> --- a/src/hotspot/share/utilities/exceptions.cpp >> +++ b/src/hotspot/share/utilities/exceptions.cpp >> @@ -538,6 +538,9 @@ void Exceptions::debug_check_abort(const char >> *value_string, const char* message >> strstr(value_string, AbortVMOnException)) { >> if (AbortVMOnExceptionMessage == NULL || (message != NULL && >> strstr(message, AbortVMOnExceptionMessage))) { >> + if(!strcmp(value_string, "java.lang.OutOfMemoryError")) { >> + report_java_out_of_memory(message); >> + } >> fatal("Saw %s, aborting", value_string); >> } >> } >> >> >> thanks, >> --lx >> From volker.simonis at gmail.com Wed Sep 8 17:35:49 2021 From: volker.simonis at gmail.com (Volker Simonis) Date: Wed, 8 Sep 2021 19:35:49 +0200 Subject: RFC: call report_java_out_of_memory_error() for -XX:AbortVMOnException=java.lang.OutOfMemoryError In-Reply-To: <4ee742a3-ec29-5f54-d9b3-557cd09148b3@amazon.com> References: <4ef699cc-a5bb-f93c-c62a-ef9d6cbd2e4f@amazon.com> <6ac33111-de76-3606-4a5e-817f115dacab@oracle.com> <4ee742a3-ec29-5f54-d9b3-557cd09148b3@amazon.com> Message-ID: I'm not sure if running a jcmd process which attaches to the dying VM as part of the OnError scripts is a use case we really want to support? There's a reason why the VM is crashing and attaching to this dying VM will most probably only cause other follow-up errors. On Wed, Sep 8, 2021 at 7:22 PM Liu, Xin wrote: > > Hi, David, > > Thanks for the head-up. yes, it works for me. > > There's one more thing. One drawback is that the script providing to > OnError can't trap hotspot itself or we end up with a deadlock. > > > If we use 'jcmd %p Thread.print' or 'jcmd %p GC.heap_dump ' in > OnError=, (%p means the java process itself), the main java thread which > is waiting for os::fork_and_exec(cmd) will prevent hotspot reach to the > safepoint. It's deadlock because no safepoint mean fork_and_exec can't > complete. > > eg. > $java -Xmx50m -XX:AbortVMOnException=java.lang.OutOfMemoryError > -XX:OnError='jcmd %p Thread.print' -XX:+SafepointTimeout OomDumpExample > direct > # To suppress the following error report, specify this argument > # after -XX: or in .hotspotrc: SuppressErrorAt=/exceptions.cpp:541 > # > # A fatal error has been detected by the Java Runtime Environment: > # > # Internal Error > (/home/xxinliu/Devel/jdk/src/hotspot/share/utilities/exceptions.cpp:541), pid=107552, > tid=107553 > # fatal error: Saw java.lang.OutOfMemoryError, aborting > # > # JRE version: OpenJDK Runtime Environment (18.0) (slowdebug build > 18-internal+0-adhoc.xxinliu.jdk) > # Java VM: OpenJDK 64-Bit Server VM (slowdebug > 18-internal+0-adhoc.xxinliu.jdk, mixed mode, tiered, compressed oops, > compressed class ptrs, g1 gc, linux-amd64) > # Problematic frame: > # V [libjvm.so+0x924e8c] Exceptions::debug_check_abort(char const*, > char const*)+0x8a > # > # No core dump will be written. Core dumps have been disabled. To enable > core dumping, try "ulimit -c unlimited" before starting Java again > # > # An error report file with more information is saved as: > # /local/home/xxinliu/JDK-2085/hs_err_pid107552.log > # > # If you would like to submit a bug report, please visit: > # https://bugreport.java.com/bugreport/crash.jsp > # > # > # -XX:OnError="jcmd %p Thread.print" > # Executing /bin/sh -c "jcmd 107552 Thread.print" ... > 107552: > [13.045s][warning][safepoint] > [13.045s][warning][safepoint] # SafepointSynchronize::begin: Timeout > detected: > [13.045s][warning][safepoint] # SafepointSynchronize::begin: Timed out > while spinning to reach a safepoint. > [13.045s][warning][safepoint] # SafepointSynchronize::begin: Threads > which did not reach the safepoint: > [13.045s][warning][safepoint] # "main" #1 prio=5 os_prio=0 cpu=1552.12ms > elapsed=13.04s tid=0x00007f43600278e0 nid=107553 runnable > [0x00007f4369d9f000] > [13.045s][warning][safepoint] java.lang.Thread.State: RUNNABLE > [13.045s][warning][safepoint] Thread: 0x00007f43600278e0 [0x1a421] > State: _running _at_poll_safepoint 0 > [13.045s][warning][safepoint] JavaThread state: _thread_in_vm > [13.045s][warning][safepoint] > [13.045s][warning][safepoint] # SafepointSynchronize::begin: (End of list) > > > I haven't figured out how yet, but I think I can lift this constraint. > Once I did, OnError would have more freedom to dump thread or heap > before dieing. Can I file bug about this? > > thanks, > --lx > > > On 8/30/21 9:26 PM, David Holmes wrote: > > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. > > > > > > > > Hi, > > > > On 28/08/2021 4:54 am, Liu, Xin wrote: > >> Hi, > >> > >> Recently I revisit JDK-8155004/JDK-8257790 because a new team trip over. > >> -XX:AbortVMOnException=java.lang.OutOfMemoryError works. I wonder > >> whether it is a good idea to call report_java_out_of_memory_error() when > >> OOME is trapped. In this way, HotSpot will trigger OnOutOfMemoryError > >> callbacks. > > > > Why not just use AbortVMOnException together with OnError to get the > > callbacks? > > > > Cheers, > > David > > > >> I understand JDK-8257790 is not a bug. I don't want to overthrow that > >> conclusion. I just wonder if we can handle it better in the presence of > >> -XX:AbortVMOnException=java.lang.OutOfMemoryError. > >> > >> For Java webservers, OOME may lead to a zombie process. We may have a > >> bug in code or indeed run out of memory. OOME is suppressed or terminate > >> the thread but don't terminate the java process. eg. > >> > >> public class Main { > >> volatile static boolean done = false; > >> > >> public static void main(String[] args) { > >> String msg = "a long long message."; > >> // write your code here > >> Runnable runnable = () -> { > >> int cnt = Integer.MAX_VALUE / msg.length() + 1; > >> //it will throw a OutOfMemoryError. > >> msg.repeat(cnt); > >> done = true; > >> }; > >> > >> Thread thread = new Thread(runnable); > >> thread.start(); > >> while(!done) { > >> } // this simulates the main loop of event handling > >> } > >> } > >> > >> Java developers can use > >> -XX:AbortVMOnException=java.lang.OutOfMemoryError to exercise fail-fast > >> principle. Java web application which handle traffics are usually > >> distributed in a cluster. A failure of a single host usually is not a > >> big deal. As long as java exits, it's easy to restart and backfill it. > >> > >> My proposing change is very simple. Just call > >> report_java_out_of_memory() if value_string is OOME. It's no-op if users > >> never specify anything. If they do specify flags like > >> Crash/ExitOnOutOfMemory, OnOutOfMemoryError or > >> HeapDumpOnOutOfMemoryError, HotSpot will let report_java_out_of_memory > >> does the cleanup job. fatal() works but too brutal. I think we should > >> let java exits with error code. > >> > >> > >> diff --git a/src/hotspot/share/utilities/exceptions.cpp > >> b/src/hotspot/share/utilities/exceptions.cpp > >> index bd95b8306be..fd8a83deaf3 100644 > >> --- a/src/hotspot/share/utilities/exceptions.cpp > >> +++ b/src/hotspot/share/utilities/exceptions.cpp > >> @@ -538,6 +538,9 @@ void Exceptions::debug_check_abort(const char > >> *value_string, const char* message > >> strstr(value_string, AbortVMOnException)) { > >> if (AbortVMOnExceptionMessage == NULL || (message != NULL && > >> strstr(message, AbortVMOnExceptionMessage))) { > >> + if(!strcmp(value_string, "java.lang.OutOfMemoryError")) { > >> + report_java_out_of_memory(message); > >> + } > >> fatal("Saw %s, aborting", value_string); > >> } > >> } > >> > >> > >> thanks, > >> --lx > >> From dcubed at openjdk.java.net Wed Sep 8 18:36:26 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 8 Sep 2021 18:36:26 GMT Subject: Integrated: 8273109: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest times out Message-ID: A trivial fix to increase the timeouts for the two sub-tests in runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java. ------------- Commit messages: - 8273109: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest times out Changes: https://git.openjdk.java.net/jdk/pull/5422/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5422&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273109 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5422.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5422/head:pull/5422 PR: https://git.openjdk.java.net/jdk/pull/5422 From bpb at openjdk.java.net Wed Sep 8 18:36:26 2021 From: bpb at openjdk.java.net (Brian Burkhalter) Date: Wed, 8 Sep 2021 18:36:26 GMT Subject: Integrated: 8273109: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest times out In-Reply-To: References: Message-ID: <4OB-PAeiLtFxVdTL25z8hsc7erCZnpjog0U0zA1iTcY=.6bfd4a51-0d0f-4ae0-9ac3-b1f6dd0280a3@github.com> On Wed, 8 Sep 2021 18:28:48 GMT, Daniel D. Daugherty wrote: > A trivial fix to increase the timeouts for the two sub-tests in > runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java. Marked as reviewed by bpb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5422 From dcubed at openjdk.java.net Wed Sep 8 18:36:26 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 8 Sep 2021 18:36:26 GMT Subject: Integrated: 8273109: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest times out In-Reply-To: <4OB-PAeiLtFxVdTL25z8hsc7erCZnpjog0U0zA1iTcY=.6bfd4a51-0d0f-4ae0-9ac3-b1f6dd0280a3@github.com> References: <4OB-PAeiLtFxVdTL25z8hsc7erCZnpjog0U0zA1iTcY=.6bfd4a51-0d0f-4ae0-9ac3-b1f6dd0280a3@github.com> Message-ID: <7XRauHY87fLVFqEyDp-8X0upqL5bjkKbYW5xX2ctOzA=.5cf98d29-524b-42bd-b1f2-141ae0f8ae85@github.com> On Wed, 8 Sep 2021 18:30:18 GMT, Brian Burkhalter wrote: >> A trivial fix to increase the timeouts for the two sub-tests in >> runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java. > > Marked as reviewed by bpb (Reviewer). @bplb - Thanks for the lightning fast review! ------------- PR: https://git.openjdk.java.net/jdk/pull/5422 From dcubed at openjdk.java.net Wed Sep 8 18:36:27 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 8 Sep 2021 18:36:27 GMT Subject: Integrated: 8273109: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest times out In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 18:28:48 GMT, Daniel D. Daugherty wrote: > A trivial fix to increase the timeouts for the two sub-tests in > runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java. This pull request has now been integrated. Changeset: ba31eee4 Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk/commit/ba31eee4fc92bba3657e5f3fec2b85f55120d7a1 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod 8273109: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest times out Reviewed-by: bpb ------------- PR: https://git.openjdk.java.net/jdk/pull/5422 From hseigel at openjdk.java.net Wed Sep 8 18:39:05 2021 From: hseigel at openjdk.java.net (Harold Seigel) Date: Wed, 8 Sep 2021 18:39:05 GMT Subject: RFR: JDK-8195809: [TESTBUG] jps and jcmd -l support for containers is not tested In-Reply-To: References: Message-ID: On Sat, 4 Sep 2021 00:03:14 GMT, Mikhailo Seledtsov wrote: > Please review this addition of new testing: > - new test for sending jcmd commands across container boundaries > - updated existing sidecar test, enabling jcmd test case test/hotspot/jtreg/containers/docker/TestJcmd.java line 94: > 92: > 93: > 94: // Run "jcmd -l" in a sidecar container, find the target process. Since 'jcmd -l' is not run in a sidecar, this comment is incorrect. ------------- PR: https://git.openjdk.java.net/jdk/pull/5368 From xxinliu at amazon.com Wed Sep 8 18:48:06 2021 From: xxinliu at amazon.com (Liu, Xin) Date: Wed, 8 Sep 2021 11:48:06 -0700 Subject: RFC: call report_java_out_of_memory_error() for -XX:AbortVMOnException=java.lang.OutOfMemoryError In-Reply-To: References: <4ef699cc-a5bb-f93c-c62a-ef9d6cbd2e4f@amazon.com> <6ac33111-de76-3606-4a5e-817f115dacab@oracle.com> <4ee742a3-ec29-5f54-d9b3-557cd09148b3@amazon.com> Message-ID: hi, Volker, I think it's possible to allow OnError=jcmd to attach to the parent process. HotSpot defines OnError as "Run user-defined commands on fatal error; see VMError.cpp for examples". It's a callback for fatal errors. fatal() means HotSpot starts aborting and does not notify other threads. In other words, other threads are in normal states. I observe so in gdb. All other threads are successful to enter safepoint safe state except the main java thread. I am not advocating using jcmd %p in OnError. I am exploring a possibility. Currently, we will end up a deadlock if you do so. If we made it, we would at least get more information from Hotspot. We will fail-fast if something bad happen. I think fail-fast is still better than a hanging process. thanks, --lx On 9/8/21 10:35 AM, Volker Simonis wrote: > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. > > > > I'm not sure if running a jcmd process which attaches to the dying VM > as part of the OnError scripts is a use case we really want to > support? > > There's a reason why the VM is crashing and attaching to this dying VM > will most probably only cause other follow-up errors. > > On Wed, Sep 8, 2021 at 7:22 PM Liu, Xin wrote: >> >> Hi, David, >> >> Thanks for the head-up. yes, it works for me. >> >> There's one more thing. One drawback is that the script providing to >> OnError can't trap hotspot itself or we end up with a deadlock. >> >> >> If we use 'jcmd %p Thread.print' or 'jcmd %p GC.heap_dump ' in >> OnError=, (%p means the java process itself), the main java thread which >> is waiting for os::fork_and_exec(cmd) will prevent hotspot reach to the >> safepoint. It's deadlock because no safepoint mean fork_and_exec can't >> complete. >> >> eg. >> $java -Xmx50m -XX:AbortVMOnException=java.lang.OutOfMemoryError >> -XX:OnError='jcmd %p Thread.print' -XX:+SafepointTimeout OomDumpExample >> direct >> # To suppress the following error report, specify this argument >> # after -XX: or in .hotspotrc: SuppressErrorAt=/exceptions.cpp:541 >> # >> # A fatal error has been detected by the Java Runtime Environment: >> # >> # Internal Error >> (/home/xxinliu/Devel/jdk/src/hotspot/share/utilities/exceptions.cpp:541), pid=107552, >> tid=107553 >> # fatal error: Saw java.lang.OutOfMemoryError, aborting >> # >> # JRE version: OpenJDK Runtime Environment (18.0) (slowdebug build >> 18-internal+0-adhoc.xxinliu.jdk) >> # Java VM: OpenJDK 64-Bit Server VM (slowdebug >> 18-internal+0-adhoc.xxinliu.jdk, mixed mode, tiered, compressed oops, >> compressed class ptrs, g1 gc, linux-amd64) >> # Problematic frame: >> # V [libjvm.so+0x924e8c] Exceptions::debug_check_abort(char const*, >> char const*)+0x8a >> # >> # No core dump will be written. Core dumps have been disabled. To enable >> core dumping, try "ulimit -c unlimited" before starting Java again >> # >> # An error report file with more information is saved as: >> # /local/home/xxinliu/JDK-2085/hs_err_pid107552.log >> # >> # If you would like to submit a bug report, please visit: >> # https://bugreport.java.com/bugreport/crash.jsp >> # >> # >> # -XX:OnError="jcmd %p Thread.print" >> # Executing /bin/sh -c "jcmd 107552 Thread.print" ... >> 107552: >> [13.045s][warning][safepoint] >> [13.045s][warning][safepoint] # SafepointSynchronize::begin: Timeout >> detected: >> [13.045s][warning][safepoint] # SafepointSynchronize::begin: Timed out >> while spinning to reach a safepoint. >> [13.045s][warning][safepoint] # SafepointSynchronize::begin: Threads >> which did not reach the safepoint: >> [13.045s][warning][safepoint] # "main" #1 prio=5 os_prio=0 cpu=1552.12ms >> elapsed=13.04s tid=0x00007f43600278e0 nid=107553 runnable >> [0x00007f4369d9f000] >> [13.045s][warning][safepoint] java.lang.Thread.State: RUNNABLE >> [13.045s][warning][safepoint] Thread: 0x00007f43600278e0 [0x1a421] >> State: _running _at_poll_safepoint 0 >> [13.045s][warning][safepoint] JavaThread state: _thread_in_vm >> [13.045s][warning][safepoint] >> [13.045s][warning][safepoint] # SafepointSynchronize::begin: (End of list) >> >> >> I haven't figured out how yet, but I think I can lift this constraint. >> Once I did, OnError would have more freedom to dump thread or heap >> before dieing. Can I file bug about this? >> >> thanks, >> --lx >> >> >> On 8/30/21 9:26 PM, David Holmes wrote: >>> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. >>> >>> >>> >>> Hi, >>> >>> On 28/08/2021 4:54 am, Liu, Xin wrote: >>>> Hi, >>>> >>>> Recently I revisit JDK-8155004/JDK-8257790 because a new team trip over. >>>> -XX:AbortVMOnException=java.lang.OutOfMemoryError works. I wonder >>>> whether it is a good idea to call report_java_out_of_memory_error() when >>>> OOME is trapped. In this way, HotSpot will trigger OnOutOfMemoryError >>>> callbacks. >>> >>> Why not just use AbortVMOnException together with OnError to get the >>> callbacks? >>> >>> Cheers, >>> David >>> >>>> I understand JDK-8257790 is not a bug. I don't want to overthrow that >>>> conclusion. I just wonder if we can handle it better in the presence of >>>> -XX:AbortVMOnException=java.lang.OutOfMemoryError. >>>> >>>> For Java webservers, OOME may lead to a zombie process. We may have a >>>> bug in code or indeed run out of memory. OOME is suppressed or terminate >>>> the thread but don't terminate the java process. eg. >>>> >>>> public class Main { >>>> volatile static boolean done = false; >>>> >>>> public static void main(String[] args) { >>>> String msg = "a long long message."; >>>> // write your code here >>>> Runnable runnable = () -> { >>>> int cnt = Integer.MAX_VALUE / msg.length() + 1; >>>> //it will throw a OutOfMemoryError. >>>> msg.repeat(cnt); >>>> done = true; >>>> }; >>>> >>>> Thread thread = new Thread(runnable); >>>> thread.start(); >>>> while(!done) { >>>> } // this simulates the main loop of event handling >>>> } >>>> } >>>> >>>> Java developers can use >>>> -XX:AbortVMOnException=java.lang.OutOfMemoryError to exercise fail-fast >>>> principle. Java web application which handle traffics are usually >>>> distributed in a cluster. A failure of a single host usually is not a >>>> big deal. As long as java exits, it's easy to restart and backfill it. >>>> >>>> My proposing change is very simple. Just call >>>> report_java_out_of_memory() if value_string is OOME. It's no-op if users >>>> never specify anything. If they do specify flags like >>>> Crash/ExitOnOutOfMemory, OnOutOfMemoryError or >>>> HeapDumpOnOutOfMemoryError, HotSpot will let report_java_out_of_memory >>>> does the cleanup job. fatal() works but too brutal. I think we should >>>> let java exits with error code. >>>> >>>> >>>> diff --git a/src/hotspot/share/utilities/exceptions.cpp >>>> b/src/hotspot/share/utilities/exceptions.cpp >>>> index bd95b8306be..fd8a83deaf3 100644 >>>> --- a/src/hotspot/share/utilities/exceptions.cpp >>>> +++ b/src/hotspot/share/utilities/exceptions.cpp >>>> @@ -538,6 +538,9 @@ void Exceptions::debug_check_abort(const char >>>> *value_string, const char* message >>>> strstr(value_string, AbortVMOnException)) { >>>> if (AbortVMOnExceptionMessage == NULL || (message != NULL && >>>> strstr(message, AbortVMOnExceptionMessage))) { >>>> + if(!strcmp(value_string, "java.lang.OutOfMemoryError")) { >>>> + report_java_out_of_memory(message); >>>> + } >>>> fatal("Saw %s, aborting", value_string); >>>> } >>>> } >>>> >>>> >>>> thanks, >>>> --lx >>>> From lmesnik at openjdk.java.net Wed Sep 8 19:33:10 2021 From: lmesnik at openjdk.java.net (Leonid Mesnik) Date: Wed, 8 Sep 2021 19:33:10 GMT Subject: Integrated: 8273451: Remove unreachable return in mutexLocker::wait In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 19:38:43 GMT, Leonid Mesnik wrote: > Refactored mutexLocker::wait to return redundant unreachable "return false;" This pull request has now been integrated. Changeset: 9b5991e8 Author: Leonid Mesnik URL: https://git.openjdk.java.net/jdk/commit/9b5991e811b789fe8b60701657c2f0dd2c222c2e Stats: 6 lines in 1 file changed: 0 ins; 4 del; 2 mod 8273451: Remove unreachable return in mutexLocker::wait Reviewed-by: minqi, coleenp ------------- PR: https://git.openjdk.java.net/jdk/pull/5398 From mseledtsov at openjdk.java.net Wed Sep 8 19:40:05 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Wed, 8 Sep 2021 19:40:05 GMT Subject: Integrated: 8273109: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest times out In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 18:28:48 GMT, Daniel D. Daugherty wrote: > A trivial fix to increase the timeouts for the two sub-tests in > runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java. Looks good to me. ------------- PR: https://git.openjdk.java.net/jdk/pull/5422 From mseledtsov at openjdk.java.net Wed Sep 8 19:44:35 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Wed, 8 Sep 2021 19:44:35 GMT Subject: RFR: JDK-8195809: [TESTBUG] jps and jcmd -l support for containers is not tested [v2] In-Reply-To: References: Message-ID: > Please review this addition of new testing: > - new test for sending jcmd commands across container boundaries > - updated existing sidecar test, enabling jcmd test case Mikhailo Seledtsov has updated the pull request incrementally with one additional commit since the last revision: Updated comment ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5368/files - new: https://git.openjdk.java.net/jdk/pull/5368/files/b714f662..1a66f1c0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5368&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5368&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5368.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5368/head:pull/5368 PR: https://git.openjdk.java.net/jdk/pull/5368 From mseledtsov at openjdk.java.net Wed Sep 8 19:44:38 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Wed, 8 Sep 2021 19:44:38 GMT Subject: RFR: JDK-8195809: [TESTBUG] jps and jcmd -l support for containers is not tested [v2] In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 18:36:27 GMT, Harold Seigel wrote: >> Mikhailo Seledtsov has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated comment > > test/hotspot/jtreg/containers/docker/TestJcmd.java line 94: > >> 92: >> 93: >> 94: // Run "jcmd -l" in a sidecar container, find the target process. > > Since 'jcmd -l' is not run in a sidecar, this comment is incorrect. Good catch. I will update the comment. ------------- PR: https://git.openjdk.java.net/jdk/pull/5368 From mseledtsov at openjdk.java.net Wed Sep 8 19:46:00 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Wed, 8 Sep 2021 19:46:00 GMT Subject: RFR: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 13:17:10 GMT, Aleksey Shipilev wrote: > Current `vmTestbase_nsk_sysdict` suite contains about 20 tests, each running exclusively. There seem to be no reason to run them exclusively, though: they complete in reasonable time, are single-threaded, and consume the usual amount of memory. > > We should consider enabling parallelism for them and get improved test performance. Currently it is blocked by `TEST.properties` with `exclusiveAccess.dirs` directives in them. > > Motivational performance improvements below. > > Before: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:45:14 ============================== > 00:45:14 Test summary > 00:45:14 ============================== > 00:45:14 TEST TOTAL PASS FAIL ERROR > 00:45:14 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:45:14 ============================== > 00:45:14 TEST SUCCESS > 00:45:14 > 00:45:15 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 45m14.839s > user 149m49.850s > sys 13m25.849s > > > After: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:03:25 ============================== > 00:03:25 Test summary > 00:03:25 ============================== > 00:03:25 TEST TOTAL PASS FAIL ERROR > 00:03:25 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:03:25 ============================== > 00:03:25 TEST SUCCESS > 00:03:25 > 00:03:25 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 3m24.702s > user 119m7.488s > sys 8m11.716s Thanks Alexey. I will run some tests, look into history of tests and will get back to you with my findings tonight (PST) or tomorrow. ------------- PR: https://git.openjdk.java.net/jdk/pull/5389 From coleenp at openjdk.java.net Wed Sep 8 22:06:05 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Wed, 8 Sep 2021 22:06:05 GMT Subject: RFR: 8266936: Add a finalization JFR event [v10] In-Reply-To: References: Message-ID: On Fri, 27 Aug 2021 15:23:35 GMT, Markus Gr?nlund wrote: >> Greetings, >> >> Object.finalize() was deprecated in JDK9. There is an ongoing effort to replace and mitigate Object.finalize() uses in the JDK libraries; please see https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. >> >> We also like to assist users in replacing and mitigating uses in non-JDK code. >> >> Hence, this changeset adds a periodic JFR event to help identify which classes are overriding Object.finalize(). >> >> Thanks >> Markus > > Markus Gr?nlund has updated the pull request incrementally with three additional commits since the last revision: > > - localize > - cleanup > - FinalizerStatistics I have some general comments and questions about this code. src/hotspot/share/services/classLoadingService.cpp line 80: > 78: > 79: size_t ClassLoadingService::compute_class_size(InstanceKlass* k) { > 80: // lifted from ClassStatistics.do_class(Klass* k) Can you remove this line? I think that function is gone now. src/hotspot/share/services/finalizerService.cpp line 44: > 42: _ik(ik), > 43: _objects_on_heap(0), > 44: _total_finalizers_run(0) {} Is this hashtable for every InstanceKlass that defines a finalizer? How many are there generally? Why couldn't this be a simple hashtable like ResourceHashtable (soon to be renamed) which you can write in only a few lines of code? src/hotspot/share/services/finalizerService.cpp line 114: > 112: > 113: static inline void added() { > 114: set_atomic(&_count); Why isn't Atomic::inc() good enough here? It's used everywhere else. src/hotspot/share/services/finalizerService.cpp line 123: > 121: static inline uintx hash_function(const InstanceKlass* ik) { > 122: assert(ik != nullptr, "invariant"); > 123: return primitive_hash(ik); If the hash function is primitive_hash, this hash is good enough to not need rehashing. The only reason for the rehashing for symbol and string table was that the char* had a dumb hash that was faster but could be hacked, so it needed to become a different hashcode. This doesn't need rehashing. src/hotspot/share/services/finalizerService.cpp line 485: > 483: void FinalizerService::purge_unloaded() { > 484: assert_locked_or_safepoint(ClassLoaderDataGraph_lock); > 485: ClassLoaderDataGraph::classes_unloading_do(&on_unloading); Since you remove entries on unloading, I don't see any reason to have any concurrent cleanup. You do however need in the lookup code, some code that doesn't find the InstanceKlass if !ik->is_loader_alive() ------------- PR: https://git.openjdk.java.net/jdk/pull/4731 From david.holmes at oracle.com Wed Sep 8 22:08:07 2021 From: david.holmes at oracle.com (David Holmes) Date: Thu, 9 Sep 2021 08:08:07 +1000 Subject: [EXTERNAL] RFC: call report_java_out_of_memory_error() for -XX:AbortVMOnException=java.lang.OutOfMemoryError In-Reply-To: References: <4ef699cc-a5bb-f93c-c62a-ef9d6cbd2e4f@amazon.com> <6ac33111-de76-3606-4a5e-817f115dacab@oracle.com> <4ee742a3-ec29-5f54-d9b3-557cd09148b3@amazon.com> Message-ID: <9a2a3b98-de10-3ba9-1c2f-8a9904f3ed70@oracle.com> On 9/09/2021 4:48 am, Liu, Xin wrote: > hi, Volker, > > I think it's possible to allow OnError=jcmd to attach to the parent > process. HotSpot defines OnError as "Run user-defined commands on fatal > error; see VMError.cpp for examples". It's a callback for fatal errors. > fatal() means HotSpot starts aborting and does not notify other threads. > In other words, other threads are in normal states. I observe so in > gdb. All other threads are successful to enter safepoint safe state > except the main java thread. > > I am not advocating using jcmd %p in OnError. I am exploring a > possibility. Currently, we will end up a deadlock if you do so. If we > made it, we would at least get more information from Hotspot. We will > fail-fast if something bad happen. I think fail-fast is still better > than a hanging process. It may be possible to fix the safepoint deadlock by transitioning the thread executing the OnError command to _thread_in_native beforehand - but there are constraints on doing that e.g. no oocks can be held. And if the error is processed in the VMThread then there is nothing that can be done. But I agree with Volker that given a fatal error has been encountered, trying to report other information about the VM in a live manner is fraught with peril. Using a core dump for post mortem analysis would probably be better. Cheers, David > thanks, > --lx > > > > > On 9/8/21 10:35 AM, Volker Simonis wrote: >> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. >> >> >> >> I'm not sure if running a jcmd process which attaches to the dying VM >> as part of the OnError scripts is a use case we really want to >> support? >> >> There's a reason why the VM is crashing and attaching to this dying VM >> will most probably only cause other follow-up errors. >> >> On Wed, Sep 8, 2021 at 7:22 PM Liu, Xin wrote: >>> >>> Hi, David, >>> >>> Thanks for the head-up. yes, it works for me. >>> >>> There's one more thing. One drawback is that the script providing to >>> OnError can't trap hotspot itself or we end up with a deadlock. >>> >>> >>> If we use 'jcmd %p Thread.print' or 'jcmd %p GC.heap_dump ' in >>> OnError=, (%p means the java process itself), the main java thread which >>> is waiting for os::fork_and_exec(cmd) will prevent hotspot reach to the >>> safepoint. It's deadlock because no safepoint mean fork_and_exec can't >>> complete. >>> >>> eg. >>> $java -Xmx50m -XX:AbortVMOnException=java.lang.OutOfMemoryError >>> -XX:OnError='jcmd %p Thread.print' -XX:+SafepointTimeout OomDumpExample >>> direct >>> # To suppress the following error report, specify this argument >>> # after -XX: or in .hotspotrc: SuppressErrorAt=/exceptions.cpp:541 >>> # >>> # A fatal error has been detected by the Java Runtime Environment: >>> # >>> # Internal Error >>> (/home/xxinliu/Devel/jdk/src/hotspot/share/utilities/exceptions.cpp:541), pid=107552, >>> tid=107553 >>> # fatal error: Saw java.lang.OutOfMemoryError, aborting >>> # >>> # JRE version: OpenJDK Runtime Environment (18.0) (slowdebug build >>> 18-internal+0-adhoc.xxinliu.jdk) >>> # Java VM: OpenJDK 64-Bit Server VM (slowdebug >>> 18-internal+0-adhoc.xxinliu.jdk, mixed mode, tiered, compressed oops, >>> compressed class ptrs, g1 gc, linux-amd64) >>> # Problematic frame: >>> # V [libjvm.so+0x924e8c] Exceptions::debug_check_abort(char const*, >>> char const*)+0x8a >>> # >>> # No core dump will be written. Core dumps have been disabled. To enable >>> core dumping, try "ulimit -c unlimited" before starting Java again >>> # >>> # An error report file with more information is saved as: >>> # /local/home/xxinliu/JDK-2085/hs_err_pid107552.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # https://bugreport.java.com/bugreport/crash.jsp >>> # >>> # >>> # -XX:OnError="jcmd %p Thread.print" >>> # Executing /bin/sh -c "jcmd 107552 Thread.print" ... >>> 107552: >>> [13.045s][warning][safepoint] >>> [13.045s][warning][safepoint] # SafepointSynchronize::begin: Timeout >>> detected: >>> [13.045s][warning][safepoint] # SafepointSynchronize::begin: Timed out >>> while spinning to reach a safepoint. >>> [13.045s][warning][safepoint] # SafepointSynchronize::begin: Threads >>> which did not reach the safepoint: >>> [13.045s][warning][safepoint] # "main" #1 prio=5 os_prio=0 cpu=1552.12ms >>> elapsed=13.04s tid=0x00007f43600278e0 nid=107553 runnable >>> [0x00007f4369d9f000] >>> [13.045s][warning][safepoint] java.lang.Thread.State: RUNNABLE >>> [13.045s][warning][safepoint] Thread: 0x00007f43600278e0 [0x1a421] >>> State: _running _at_poll_safepoint 0 >>> [13.045s][warning][safepoint] JavaThread state: _thread_in_vm >>> [13.045s][warning][safepoint] >>> [13.045s][warning][safepoint] # SafepointSynchronize::begin: (End of list) >>> >>> >>> I haven't figured out how yet, but I think I can lift this constraint. >>> Once I did, OnError would have more freedom to dump thread or heap >>> before dieing. Can I file bug about this? >>> >>> thanks, >>> --lx >>> >>> >>> On 8/30/21 9:26 PM, David Holmes wrote: >>>> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. >>>> >>>> >>>> >>>> Hi, >>>> >>>> On 28/08/2021 4:54 am, Liu, Xin wrote: >>>>> Hi, >>>>> >>>>> Recently I revisit JDK-8155004/JDK-8257790 because a new team trip over. >>>>> -XX:AbortVMOnException=java.lang.OutOfMemoryError works. I wonder >>>>> whether it is a good idea to call report_java_out_of_memory_error() when >>>>> OOME is trapped. In this way, HotSpot will trigger OnOutOfMemoryError >>>>> callbacks. >>>> >>>> Why not just use AbortVMOnException together with OnError to get the >>>> callbacks? >>>> >>>> Cheers, >>>> David >>>> >>>>> I understand JDK-8257790 is not a bug. I don't want to overthrow that >>>>> conclusion. I just wonder if we can handle it better in the presence of >>>>> -XX:AbortVMOnException=java.lang.OutOfMemoryError. >>>>> >>>>> For Java webservers, OOME may lead to a zombie process. We may have a >>>>> bug in code or indeed run out of memory. OOME is suppressed or terminate >>>>> the thread but don't terminate the java process. eg. >>>>> >>>>> public class Main { >>>>> volatile static boolean done = false; >>>>> >>>>> public static void main(String[] args) { >>>>> String msg = "a long long message."; >>>>> // write your code here >>>>> Runnable runnable = () -> { >>>>> int cnt = Integer.MAX_VALUE / msg.length() + 1; >>>>> //it will throw a OutOfMemoryError. >>>>> msg.repeat(cnt); >>>>> done = true; >>>>> }; >>>>> >>>>> Thread thread = new Thread(runnable); >>>>> thread.start(); >>>>> while(!done) { >>>>> } // this simulates the main loop of event handling >>>>> } >>>>> } >>>>> >>>>> Java developers can use >>>>> -XX:AbortVMOnException=java.lang.OutOfMemoryError to exercise fail-fast >>>>> principle. Java web application which handle traffics are usually >>>>> distributed in a cluster. A failure of a single host usually is not a >>>>> big deal. As long as java exits, it's easy to restart and backfill it. >>>>> >>>>> My proposing change is very simple. Just call >>>>> report_java_out_of_memory() if value_string is OOME. It's no-op if users >>>>> never specify anything. If they do specify flags like >>>>> Crash/ExitOnOutOfMemory, OnOutOfMemoryError or >>>>> HeapDumpOnOutOfMemoryError, HotSpot will let report_java_out_of_memory >>>>> does the cleanup job. fatal() works but too brutal. I think we should >>>>> let java exits with error code. >>>>> >>>>> >>>>> diff --git a/src/hotspot/share/utilities/exceptions.cpp >>>>> b/src/hotspot/share/utilities/exceptions.cpp >>>>> index bd95b8306be..fd8a83deaf3 100644 >>>>> --- a/src/hotspot/share/utilities/exceptions.cpp >>>>> +++ b/src/hotspot/share/utilities/exceptions.cpp >>>>> @@ -538,6 +538,9 @@ void Exceptions::debug_check_abort(const char >>>>> *value_string, const char* message >>>>> strstr(value_string, AbortVMOnException)) { >>>>> if (AbortVMOnExceptionMessage == NULL || (message != NULL && >>>>> strstr(message, AbortVMOnExceptionMessage))) { >>>>> + if(!strcmp(value_string, "java.lang.OutOfMemoryError")) { >>>>> + report_java_out_of_memory(message); >>>>> + } >>>>> fatal("Saw %s, aborting", value_string); >>>>> } >>>>> } >>>>> >>>>> >>>>> thanks, >>>>> --lx >>>>> From dholmes at openjdk.java.net Wed Sep 8 22:47:03 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 8 Sep 2021 22:47:03 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 19:33:51 GMT, Yumin Qi wrote: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Tests: ter1-4 > > Thanks > Yumin Hi Yumin, > Changed cdsOffsets.cpp to cdsConstants.cpp This is not showing up in the PR as a rename but as a new file. So there is no way to know what changes you may have made inside cdsConstants.cpp. The header file change shows as a rename. David ------------- PR: https://git.openjdk.java.net/jdk/pull/5423 From dcubed at openjdk.java.net Wed Sep 8 23:15:09 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 8 Sep 2021 23:15:09 GMT Subject: Integrated: 8273109: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest times out In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 19:37:30 GMT, Mikhailo Seledtsov wrote: >> A trivial fix to increase the timeouts for the two sub-tests in >> runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java. > > Looks good to me. @mseledts - Thanks for the review. It was after the integration so you won't be listed. Sorry about that. ------------- PR: https://git.openjdk.java.net/jdk/pull/5422 From dholmes at openjdk.java.net Wed Sep 8 23:21:00 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 8 Sep 2021 23:21:00 GMT Subject: RFR: 8273487: Zero: Handle "zero" variant in runtime tests [v2] In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 13:25:27 GMT, Aleksey Shipilev wrote: >> JDK-8179317 rewritten runtime shell tests to Java. There is a little omission in VM variant selection, which makes Zero fail some of the tier1 tests, like: >> >> >> $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/StackGap/TestStackGap.java >> >> STDERR: >> java.lang.Error: TESTBUG: unsupported vm variant >> at jdk.test.lib.Platform.variant(Platform.java:368) >> at jdk.test.lib.Platform.jvmLibDir(Platform.java:357) >> at jdk.test.lib.process.ProcessTools.addJvmLib(ProcessTools.java:585) >> at jdk.test.lib.process.ProcessTools.createNativeTestProcessBuilder(ProcessTools.java:575) >> >> >> Additional testing: >> - [x] Linux x86_64 Zero affected tests (StackGap, StackGuardPages, TestTLS) now run > > Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: > > Build system awkwardness ensues Marked as reviewed by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5413 From dholmes at openjdk.java.net Thu Sep 9 00:38:14 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 9 Sep 2021 00:38:14 GMT Subject: RFR: 8273516: ProblemList compiler/c2/Test7179138_1.java in -Xcomp mode on win-X64 In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 00:26:15 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList compiler/c2/Test7179138_1.java in -Xcomp mode on win-X64. Marked as reviewed by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5429 From dcubed at openjdk.java.net Thu Sep 9 00:38:14 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Thu, 9 Sep 2021 00:38:14 GMT Subject: RFR: 8273516: ProblemList compiler/c2/Test7179138_1.java in -Xcomp mode on win-X64 Message-ID: A trivial fix to ProblemList compiler/c2/Test7179138_1.java in -Xcomp mode on win-X64. ------------- Commit messages: - 8273516: ProblemList compiler/c2/Test7179138_1.java in -Xcomp mode on win-X64 Changes: https://git.openjdk.java.net/jdk/pull/5429/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5429&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273516 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5429.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5429/head:pull/5429 PR: https://git.openjdk.java.net/jdk/pull/5429 From dcubed at openjdk.java.net Thu Sep 9 00:42:06 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Thu, 9 Sep 2021 00:42:06 GMT Subject: Integrated: 8273516: ProblemList compiler/c2/Test7179138_1.java in -Xcomp mode on win-X64 In-Reply-To: References: Message-ID: <2JTmwcx91SrWjJc-S1NazwivueHTWLEv7pO6sNjg88o=.ac449202-9826-4c4a-b013-4f4222711072@github.com> On Thu, 9 Sep 2021 00:26:15 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList compiler/c2/Test7179138_1.java in -Xcomp mode on win-X64. This pull request has now been integrated. Changeset: 12f0b771 Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk/commit/12f0b771791614b8a41fc2c62d34481f911109b0 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod 8273516: ProblemList compiler/c2/Test7179138_1.java in -Xcomp mode on win-X64 Reviewed-by: dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5429 From dcubed at openjdk.java.net Thu Sep 9 00:42:06 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Thu, 9 Sep 2021 00:42:06 GMT Subject: RFR: 8273516: ProblemList compiler/c2/Test7179138_1.java in -Xcomp mode on win-X64 In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 00:33:31 GMT, David Holmes wrote: >> A trivial fix to ProblemList compiler/c2/Test7179138_1.java in -Xcomp mode on win-X64. > > Marked as reviewed by dholmes (Reviewer). @dholmes-ora - Thanks for the fast review! ------------- PR: https://git.openjdk.java.net/jdk/pull/5429 From dholmes at openjdk.java.net Thu Sep 9 01:12:00 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 9 Sep 2021 01:12:00 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 06:12:21 GMT, Yasumasa Suenaga wrote: > We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. > > `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. > > `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. > They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. > > > share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); > share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); > > share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " > > share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); > share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); > share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); > > > I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` > > In addition, we might see following logs which relate to UL: > > > [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied > [0.000s][error][logging] Invalid tag 'aaa' in log selection. > [0.000s][error][logging] Invalid level 'aaa' in log selection. > [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). > [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file > [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. Hi Yasumasa, Functional changes look good. A few issues with comments and a request with the documentation change. Thanks, David src/hotspot/share/logging/logConfiguration.cpp line 413: > 411: // (options for existing output can't be applied.) > 412: // StdoutLog and StderrLog are already instantiated at static initializer > 413: // in logFileStreamOutput.cpp. Suggested rewording to resolve a number of grammatical issues: // Normally options can't be used to change an existing output (parse_log_arguments() will // report an error), and both StdoutLog and StderrLog are created by static initializers, so we have // to process their options (e.g. foldmultilines) directly first. src/hotspot/share/logging/logConfiguration.cpp line 417: > 415: strcmp("stdout", output) == 0 || strcmp("#0", output) == 0) { > 416: success = StdoutLog.parse_options(output_options, &ss); > 417: // We are no longer to need to pass output options to parse_log_arguments(). // We no longer need to pass ... src/hotspot/share/logging/logConfiguration.cpp line 421: > 419: } else if (strcmp("stderr", output) == 0 || strcmp("#1", output) == 0) { > 420: success = StderrLog.parse_options(output_options, &ss); > 421: // We are no longer to need to pass output options to parse_log_arguments(). // We no longer need to pass ... src/hotspot/share/logging/logConfiguration.cpp line 582: > 580: LogTagSet::describe_tagsets(out); > 581: > 582: out->print_cr("\nAvailable log output options:"); It doesn't seem right to me to have a section on output options first, but the way the rest of this section is structured makes it awkward to ordering things appropriately. Ideally, to me, we would have this order: - Available log outputs - Available log output options - Additional file output options test/hotspot/jtreg/runtime/logging/FoldMultilinesTest.java line 44: > 42: private static String EXCEPTION_MESSAGE = "line 1\nline 2\\nstring"; > 43: private static String FOLDED_EXCEPTION_MESSAGE = "line 1\\nline 2\\\\nstring"; > 44: // Windows may out "\r\n" even though UL outs "\n" only, so we need to evaluate regex with \R. s/out/output Though you should always use \R to get a regex match on new-lines so I'm not sure you need to say anything. ------------- Changes requested by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5407 From mseledtsov at openjdk.java.net Thu Sep 9 02:03:05 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Thu, 9 Sep 2021 02:03:05 GMT Subject: RFR: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 13:17:10 GMT, Aleksey Shipilev wrote: > Current `vmTestbase_nsk_sysdict` suite contains about 20 tests, each running exclusively. There seem to be no reason to run them exclusively, though: they complete in reasonable time, are single-threaded, and consume the usual amount of memory. > > We should consider enabling parallelism for them and get improved test performance. Currently it is blocked by `TEST.properties` with `exclusiveAccess.dirs` directives in them. > > Motivational performance improvements below. > > Before: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:45:14 ============================== > 00:45:14 Test summary > 00:45:14 ============================== > 00:45:14 TEST TOTAL PASS FAIL ERROR > 00:45:14 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:45:14 ============================== > 00:45:14 TEST SUCCESS > 00:45:14 > 00:45:15 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 45m14.839s > user 149m49.850s > sys 13m25.849s > > > After: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:03:25 ============================== > 00:03:25 Test summary > 00:03:25 ============================== > 00:03:25 TEST TOTAL PASS FAIL ERROR > 00:03:25 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:03:25 ============================== > 00:03:25 TEST SUCCESS > 00:03:25 > 00:03:25 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 3m24.702s > user 119m7.488s > sys 8m11.716s The internal history of the change that restricted parallelism for this test set indicates that it was a wide reaching change covering a wide set of stress tests. Based on Aleksey's comment in the PR the tests "seem to be rather short, effectively single-threaded, and memory-dense tests, so they seem to qualify for this kind of relaxation." I tend to agree with his assessment. I have also executed these tests with the change on 5 different platforms, 100 times on each platform, and found no issues. The change looks good to me. ------------- Marked as reviewed by mseledtsov (Committer). PR: https://git.openjdk.java.net/jdk/pull/5389 From ysuenaga at openjdk.java.net Thu Sep 9 02:16:26 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Thu, 9 Sep 2021 02:16:26 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v2] In-Reply-To: References: Message-ID: > We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. > > `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. > > `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. > They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. > > > share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); > share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); > > share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " > > share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); > share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); > share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); > > > I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` > > In addition, we might see following logs which relate to UL: > > > [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied > [0.000s][error][logging] Invalid tag 'aaa' in log selection. > [0.000s][error][logging] Invalid level 'aaa' in log selection. > [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). > [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file > [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: Fix comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5407/files - new: https://git.openjdk.java.net/jdk/pull/5407/files/057b06ea..65d5184b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=00-01 Stats: 32 lines in 2 files changed: 9 ins; 7 del; 16 mod Patch: https://git.openjdk.java.net/jdk/pull/5407.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5407/head:pull/5407 PR: https://git.openjdk.java.net/jdk/pull/5407 From ysuenaga at openjdk.java.net Thu Sep 9 02:16:26 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Thu, 9 Sep 2021 02:16:26 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v2] In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 01:08:51 GMT, David Holmes wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix comments > > Hi Yasumasa, > > Functional changes look good. > > A few issues with comments and a request with the documentation change. > > Thanks, > David @dholmes-ora Thanks for your comment! I fixed them in new commit. We can see following help messages with `-Xlog:help` : Available log outputs: stdout/stderr file= If the filename contains %p and/or %t, they will expand to the JVM's PID and startup timestamp, respectively. Available log output options: foldmultilines=.. - If set to true, a log event that consists of multiple lines will be folded into a single line by replacing newline characters with the sequence '' and 'n' in the output. Existing single backslash characters will also be replaced with a sequence of two backslashes so that the conversion can be reversed. This option is safe to use with UTF-8 character encodings, but other encodings may not work. Additional file output options: filesize=.. - Target byte size for log rotation (supports K/M/G suffix). If set to 0, log rotation will not trigger automatically, but can be performed manually (see the VM.log DCMD). filecount=.. - Number of files to keep in rotation (not counting the active file). If set to 0, log rotation is disabled. This will cause existing log files to be overwritten. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From dholmes at openjdk.java.net Thu Sep 9 02:29:57 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 9 Sep 2021 02:29:57 GMT Subject: RFR: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 13:17:10 GMT, Aleksey Shipilev wrote: > Current `vmTestbase_nsk_sysdict` suite contains about 20 tests, each running exclusively. There seem to be no reason to run them exclusively, though: they complete in reasonable time, are single-threaded, and consume the usual amount of memory. > > We should consider enabling parallelism for them and get improved test performance. Currently it is blocked by `TEST.properties` with `exclusiveAccess.dirs` directives in them. > > Motivational performance improvements below. > > Before: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:45:14 ============================== > 00:45:14 Test summary > 00:45:14 ============================== > 00:45:14 TEST TOTAL PASS FAIL ERROR > 00:45:14 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:45:14 ============================== > 00:45:14 TEST SUCCESS > 00:45:14 > 00:45:15 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 45m14.839s > user 149m49.850s > sys 13m25.849s > > > After: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:03:25 ============================== > 00:03:25 Test summary > 00:03:25 ============================== > 00:03:25 TEST TOTAL PASS FAIL ERROR > 00:03:25 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:03:25 ============================== > 00:03:25 TEST SUCCESS > 00:03:25 > 00:03:25 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 3m24.702s > user 119m7.488s > sys 8m11.716s Marked as reviewed by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5389 From dholmes at openjdk.java.net Thu Sep 9 02:33:00 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 9 Sep 2021 02:33:00 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v2] In-Reply-To: References: Message-ID: <9h1S3F4v2axjCLbCjhchXMc2-A4gDU9r1StLLwcIsW8=.48e683ef-c87c-48a0-b232-83919c350f2a@github.com> On Thu, 9 Sep 2021 02:16:26 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: > > Fix comments Updates look good to me. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5407 From minqi at openjdk.java.net Thu Sep 9 03:16:02 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Thu, 9 Sep 2021 03:16:02 GMT Subject: RFR: 8271569: Change cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 22:44:14 GMT, David Holmes wrote: > Hi Yumin, > > > Changed cdsOffsets.cpp to cdsConstants.cpp > > This is not showing up in the PR as a rename but as a new file. So there is no way to know what changes you may have made inside cdsConstants.cpp. The header file change shows as a rename. > > David Hi, David git did not rename the 'old' to 'new' so the patch showed cdsConstants.cpp as a 'new' file. So I will change description as you indicated. Thanks Yumin ------------- PR: https://git.openjdk.java.net/jdk/pull/5423 From david.holmes at oracle.com Thu Sep 9 04:00:58 2021 From: david.holmes at oracle.com (David Holmes) Date: Thu, 9 Sep 2021 14:00:58 +1000 Subject: RFR: 8271569: Change cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: <36f4f278-8052-db3e-ae88-793f47dae48b@oracle.com> On 9/09/2021 1:16 pm, Yumin Qi wrote: > On Wed, 8 Sep 2021 22:44:14 GMT, David Holmes wrote: > >> Hi Yumin, >> >>> Changed cdsOffsets.cpp to cdsConstants.cpp >> >> This is not showing up in the PR as a rename but as a new file. So there is no way to know what changes you may have made inside cdsConstants.cpp. The header file change shows as a rename. >> >> David > > Hi, David > git did not rename the 'old' to 'new' so the patch showed cdsConstants.cpp as a 'new' file. So I will change description as you indicated. Thanks ?? I'd rather you try again and do a rename :) Otherwise please advise what, if any, changes were actually made to the "new" file? Thanks, David > Yumin > > ------------- > > PR: https://git.openjdk.java.net/jdk/pull/5423 > From minqi at openjdk.java.net Thu Sep 9 04:28:01 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Thu, 9 Sep 2021 04:28:01 GMT Subject: RFR: 8271569: Change cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 22:44:14 GMT, David Holmes wrote: >> Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. >> The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. >> >> Tests: ter1-4 >> >> Thanks >> Yumin > > Hi Yumin, > >> Changed cdsOffsets.cpp to cdsConstants.cpp > > This is not showing up in the PR as a rename but as a new file. So there is no way to know what changes you may have made inside cdsConstants.cpp. The header file change shows as a rename. > > David @dholmes-ora I see your point here --- let me redo the patch using rename. ------------- PR: https://git.openjdk.java.net/jdk/pull/5423 From minqi at openjdk.java.net Thu Sep 9 04:34:06 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Thu, 9 Sep 2021 04:34:06 GMT Subject: Withdrawn: 8271569: Change cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 19:33:51 GMT, Yumin Qi wrote: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Tests: ter1-4 > > Thanks > Yumin This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5423 From ysuenaga at openjdk.java.net Thu Sep 9 05:32:01 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Thu, 9 Sep 2021 05:32:01 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v2] In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 02:16:26 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: > > Fix comments My latest change failed on InfoOptsTest, but it seems to be a bug in InfoOptsTest, does not be caused by this PR: InfoOptsTest.jtr Main [-fullversion, -fullversion] [] rc:0 javac/DIRECT: javac full version "18-internal+0-YaSuenag-65d5184b8598c255c78269e2c30b900d33af8416" >>>>> Expected string appears more than once: 18 java.lang.Exception: 1 errors occurred at OptionModesTester.runTests(OptionModesTester.java:81) at InfoOptsTest.main(InfoOptsTest.java:41) OptionModesTester.java TestResult checkUniqueLog(Log l, String... uniqueExpects) { String log = logs.get(l); for (String e : uniqueExpects) { if (!log.contains(e)) { error("Expected string not found: " + e); } else if (log.indexOf(e) != log.lastIndexOf(e)) { error("Expected string appears more than once: " + e); } } return this; } My commit hash has "18" in the string (`65d5184b8598c255c78269e2c30b900d33af8416`), so `log.indexOf(e) != log.lastIndexOf(e)` is true if `e` is "18" (feature version). I will file it to JBS later. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From iklam at openjdk.java.net Thu Sep 9 06:02:04 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 9 Sep 2021 06:02:04 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v2] In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 02:16:26 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: > > Fix comments Also, if the user specifies foldmultilines multiple times for stdout/stderr -Xlog:exceptions:::foldmultilines=true -Xlog:cds:::foldmultilines=false Do we (or should) we print a warning message? Today we'd get an warning with a command like the following, and the second foldmultilines=false is ignored. I think stdout/stderr should have the same behavior. (But the current message is too vague and should be improved, maybe in a different RFE). $ java -Xlog:exceptions:file=foo::foldmultilines=true -Xlog:cds:file=foo::foldmultilines=false XXX [0.000s][warning][logging] Output options for existing outputs are ignored. Error: Could not find or load main class XXX Caused by: java.lang.ClassNotFoundException: XXX test/hotspot/jtreg/runtime/logging/FoldMultilinesTest.java line 102: > 100: test("file=" + EXCEPTION_LOG_FILE); > 101: test("stdout"); > 102: test("stderr"); I think we should add a case whe the output is not explicitly specified. I.e., -Xlog:exceptions=info:::foldmultilines=true ------------- Changes requested by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5407 From stuefe at openjdk.java.net Thu Sep 9 06:57:04 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Thu, 9 Sep 2021 06:57:04 GMT Subject: RFR: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero In-Reply-To: References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: <6bO07HAoHeelMAFPcfDNJQqgeGVpprkgIgySe9Ok0gs=.6af09365-94f1-4c4d-a80d-e7fb39e0634e@github.com> On Wed, 8 Sep 2021 09:19:12 GMT, Aleksey Shipilev wrote: > > Bottomline, we should either be using `pthread_attr_getstack(3)` or our `_initial_thread_stack_(bottom|size)` but not mix them since they may differ. Therefore the proposed patch is correct. The non-zero version of `current_stack_region()` in os_linux.cpp handles the primordial thread stack correctly. > > Yes, that seems to be the gist of it. In fact, if I reply `_initial_thread_stack_(bottom|size)` in Zero version of `current_stack_region()` for a primordial thread, gtests also start to pass. But I gather there is no need to continue supporting Zero-specific `current_stack_region()`, and thus dodge the issue altogether by using the code the rest of VM code uses. Yes, and zero also needs Goetz' fix for the glibc guard size problem in JDK-8169373. ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From stuefe at openjdk.java.net Thu Sep 9 07:00:07 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Thu, 9 Sep 2021 07:00:07 GMT Subject: RFR: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero In-Reply-To: References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: On Wed, 8 Sep 2021 10:21:36 GMT, Aleksey Shipilev wrote: > I looked around Debian's support for IA64, and I think we don't want to drop the support for it just yet. Zero VM is one of those last stands for weird arches portability :) Instead of adding the `IA64` block to a shared code, I shall try to make a more conservative fix to Zero-specific code then... I'd be surprised if it still works in JDK 18 though. The latest they build is 15. ia64 breaks so easily, and no one took care of it in the recent past. ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From david.holmes at oracle.com Thu Sep 9 07:46:57 2021 From: david.holmes at oracle.com (David Holmes) Date: Thu, 9 Sep 2021 17:46:57 +1000 Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v2] In-Reply-To: References: Message-ID: On 9/09/2021 3:32 pm, Yasumasa Suenaga wrote: > My commit hash has "18" in the string (`65d5184b8598c255c78269e2c30b900d33af8416`), so `log.indexOf(e) != log.lastIndexOf(e)` is true if `e` is "18" (feature version). > > I will file it to JBS later. I'm pretty sure this has already been seen and reported. David > ------------- > > PR: https://git.openjdk.java.net/jdk/pull/5407 > From shade at openjdk.java.net Thu Sep 9 08:10:10 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 9 Sep 2021 08:10:10 GMT Subject: Integrated: 8273487: Zero: Handle "zero" variant in runtime tests In-Reply-To: References: Message-ID: <5FZ8wHoYKStQS8Vipmacd9L_xUmUpo0lsKjhFA6ALeE=.9282d76e-f1d8-441e-a6e9-d968328213bf@github.com> On Wed, 8 Sep 2021 10:57:33 GMT, Aleksey Shipilev wrote: > JDK-8179317 rewritten runtime shell tests to Java. There is a little omission in VM variant selection, which makes Zero fail some of the tier1 tests, like: > > > $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/StackGap/TestStackGap.java > > STDERR: > java.lang.Error: TESTBUG: unsupported vm variant > at jdk.test.lib.Platform.variant(Platform.java:368) > at jdk.test.lib.Platform.jvmLibDir(Platform.java:357) > at jdk.test.lib.process.ProcessTools.addJvmLib(ProcessTools.java:585) > at jdk.test.lib.process.ProcessTools.createNativeTestProcessBuilder(ProcessTools.java:575) > > > Additional testing: > - [x] Linux x86_64 Zero affected tests (StackGap, StackGuardPages, TestTLS) now run This pull request has now been integrated. Changeset: 8c16f485 Author: Aleksey Shipilev URL: https://git.openjdk.java.net/jdk/commit/8c16f485b341ee3071c91df39dfb9ba8b9caa44d Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod 8273487: Zero: Handle "zero" variant in runtime tests Reviewed-by: alanb, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5413 From shade at openjdk.java.net Thu Sep 9 08:10:09 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 9 Sep 2021 08:10:09 GMT Subject: RFR: 8273487: Zero: Handle "zero" variant in runtime tests [v2] In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 13:25:27 GMT, Aleksey Shipilev wrote: >> JDK-8179317 rewritten runtime shell tests to Java. There is a little omission in VM variant selection, which makes Zero fail some of the tier1 tests, like: >> >> >> $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/StackGap/TestStackGap.java >> >> STDERR: >> java.lang.Error: TESTBUG: unsupported vm variant >> at jdk.test.lib.Platform.variant(Platform.java:368) >> at jdk.test.lib.Platform.jvmLibDir(Platform.java:357) >> at jdk.test.lib.process.ProcessTools.addJvmLib(ProcessTools.java:585) >> at jdk.test.lib.process.ProcessTools.createNativeTestProcessBuilder(ProcessTools.java:575) >> >> >> Additional testing: >> - [x] Linux x86_64 Zero affected tests (StackGap, StackGuardPages, TestTLS) now run > > Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: > > Build system awkwardness ensues I am integrating this to get the more complete `tier1` runs for Zero, and then I would tackle JDK-8273494. ------------- PR: https://git.openjdk.java.net/jdk/pull/5413 From mbaesken at openjdk.java.net Thu Sep 9 09:29:14 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 9 Sep 2021 09:29:14 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current Message-ID: 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid that would be helpful too and can be added to the OSContainer API . pids.current : A read-only single value file which exists on all cgroups. The number of processes currently in the cgroup and its descendants. Best regards, Matthias ------------- Commit messages: - JDK-8273526 Changes: https://git.openjdk.java.net/jdk/pull/5437/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5437&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273526 Stats: 104 lines in 15 files changed: 102 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5437.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5437/head:pull/5437 PR: https://git.openjdk.java.net/jdk/pull/5437 From ysuenaga at openjdk.java.net Thu Sep 9 09:30:35 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Thu, 9 Sep 2021 09:30:35 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v3] In-Reply-To: References: Message-ID: > We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. > > `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. > > `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. > They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. > > > share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); > share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); > > share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " > > share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); > share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); > share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); > > > I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` > > In addition, we might see following logs which relate to UL: > > > [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied > [0.000s][error][logging] Invalid tag 'aaa' in log selection. > [0.000s][error][logging] Invalid level 'aaa' in log selection. > [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). > [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file > [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. Yasumasa Suenaga 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 revision: - Merge remote-tracking branch 'upstream/master' into JDK-8273471 - Add test for default log output (stdout) - Fix comments - 8273471: Add foldmultilines to UL for stdout/err ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5407/files - new: https://git.openjdk.java.net/jdk/pull/5407/files/65d5184b..668ec10c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=01-02 Stats: 2708 lines in 187 files changed: 1434 ins; 456 del; 818 mod Patch: https://git.openjdk.java.net/jdk/pull/5407.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5407/head:pull/5407 PR: https://git.openjdk.java.net/jdk/pull/5407 From ysuenaga at openjdk.java.net Thu Sep 9 09:30:37 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Thu, 9 Sep 2021 09:30:37 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v2] In-Reply-To: References: Message-ID: <67YJHnuujM2J3p7_o6Q-eAwBL7DIYdydsXg6c2TDeJ8=.8b0aca35-970e-4303-a2a6-f91dfc99fa67@github.com> On Thu, 9 Sep 2021 05:58:43 GMT, Ioi Lam wrote: > Also, if the user specifies foldmultilines multiple times for stdout/stderr > > ``` > -Xlog:exceptions:::foldmultilines=true -Xlog:cds:::foldmultilines=false > ``` > > Do we (or should) we print a warning message? > > Today we'd get an warning with a command like the following, and the second foldmultilines=false is ignored. I think stdout/stderr should have the same behavior. (But the current message is too vague and should be improved, maybe in a different RFE). I saw same issue in JDK 16, so I want to fix it as another RFE. I will file it later. $ /usr/lib/jvm/java-16-openjdk/bin/java -Xlog:os=warning:file=test.log::filecount=1 -Xlog:exceptions= info:file=test.log::filecount=1 --version [0.000s][warning][logging] Output options for existing outputs are ignored. openjdk 16.0.2 2021-07-20 OpenJDK Runtime Environment 21.3 (build 16.0.2+7) OpenJDK 64-Bit Server VM 21.3 (build 16.0.2+7, mixed mode, sharing) So can you review this change? > test/hotspot/jtreg/runtime/logging/FoldMultilinesTest.java line 102: > >> 100: test("file=" + EXCEPTION_LOG_FILE); >> 101: test("stdout"); >> 102: test("stderr"); > > I think we should add a case whe the output is not explicitly specified. I.e., > > > -Xlog:exceptions=info:::foldmultilines=true I added test for this pattern in new commit. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From ysuenaga at openjdk.java.net Thu Sep 9 09:30:40 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Thu, 9 Sep 2021 09:30:40 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v2] In-Reply-To: References: Message-ID: <3VqeyDdixlyCrxYMiDOcRMoVsbyU7q9aZO_kFavDVak=.ae17b15b-1f35-4785-8e2a-f1b4e6a2d86e@github.com> On Thu, 9 Sep 2021 02:16:26 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: > > Fix comments > _Mailing list message from [David Holmes](mailto:david.holmes at oracle.com) on [hotspot-runtime-dev](mailto:hotspot-runtime-dev at mail.openjdk.java.net):_ > > On 9/09/2021 3:32 pm, Yasumasa Suenaga wrote: > > > My commit hash has "18" in the string (`65d5184b8598c255c78269e2c30b900d33af8416`), so `log.indexOf(e) != log.lastIndexOf(e)` is true if `e` is "18" (feature version). > > I will file it to JBS later. > > I'm pretty sure this has already been seen and reported. Thanks! I think it is https://github.com/openjdk/jdk/commit/267c61a16a916e35762e8df5737ec74b06defae8 and it has been pushed 17 hours ago! I merged current HEAD of upstream, so I believe this issue has gone :) ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From xxinliu at amazon.com Thu Sep 9 10:00:17 2021 From: xxinliu at amazon.com (Liu, Xin) Date: Thu, 9 Sep 2021 03:00:17 -0700 Subject: RFC: call report_java_out_of_memory_error() for -XX:AbortVMOnException=java.lang.OutOfMemoryError In-Reply-To: <9a2a3b98-de10-3ba9-1c2f-8a9904f3ed70@oracle.com> References: <4ef699cc-a5bb-f93c-c62a-ef9d6cbd2e4f@amazon.com> <6ac33111-de76-3606-4a5e-817f115dacab@oracle.com> <4ee742a3-ec29-5f54-d9b3-557cd09148b3@amazon.com> <9a2a3b98-de10-3ba9-1c2f-8a9904f3ed70@oracle.com> Message-ID: hi, Volker and David, Thanks for the comments. I follow this idea and it works. At least it works with '-XX:AbortVMOnException=java.lang.OutOfMemoryError'. I can use -XX:OnError='jcmd %p' to dump threads or heap. It can be done without a regression. https://github.com/navyxliu/jdk/actions/runs/1216082580 I found that I am not the only person trying to do so. JFR does the similar thing in even harder situation. https://github.com/openjdk/jdk/blob/master/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp#L543 Coredump works but it will generate a very big file which is hard to transfer and may contain sensitive data. Further, it's not all java developers know how to analyze a coredump. It require both executable and debuginfo. fatal() doesn't do anything disrupted, all threads should be in good shape when it executes OnError callbacks. I think we can use OnError=jcmd %p as complementary approach. It's deadlock now, we have nothing to lose. thanks, --lx On 9/8/21 3:08 PM, David Holmes wrote: > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. > > > > On 9/09/2021 4:48 am, Liu, Xin wrote: >> hi, Volker, >> >> I think it's possible to allow OnError=jcmd to attach to the parent >> process. HotSpot defines OnError as "Run user-defined commands on fatal >> error; see VMError.cpp for examples". It's a callback for fatal errors. >> fatal() means HotSpot starts aborting and does not notify other threads. >> In other words, other threads are in normal states. I observe so in >> gdb. All other threads are successful to enter safepoint safe state >> except the main java thread. >> >> I am not advocating using jcmd %p in OnError. I am exploring a >> possibility. Currently, we will end up a deadlock if you do so. If we >> made it, we would at least get more information from Hotspot. We will >> fail-fast if something bad happen. I think fail-fast is still better >> than a hanging process. > > It may be possible to fix the safepoint deadlock by transitioning the > thread executing the OnError command to _thread_in_native beforehand - > but there are constraints on doing that e.g. no oocks can be held. And > if the error is processed in the VMThread then there is nothing that can > be done. > > But I agree with Volker that given a fatal error has been encountered, > trying to report other information about the VM in a live manner is > fraught with peril. Using a core dump for post mortem analysis would > probably be better. > > Cheers, > David > >> thanks, >> --lx >> >> >> >> >> On 9/8/21 10:35 AM, Volker Simonis wrote: >>> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. >>> >>> >>> >>> I'm not sure if running a jcmd process which attaches to the dying VM >>> as part of the OnError scripts is a use case we really want to >>> support? >>> >>> There's a reason why the VM is crashing and attaching to this dying VM >>> will most probably only cause other follow-up errors. >>> >>> On Wed, Sep 8, 2021 at 7:22 PM Liu, Xin wrote: >>>> >>>> Hi, David, >>>> >>>> Thanks for the head-up. yes, it works for me. >>>> >>>> There's one more thing. One drawback is that the script providing to >>>> OnError can't trap hotspot itself or we end up with a deadlock. >>>> >>>> >>>> If we use 'jcmd %p Thread.print' or 'jcmd %p GC.heap_dump ' in >>>> OnError=, (%p means the java process itself), the main java thread which >>>> is waiting for os::fork_and_exec(cmd) will prevent hotspot reach to the >>>> safepoint. It's deadlock because no safepoint mean fork_and_exec can't >>>> complete. >>>> >>>> eg. >>>> $java -Xmx50m -XX:AbortVMOnException=java.lang.OutOfMemoryError >>>> -XX:OnError='jcmd %p Thread.print' -XX:+SafepointTimeout OomDumpExample >>>> direct >>>> # To suppress the following error report, specify this argument >>>> # after -XX: or in .hotspotrc: SuppressErrorAt=/exceptions.cpp:541 >>>> # >>>> # A fatal error has been detected by the Java Runtime Environment: >>>> # >>>> # Internal Error >>>> (/home/xxinliu/Devel/jdk/src/hotspot/share/utilities/exceptions.cpp:541), pid=107552, >>>> tid=107553 >>>> # fatal error: Saw java.lang.OutOfMemoryError, aborting >>>> # >>>> # JRE version: OpenJDK Runtime Environment (18.0) (slowdebug build >>>> 18-internal+0-adhoc.xxinliu.jdk) >>>> # Java VM: OpenJDK 64-Bit Server VM (slowdebug >>>> 18-internal+0-adhoc.xxinliu.jdk, mixed mode, tiered, compressed oops, >>>> compressed class ptrs, g1 gc, linux-amd64) >>>> # Problematic frame: >>>> # V [libjvm.so+0x924e8c] Exceptions::debug_check_abort(char const*, >>>> char const*)+0x8a >>>> # >>>> # No core dump will be written. Core dumps have been disabled. To enable >>>> core dumping, try "ulimit -c unlimited" before starting Java again >>>> # >>>> # An error report file with more information is saved as: >>>> # /local/home/xxinliu/JDK-2085/hs_err_pid107552.log >>>> # >>>> # If you would like to submit a bug report, please visit: >>>> # https://bugreport.java.com/bugreport/crash.jsp >>>> # >>>> # >>>> # -XX:OnError="jcmd %p Thread.print" >>>> # Executing /bin/sh -c "jcmd 107552 Thread.print" ... >>>> 107552: >>>> [13.045s][warning][safepoint] >>>> [13.045s][warning][safepoint] # SafepointSynchronize::begin: Timeout >>>> detected: >>>> [13.045s][warning][safepoint] # SafepointSynchronize::begin: Timed out >>>> while spinning to reach a safepoint. >>>> [13.045s][warning][safepoint] # SafepointSynchronize::begin: Threads >>>> which did not reach the safepoint: >>>> [13.045s][warning][safepoint] # "main" #1 prio=5 os_prio=0 cpu=1552.12ms >>>> elapsed=13.04s tid=0x00007f43600278e0 nid=107553 runnable >>>> [0x00007f4369d9f000] >>>> [13.045s][warning][safepoint] java.lang.Thread.State: RUNNABLE >>>> [13.045s][warning][safepoint] Thread: 0x00007f43600278e0 [0x1a421] >>>> State: _running _at_poll_safepoint 0 >>>> [13.045s][warning][safepoint] JavaThread state: _thread_in_vm >>>> [13.045s][warning][safepoint] >>>> [13.045s][warning][safepoint] # SafepointSynchronize::begin: (End of list) >>>> >>>> >>>> I haven't figured out how yet, but I think I can lift this constraint. >>>> Once I did, OnError would have more freedom to dump thread or heap >>>> before dieing. Can I file bug about this? >>>> >>>> thanks, >>>> --lx >>>> >>>> >>>> On 8/30/21 9:26 PM, David Holmes wrote: >>>>> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. >>>>> >>>>> >>>>> >>>>> Hi, >>>>> >>>>> On 28/08/2021 4:54 am, Liu, Xin wrote: >>>>>> Hi, >>>>>> >>>>>> Recently I revisit JDK-8155004/JDK-8257790 because a new team trip over. >>>>>> -XX:AbortVMOnException=java.lang.OutOfMemoryError works. I wonder >>>>>> whether it is a good idea to call report_java_out_of_memory_error() when >>>>>> OOME is trapped. In this way, HotSpot will trigger OnOutOfMemoryError >>>>>> callbacks. >>>>> >>>>> Why not just use AbortVMOnException together with OnError to get the >>>>> callbacks? >>>>> >>>>> Cheers, >>>>> David >>>>> >>>>>> I understand JDK-8257790 is not a bug. I don't want to overthrow that >>>>>> conclusion. I just wonder if we can handle it better in the presence of >>>>>> -XX:AbortVMOnException=java.lang.OutOfMemoryError. >>>>>> >>>>>> For Java webservers, OOME may lead to a zombie process. We may have a >>>>>> bug in code or indeed run out of memory. OOME is suppressed or terminate >>>>>> the thread but don't terminate the java process. eg. >>>>>> >>>>>> public class Main { >>>>>> volatile static boolean done = false; >>>>>> >>>>>> public static void main(String[] args) { >>>>>> String msg = "a long long message."; >>>>>> // write your code here >>>>>> Runnable runnable = () -> { >>>>>> int cnt = Integer.MAX_VALUE / msg.length() + 1; >>>>>> //it will throw a OutOfMemoryError. >>>>>> msg.repeat(cnt); >>>>>> done = true; >>>>>> }; >>>>>> >>>>>> Thread thread = new Thread(runnable); >>>>>> thread.start(); >>>>>> while(!done) { >>>>>> } // this simulates the main loop of event handling >>>>>> } >>>>>> } >>>>>> >>>>>> Java developers can use >>>>>> -XX:AbortVMOnException=java.lang.OutOfMemoryError to exercise fail-fast >>>>>> principle. Java web application which handle traffics are usually >>>>>> distributed in a cluster. A failure of a single host usually is not a >>>>>> big deal. As long as java exits, it's easy to restart and backfill it. >>>>>> >>>>>> My proposing change is very simple. Just call >>>>>> report_java_out_of_memory() if value_string is OOME. It's no-op if users >>>>>> never specify anything. If they do specify flags like >>>>>> Crash/ExitOnOutOfMemory, OnOutOfMemoryError or >>>>>> HeapDumpOnOutOfMemoryError, HotSpot will let report_java_out_of_memory >>>>>> does the cleanup job. fatal() works but too brutal. I think we should >>>>>> let java exits with error code. >>>>>> >>>>>> >>>>>> diff --git a/src/hotspot/share/utilities/exceptions.cpp >>>>>> b/src/hotspot/share/utilities/exceptions.cpp >>>>>> index bd95b8306be..fd8a83deaf3 100644 >>>>>> --- a/src/hotspot/share/utilities/exceptions.cpp >>>>>> +++ b/src/hotspot/share/utilities/exceptions.cpp >>>>>> @@ -538,6 +538,9 @@ void Exceptions::debug_check_abort(const char >>>>>> *value_string, const char* message >>>>>> strstr(value_string, AbortVMOnException)) { >>>>>> if (AbortVMOnExceptionMessage == NULL || (message != NULL && >>>>>> strstr(message, AbortVMOnExceptionMessage))) { >>>>>> + if(!strcmp(value_string, "java.lang.OutOfMemoryError")) { >>>>>> + report_java_out_of_memory(message); >>>>>> + } >>>>>> fatal("Saw %s, aborting", value_string); >>>>>> } >>>>>> } >>>>>> >>>>>> >>>>>> thanks, >>>>>> --lx >>>>>> From shade at openjdk.java.net Thu Sep 9 10:11:00 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 9 Sep 2021 10:11:00 GMT Subject: RFR: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero In-Reply-To: References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: <6Gb-JeNvNcDdHEXdEmdJ5LTtCvHCAb9Hd825v6UkOGY=.da6a6aae-7e59-46fd-a7d7-a9a70eda989f@github.com> On Thu, 9 Sep 2021 06:56:50 GMT, Thomas Stuefe wrote: > I'd be surprised if it still works in JDK 18 though. The latest they build is 15. ia64 breaks so easily, and no one took care of it in the recent past. Yes, but I also want the fix to be backportable to JDK 11. Which means I should probably keep whatever IA64 support there is. I'll figure this out. ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From sgehwolf at openjdk.java.net Thu Sep 9 11:02:02 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Thu, 9 Sep 2021 11:02:02 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 09:21:59 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid > that would be helpful too and can be added to the OSContainer API . > pids.current : > A read-only single value file which exists on all cgroups. > The number of processes currently in the cgroup and its descendants. > > Best regards, Matthias This could get simplified a bit as we don't need to consider `max` values for `pids.current`. src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp line 287: > 285: * OSCONTAINER_ERROR for not supported > 286: */ > 287: jlong CgroupV1Subsystem::pids_current() { `pids.current` never contains a string `max` (for unlimited). Therefore, we shouldn't need to do the `pids_current_val` -> `limit_from_str()` trick. We should be able to use `GET_CONTAINER_INFO(int, [...]` akin to `cpu_quota`. `int` or `long` would both be suitable. Up to you to decide which data type to use. I don't think it'll ever be beyond the maximum integrer value. src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1Subsystem.java line 421: > 419: public long getPidsCurrent() { > 420: String pidsCurrentStr = CgroupSubsystemController.getStringValue(pids, "pids.current"); > 421: return CgroupSubsystem.limitFromString(pidsCurrentStr); `return getLongValue(pids, "pids.current");` should be sufficient here. test/hotspot/jtreg/containers/docker/TestPids.java line 97: > 95: System.out.println("DEBUG: parts.length = " + parts.length); > 96: if (expectedValue.equals("no_value_expected")) { > 97: System.out.println("No value expected for " + lineMarker); Perhaps this debug print could say `System.out.println("Found '" + lineMarker + "' with value: '" + +"');` and actually parse the number as we'd expect an integer there? ------------- Changes requested by sgehwolf (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5437 From stuefe at openjdk.java.net Thu Sep 9 12:16:05 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Thu, 9 Sep 2021 12:16:05 GMT Subject: RFR: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero In-Reply-To: <6Gb-JeNvNcDdHEXdEmdJ5LTtCvHCAb9Hd825v6UkOGY=.da6a6aae-7e59-46fd-a7d7-a9a70eda989f@github.com> References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> <6Gb-JeNvNcDdHEXdEmdJ5LTtCvHCAb9Hd825v6UkOGY=.da6a6aae-7e59-46fd-a7d7-a9a70eda989f@github.com> Message-ID: <69A16QRQy4MBuEO_qFz24dccii9yFIpz5F-qiKFRCI0=.03a916ac-548c-4096-b959-1386c946c70a@github.com> On Thu, 9 Sep 2021 10:07:46 GMT, Aleksey Shipilev wrote: > > I'd be surprised if it still works in JDK 18 though. The latest they build is 15. ia64 breaks so easily, and no one took care of it in the recent past. > > Yes, but I also want the fix to be backportable to JDK 11. Which means I should probably keep whatever IA64 support there is. I'll figure this out. Oh right. Makes sense. ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From shade at openjdk.java.net Thu Sep 9 12:54:22 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 9 Sep 2021 12:54:22 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" Message-ID: Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. Additional testing: - [x] Linux x86_64 Zero build - [x] Linux x86_64 Zero bootcycle-images - [ ] Linux x86_64 Zero `tier1` ------------- Commit messages: - Fix Changes: https://git.openjdk.java.net/jdk/pull/5440/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5440&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273494 Stats: 14 lines in 6 files changed: 0 ins; 3 del; 11 mod Patch: https://git.openjdk.java.net/jdk/pull/5440.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5440/head:pull/5440 PR: https://git.openjdk.java.net/jdk/pull/5440 From dholmes at openjdk.java.net Thu Sep 9 13:12:01 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 9 Sep 2021 13:12:01 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 10:17:02 GMT, Aleksey Shipilev wrote: > Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. > > Additional testing: > - [x] Linux x86_64 Zero build > - [x] Linux x86_64 Zero bootcycle-images > - [ ] Linux x86_64 Zero `tier1` This does what it intends but I can't approve it via a review as the issue is more about whether this should be done. The people who own/maintain/support Zero are the ones who should be directing this. David make/autoconf/hotspot.m4 line 86: > 84: fi > 85: > 86: # All "special" variants share the same output directory ("server") I presume "zero" was a special variant? Are there any other variants remaining? make/modules/java.base/Copy.gmk line 98: > 96: DEFAULT_CFG_VARIANT ?= server > 97: > 98: # Any variant other than server, client, minimal, or zero is represented as server in Are there any other variants now? ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From shade at openjdk.java.net Thu Sep 9 13:18:04 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 9 Sep 2021 13:18:04 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 13:02:23 GMT, David Holmes wrote: >> Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. >> >> Additional testing: >> - [x] Linux x86_64 Zero build >> - [x] Linux x86_64 Zero bootcycle-images >> - [ ] Linux x86_64 Zero `tier1` > > make/autoconf/hotspot.m4 line 86: > >> 84: fi >> 85: >> 86: # All "special" variants share the same output directory ("server") > > I presume "zero" was a special variant? Are there any other variants remaining? Yes, there are at least "core" and "custom": # All valid JVM variants VALID_JVM_VARIANTS="server client minimal core zero custom" ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From shade at openjdk.java.net Thu Sep 9 13:45:10 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 9 Sep 2021 13:45:10 GMT Subject: RFR: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 19:43:09 GMT, Mikhailo Seledtsov wrote: >> Current `vmTestbase_nsk_sysdict` suite contains about 20 tests, each running exclusively. There seem to be no reason to run them exclusively, though: they complete in reasonable time, are single-threaded, and consume the usual amount of memory. >> >> We should consider enabling parallelism for them and get improved test performance. Currently it is blocked by `TEST.properties` with `exclusiveAccess.dirs` directives in them. >> >> Motivational performance improvements below. >> >> Before: >> >> >> $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s >> ... >> 00:45:14 ============================== >> 00:45:14 Test summary >> 00:45:14 ============================== >> 00:45:14 TEST TOTAL PASS FAIL ERROR >> 00:45:14 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 >> 00:45:14 ============================== >> 00:45:14 TEST SUCCESS >> 00:45:14 >> 00:45:15 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' >> >> real 45m14.839s >> user 149m49.850s >> sys 13m25.849s >> >> >> After: >> >> >> $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s >> ... >> 00:03:25 ============================== >> 00:03:25 Test summary >> 00:03:25 ============================== >> 00:03:25 TEST TOTAL PASS FAIL ERROR >> 00:03:25 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 >> 00:03:25 ============================== >> 00:03:25 TEST SUCCESS >> 00:03:25 >> 00:03:25 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' >> >> real 3m24.702s >> user 119m7.488s >> sys 8m11.716s > > Thanks Alexey. I will run some tests, look into history of tests and will get back to you with my findings tonight (PST) or tomorrow. OK, good, thanks for testing, @mseledts! I'll be on lookout if these tests start to misbehave after this relaxation. ------------- PR: https://git.openjdk.java.net/jdk/pull/5389 From shade at openjdk.java.net Thu Sep 9 13:45:11 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 9 Sep 2021 13:45:11 GMT Subject: Integrated: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 13:17:10 GMT, Aleksey Shipilev wrote: > Current `vmTestbase_nsk_sysdict` suite contains about 20 tests, each running exclusively. There seem to be no reason to run them exclusively, though: they complete in reasonable time, are single-threaded, and consume the usual amount of memory. > > We should consider enabling parallelism for them and get improved test performance. Currently it is blocked by `TEST.properties` with `exclusiveAccess.dirs` directives in them. > > Motivational performance improvements below. > > Before: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:45:14 ============================== > 00:45:14 Test summary > 00:45:14 ============================== > 00:45:14 TEST TOTAL PASS FAIL ERROR > 00:45:14 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:45:14 ============================== > 00:45:14 TEST SUCCESS > 00:45:14 > 00:45:15 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 45m14.839s > user 149m49.850s > sys 13m25.849s > > > After: > > > $ time CONF=linux-x86_64-server-fastdebug make run-test TEST=vmTestbase_nsk_sysdict | ts -s > ... > 00:03:25 ============================== > 00:03:25 Test summary > 00:03:25 ============================== > 00:03:25 TEST TOTAL PASS FAIL ERROR > 00:03:25 jtreg:test/hotspot/jtreg:vmTestbase_nsk_sysdict 20 20 0 0 > 00:03:25 ============================== > 00:03:25 TEST SUCCESS > 00:03:25 > 00:03:25 Finished building target 'run-test' in configuration 'linux-x86_64-server-fastdebug' > > real 3m24.702s > user 119m7.488s > sys 8m11.716s This pull request has now been integrated. Changeset: 5ca26cbd Author: Aleksey Shipilev URL: https://git.openjdk.java.net/jdk/commit/5ca26cbddbdd47a73cc141a6215dc89c53841d4a Stats: 20 lines in 20 files changed: 0 ins; 20 del; 0 mod 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests Reviewed-by: mseledtsov, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5389 From ysuenaga at openjdk.java.net Thu Sep 9 14:27:21 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Thu, 9 Sep 2021 14:27:21 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v4] In-Reply-To: References: Message-ID: <9ctw9Nw8tsUQcZfUENP407M8rsZQ3pn9J2iYJCDbmt0=.78ee6d04-ccd0-4b22-a534-a7b68e15372c@github.com> > We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. > > `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. > > `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. > They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. > > > share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); > share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); > > share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " > > share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); > share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); > share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); > > > I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` > > In addition, we might see following logs which relate to UL: > > > [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied > [0.000s][error][logging] Invalid tag 'aaa' in log selection. > [0.000s][error][logging] Invalid level 'aaa' in log selection. > [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). > [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file > [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: Refactoring FoldMultilinesTest ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5407/files - new: https://git.openjdk.java.net/jdk/pull/5407/files/668ec10c..6bba4376 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=02-03 Stats: 18 lines in 1 file changed: 4 ins; 10 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/5407.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5407/head:pull/5407 PR: https://git.openjdk.java.net/jdk/pull/5407 From ysuenaga at openjdk.java.net Thu Sep 9 14:27:22 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Thu, 9 Sep 2021 14:27:22 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v2] In-Reply-To: <67YJHnuujM2J3p7_o6Q-eAwBL7DIYdydsXg6c2TDeJ8=.8b0aca35-970e-4303-a2a6-f91dfc99fa67@github.com> References: <67YJHnuujM2J3p7_o6Q-eAwBL7DIYdydsXg6c2TDeJ8=.8b0aca35-970e-4303-a2a6-f91dfc99fa67@github.com> Message-ID: On Thu, 9 Sep 2021 09:23:38 GMT, Yasumasa Suenaga wrote: >> test/hotspot/jtreg/runtime/logging/FoldMultilinesTest.java line 102: >> >>> 100: test("file=" + EXCEPTION_LOG_FILE); >>> 101: test("stdout"); >>> 102: test("stderr"); >> >> I think we should add a case whe the output is not explicitly specified. I.e., >> >> >> -Xlog:exceptions=info:::foldmultilines=true > > I added test for this pattern in new commit. I missed to check the log if output is default ("") and foldmultilines=false. So I refactored testcase. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From ihse at openjdk.java.net Thu Sep 9 14:34:08 2021 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Thu, 9 Sep 2021 14:34:08 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 10:17:02 GMT, Aleksey Shipilev wrote: > Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. > > Additional testing: > - [x] Linux x86_64 Zero build > - [x] Linux x86_64 Zero bootcycle-images > - [ ] Linux x86_64 Zero `tier1` And as for @dholmes-ora comment: I'm not sure who "own" zero at this point in time. Aleksey has made a lot of the zero patches lately; does that not count? Are you thinking about any specific person that needs to weight in on this? ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From ihse at openjdk.java.net Thu Sep 9 14:34:09 2021 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Thu, 9 Sep 2021 14:34:09 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 13:14:35 GMT, Aleksey Shipilev wrote: >> make/autoconf/hotspot.m4 line 86: >> >>> 84: fi >>> 85: >>> 86: # All "special" variants share the same output directory ("server") >> >> I presume "zero" was a special variant? Are there any other variants remaining? > > Yes, there are at least "core" and "custom": > > > # All valid JVM variants > VALID_JVM_VARIANTS="server client minimal core zero custom" I think we should stop these as well from impersonating the server JVM. Preferably in the same fix, so we can remove all the special casing for "server" being anything else but server. ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From shade at openjdk.java.net Thu Sep 9 14:44:08 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 9 Sep 2021 14:44:08 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 14:28:19 GMT, Magnus Ihse Bursie wrote: >> Yes, there are at least "core" and "custom": >> >> >> # All valid JVM variants >> VALID_JVM_VARIANTS="server client minimal core zero custom" > > I think we should stop these as well from impersonating the server JVM. Preferably in the same fix, so we can remove all the special casing for "server" being anything else but server. Ok, I agree. Can I do a Zero-specific thing here (so that it is potentially cleanly backportable), and then handle the rest of the variants? ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From cjplummer at openjdk.java.net Thu Sep 9 15:06:11 2021 From: cjplummer at openjdk.java.net (Chris Plummer) Date: Thu, 9 Sep 2021 15:06:11 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 05:02:18 GMT, Ralf Schmelter wrote: > I will start reviewing this today. Thanks! ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From ihse at openjdk.java.net Thu Sep 9 15:15:00 2021 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Thu, 9 Sep 2021 15:15:00 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: <6EpZHKmu05w7CmXzMXmUPMHwKrsBT7anSPbMUwA69TI=.a409d263-8316-4774-85fd-67981e64d579@github.com> On Thu, 9 Sep 2021 14:41:02 GMT, Aleksey Shipilev wrote: >> I think we should stop these as well from impersonating the server JVM. Preferably in the same fix, so we can remove all the special casing for "server" being anything else but server. > > Ok, I agree. Can I do a Zero-specific thing here (so that it is potentially cleanly backportable), and then handle the rest of the variants? Sure, that works for me. ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From shade at openjdk.java.net Thu Sep 9 15:27:12 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 9 Sep 2021 15:27:12 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: <6EpZHKmu05w7CmXzMXmUPMHwKrsBT7anSPbMUwA69TI=.a409d263-8316-4774-85fd-67981e64d579@github.com> References: <6EpZHKmu05w7CmXzMXmUPMHwKrsBT7anSPbMUwA69TI=.a409d263-8316-4774-85fd-67981e64d579@github.com> Message-ID: On Thu, 9 Sep 2021 15:12:27 GMT, Magnus Ihse Bursie wrote: >> Ok, I agree. Can I do a Zero-specific thing here (so that it is potentially cleanly backportable), and then handle the rest of the variants? > > Sure, that works for me. While we are at it, do `core` and `custom` even carry their weight? I cannot remember if I ever seen anyone using them. Maybe we should "just" drop those variants, and leave only "server, client, minimal, zero"? ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From ihse at openjdk.java.net Thu Sep 9 15:38:07 2021 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Thu, 9 Sep 2021 15:38:07 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: <6EpZHKmu05w7CmXzMXmUPMHwKrsBT7anSPbMUwA69TI=.a409d263-8316-4774-85fd-67981e64d579@github.com> Message-ID: On Thu, 9 Sep 2021 15:23:45 GMT, Aleksey Shipilev wrote: >> Sure, that works for me. > > While we are at it, do `core` and `custom` even carry their weight? I cannot remember if I ever seen anyone using them. Maybe we should "just" drop those variants, and leave only "server, client, minimal, zero"? I don't know about "core". Last time it was up for discussion, some old-timer I've forgotten pointed out that it was useful for such-and-such. I'm not sure if the cost for keeping it is high enough to make the effort to figure out if anyone is going to miss it if we remove it. As for "custom", it is not a real JVM configuration per se. Instead, it's more of a testing ground for the build system. Basically, the JVM "variants" are just named pre-defined sets of enabled JVM features. To test this properly, I introduced the "custom" variant which is just an empty set of JVM features from the start, so that individual features can be fully controlled. I don't really think anyone is using this in the "real world", but I'd like to keep it for testing purposes. ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From iklam at openjdk.java.net Thu Sep 9 15:56:02 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 9 Sep 2021 15:56:02 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v4] In-Reply-To: <9ctw9Nw8tsUQcZfUENP407M8rsZQ3pn9J2iYJCDbmt0=.78ee6d04-ccd0-4b22-a534-a7b68e15372c@github.com> References: <9ctw9Nw8tsUQcZfUENP407M8rsZQ3pn9J2iYJCDbmt0=.78ee6d04-ccd0-4b22-a534-a7b68e15372c@github.com> Message-ID: On Thu, 9 Sep 2021 14:27:21 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: > > Refactoring FoldMultilinesTest If you run with the following command-line: java -Xlog:exceptions:::foldmultilines=true -Xlog:cds:::foldmultilines=false Does it give a warning, or does it change foldmultilines of stdout to false? ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From minqi at openjdk.java.net Thu Sep 9 18:24:31 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Thu, 9 Sep 2021 18:24:31 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp Message-ID: Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. Tests: ter1-4 Thanks Yumin ------------- Commit messages: - 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp Changes: https://git.openjdk.java.net/jdk/pull/5450/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8271569 Stats: 336 lines in 10 files changed: 163 ins; 129 del; 44 mod Patch: https://git.openjdk.java.net/jdk/pull/5450.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5450/head:pull/5450 PR: https://git.openjdk.java.net/jdk/pull/5450 From ihse at openjdk.java.net Thu Sep 9 19:38:35 2021 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Thu, 9 Sep 2021 19:38:35 GMT Subject: RFR: 8256977: Bump minimum GCC from 5.x to 6 for JDK Message-ID: The minimum acceptable version is raised from 5 to 6. There were no objections on the mailing list for doing so in the mainline, see https://mail.openjdk.java.net/pipermail/build-dev/2021-August/031899.html. This patch also reverts the workaround that was introduced in JDK-8252797 to support gcc 5.x. ------------- Commit messages: - 8256977: Bump minimum GCC from 5.x to 6 for JDK Changes: https://git.openjdk.java.net/jdk/pull/5452/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5452&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8256977 Stats: 5 lines in 2 files changed: 0 ins; 4 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5452.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5452/head:pull/5452 PR: https://git.openjdk.java.net/jdk/pull/5452 From erikj at openjdk.java.net Thu Sep 9 20:38:03 2021 From: erikj at openjdk.java.net (Erik Joelsson) Date: Thu, 9 Sep 2021 20:38:03 GMT Subject: RFR: 8256977: Bump minimum GCC from 5.x to 6 for JDK In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 19:28:54 GMT, Magnus Ihse Bursie wrote: > The minimum acceptable version is raised from 5 to 6. There were no objections on the mailing list for doing so in the mainline, see https://mail.openjdk.java.net/pipermail/build-dev/2021-August/031899.html. > > This patch also reverts the workaround that was introduced in JDK-8252797 to support gcc 5.x. Marked as reviewed by erikj (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5452 From iklam at openjdk.java.net Thu Sep 9 21:20:26 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 9 Sep 2021 21:20:26 GMT Subject: RFR: 8273522: Rename test property vm.cds.archived.java.heap to vm.cds.write.archived.java.heap Message-ID: The vm.cds.archived.java.heap test property (see test/jtreg-ext/requires/VMProps.java) is ambiguous -- after JDK-8270489, there are now two distinct capabilities: - HeapShared::can_write() -- G1 only - HeapShared::can_read() -- G1, Epsilon A few CDS tests are marked with @requires vm.cds.archived.java.heap These tests actually require the VM to be able to write Java objects into the CDS archive. Therefore, for clarify, they should be changed to use @requires vm.cds.write.archived.java.heap ***** This fix is required for JDK-8273508 - "Support archived heap objects in SerialGC". Without this fix, tests marked with `@requires vm.cds.archived.java.heap` would be executed even if SerialGC is selected, but this will dump CDS archives without archived heap objects, causing the tests to fail. ------------- Commit messages: - 8273522: Rename test property vm.cds.archived.java.heap to vm.cds.write.archived.java.heap Changes: https://git.openjdk.java.net/jdk/pull/5455/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5455&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273522 Stats: 53 lines in 40 files changed: 0 ins; 3 del; 50 mod Patch: https://git.openjdk.java.net/jdk/pull/5455.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5455/head:pull/5455 PR: https://git.openjdk.java.net/jdk/pull/5455 From iklam at openjdk.java.net Thu Sep 9 21:55:07 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 9 Sep 2021 21:55:07 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 18:13:10 GMT, Yumin Qi wrote: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. > > Tests: ter1-4 > > Thanks > Yumin Looks good. Just some small nits. src/hotspot/share/cds/cdsConstants.hpp line 29: > 27: int get_cds_constant(const char* name); > 28: size_t get_cds_offset(const char* name); > 29: #endif // SHARE_CDS_CDSCONSTANTS_HPP Instead of stand-alone functions, I think it's better to group them into a class: class CDSConstants : AllStatic { static int get_constant(const char* name); static size_t get_offset(const char* name); }; ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From dholmes at openjdk.java.net Thu Sep 9 22:59:02 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 9 Sep 2021 22:59:02 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: <2Yn8M-t8DrfBLGDJIgqCAHV1rIp0CydCE3wFSC-Ktu0=.b83f7003-a851-4dbf-9c9b-5d23fedc4757@github.com> On Thu, 9 Sep 2021 14:31:19 GMT, Magnus Ihse Bursie wrote: >> Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. >> >> Additional testing: >> - [x] Linux x86_64 Zero build >> - [x] Linux x86_64 Zero bootcycle-images >> - [ ] Linux x86_64 Zero `tier1` > > And as for @dholmes-ora comment: I'm not sure who "own" zero at this point in time. Aleksey has made a lot of the zero patches lately; does that not count? Are you thinking about any specific person that needs to weight in on this? @magicus every "port" in OpenJDK is supposed to have a clear owner and support system. Zero has been somewhat lacking in that area but there were enough people to keep it surviving. Now I'm not so sure. Does Zero have an active user community? Developer community? If so they are the ones who need to assess this change. ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From ysuenaga at openjdk.java.net Thu Sep 9 23:15:01 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Thu, 9 Sep 2021 23:15:01 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v4] In-Reply-To: References: <9ctw9Nw8tsUQcZfUENP407M8rsZQ3pn9J2iYJCDbmt0=.78ee6d04-ccd0-4b22-a534-a7b68e15372c@github.com> Message-ID: On Thu, 9 Sep 2021 15:53:31 GMT, Ioi Lam wrote: > If you run with the following command-line: > > ``` > java -Xlog:exceptions:::foldmultilines=true -Xlog:cds:::foldmultilines=false > ``` > > Does it give a warning, or does it change foldmultilines of stdout to false? I think it should give a warning and should keep first option (`foldmultilines=true`). It is same behavior with JDK 16. In following case, `filecount` for test.log set to `1` - it is first option. $ java -Xlog:logging=info -Xlog:os=warning:file=test.log::filecount=1 -Xlog:exceptions=info:file=test.log::filecount=2 --version [0.000s][warning][logging] Output options for existing outputs are ignored. (snip) [0.010s][info ][logging] Log output configuration: [0.010s][info ][logging] #0: stdout all=warning,logging=info uptime,level,tags [0.010s][info ][logging] #1: stderr all=off uptime,level,tags [0.010s][info ][logging] #2: file=test.log all=off,os=warning,exceptions=info uptime,level,tags filecount=1,filesize=20480K We need to improve this message of course as you said, but I want to work for it in another issue because the behavior in this PR is same with log file output. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From dholmes at openjdk.java.net Thu Sep 9 23:34:08 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 9 Sep 2021 23:34:08 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v4] In-Reply-To: <9ctw9Nw8tsUQcZfUENP407M8rsZQ3pn9J2iYJCDbmt0=.78ee6d04-ccd0-4b22-a534-a7b68e15372c@github.com> References: <9ctw9Nw8tsUQcZfUENP407M8rsZQ3pn9J2iYJCDbmt0=.78ee6d04-ccd0-4b22-a534-a7b68e15372c@github.com> Message-ID: On Thu, 9 Sep 2021 14:27:21 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: > > Refactoring FoldMultilinesTest I'm fine with the updates. I agree that adding in the warning can be handled next. If output options are basically "set once" then we should have an api that makes that clear. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5407 From iklam at openjdk.java.net Thu Sep 9 23:34:08 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 9 Sep 2021 23:34:08 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v4] In-Reply-To: References: <9ctw9Nw8tsUQcZfUENP407M8rsZQ3pn9J2iYJCDbmt0=.78ee6d04-ccd0-4b22-a534-a7b68e15372c@github.com> Message-ID: On Thu, 9 Sep 2021 23:11:49 GMT, Yasumasa Suenaga wrote: > > If you run with the following command-line: > > ``` > > java -Xlog:exceptions:::foldmultilines=true -Xlog:cds:::foldmultilines=false > > ``` > > > > > > > > > > > > > > > > > > > > > > > > Does it give a warning, or does it change foldmultilines of stdout to false? > > I think it should give a warning and should keep first option (`foldmultilines=true`). It is same behavior with JDK 16. > In following case, `filecount` for test.log set to `1` - it is first option. > > ``` > $ java -Xlog:logging=info -Xlog:os=warning:file=test.log::filecount=1 -Xlog:exceptions=info:file=test.log::filecount=2 --version > [0.000s][warning][logging] Output options for existing outputs are ignored. > > (snip) > > [0.010s][info ][logging] Log output configuration: > [0.010s][info ][logging] #0: stdout all=warning,logging=info uptime,level,tags > [0.010s][info ][logging] #1: stderr all=off uptime,level,tags > [0.010s][info ][logging] #2: file=test.log all=off,os=warning,exceptions=info uptime,level,tags filecount=1,filesize=20480K > ``` > > We need to improve this message of course as you said, but I want to work for it in another issue because the behavior in this PR is same with log file output. Sorry, I wasn't clear. I am not asking about file output. I am asking about stdout output. java -Xlog:exceptions:stdout::foldmultilines=true -Xlog:cds:stdout::foldmultilines=false I think this should give the same type of warning as you would get when the output is a file. I.e., the second `foldmultilines=false` should be ignored. However, I think your current implementation will accept the second `foldmultilines=false` and cause stdout to be printed without folded multilines. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From minqi at openjdk.java.net Thu Sep 9 23:51:06 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Thu, 9 Sep 2021 23:51:06 GMT Subject: RFR: 8273522: Rename test property vm.cds.archived.java.heap to vm.cds.write.archived.java.heap In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 20:28:55 GMT, Ioi Lam wrote: > The vm.cds.archived.java.heap test property (see test/jtreg-ext/requires/VMProps.java) is ambiguous -- after JDK-8270489, there are now two distinct capabilities: > > - HeapShared::can_write() -- G1 only > - HeapShared::can_read() -- G1, Epsilon > > A few CDS tests are marked with > > > @requires vm.cds.archived.java.heap > > > These tests actually require the VM to be able to write Java objects into the CDS archive. Therefore, for clarify, they should be changed to use > > > @requires vm.cds.write.archived.java.heap > > > ***** > This fix is required for JDK-8273508 - "Support archived heap objects in SerialGC". > > Without this fix, tests marked with `@requires vm.cds.archived.java.heap` would be executed even if SerialGC is selected, but this will dump CDS archives without archived heap objects, causing the tests to fail. LGTM. ------------- Marked as reviewed by minqi (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5455 From dholmes at openjdk.java.net Thu Sep 9 23:58:05 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 9 Sep 2021 23:58:05 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v4] In-Reply-To: <9ctw9Nw8tsUQcZfUENP407M8rsZQ3pn9J2iYJCDbmt0=.78ee6d04-ccd0-4b22-a534-a7b68e15372c@github.com> References: <9ctw9Nw8tsUQcZfUENP407M8rsZQ3pn9J2iYJCDbmt0=.78ee6d04-ccd0-4b22-a534-a7b68e15372c@github.com> Message-ID: On Thu, 9 Sep 2021 14:27:21 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: > > Refactoring FoldMultilinesTest Sorry I've re-evaluated things. I thought that @YaSuenag was saying that setting foldmultilines multiple times for the same file was also allowed at present and needing to be fixed. But it isn't. So I agree with Ioi that this needs to be fixed for stdoput/err as part of this PR. I also noticed that the state of foldmultilines is not reported with UL's own logging e.g. [0.110s][info ][logging] Log output configuration: [0.110s][info ][logging] #0: stdout all=warning,logging=info uptime,level,tags [0.110s][info ][logging] #1: stderr all=off uptime,level,tags [0.111s][info ][logging] #2: file=test.log all=off,os=warning,exceptions=info uptime,level,tags filecount=5,filesize=20480K,async=false ------------- Changes requested by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5407 From github.com+38446717+matias9927 at openjdk.java.net Fri Sep 10 00:00:02 2021 From: github.com+38446717+matias9927 at openjdk.java.net (Matias Saavedra Silva) Date: Fri, 10 Sep 2021 00:00:02 GMT Subject: RFR: 8272608: java_lang_System::allow_security_manager() doesn't set its initialization flag In-Reply-To: References: Message-ID: On Thu, 26 Aug 2021 16:00:01 GMT, Matias Saavedra Silva wrote: > Originally the initialized flag was always false causing the System fields to be read each time the method is called. The flag is now set the first time it runs. > Tested with tier1, specifically with runtime/logging/ProtectionDomainVerificationTest.java. > ?? @matias9927 the full name on your profile does not match the author name in this pull requests' [HEAD](https://git.openjdk.java.net/jdk/pull/5268/commits/d9127a6545e076b757f425d39826a217d487d6dd) commit. If this pull request gets integrated then the author name from this pull requests' [HEAD](https://git.openjdk.java.net/jdk/pull/5268/commits/d9127a6545e076b757f425d39826a217d487d6dd) commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork: > > ``` > $ git checkout JDK-8272608 > $ git commit -c user.name='Preferred Full Name' --allow-empty -m 'Update full name' > $ git push > ``` Should I still do this? ------------- PR: https://git.openjdk.java.net/jdk/pull/5268 From ccheung at openjdk.java.net Fri Sep 10 00:41:17 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Fri, 10 Sep 2021 00:41:17 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump Message-ID: Before this change, unregistered classes are loaded by the boot class loader during CDS dump time. This RFE creates an URLClassLoader based on the source specified in the classlist and uses the URLClassLoader to load the unregistered class during CDS dump time. The URLClassLoader instances will be cached in a hash table with the source as the key so that classes associated with the same source will be loaded by the same instance of class loader. Passed tiers 1 - 4 testing. ------------- Commit messages: - 8261941: Use ClassLoader for unregistered classes during -Xshare:dump Changes: https://git.openjdk.java.net/jdk/pull/5458/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5458&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261941 Stats: 115 lines in 7 files changed: 94 ins; 10 del; 11 mod Patch: https://git.openjdk.java.net/jdk/pull/5458.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5458/head:pull/5458 PR: https://git.openjdk.java.net/jdk/pull/5458 From coleenp at openjdk.java.net Fri Sep 10 01:09:05 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 10 Sep 2021 01:09:05 GMT Subject: RFR: 8272608: java_lang_System::allow_security_manager() doesn't set its initialization flag In-Reply-To: References: Message-ID: On Thu, 26 Aug 2021 16:00:01 GMT, Matias Saavedra Silva wrote: > Originally the initialized flag was always false causing the System fields to be read each time the method is called. The flag is now set the first time it runs. > Tested with tier1, specifically with runtime/logging/ProtectionDomainVerificationTest.java. We're not really sure what the message means, so I don't think changing it is necessary. I'm going to go ahead and sponsor it and see what happens. Thanks Matias!! ------------- PR: https://git.openjdk.java.net/jdk/pull/5268 From github.com+38446717+matias9927 at openjdk.java.net Fri Sep 10 01:09:06 2021 From: github.com+38446717+matias9927 at openjdk.java.net (Matias Saavedra Silva) Date: Fri, 10 Sep 2021 01:09:06 GMT Subject: Integrated: 8272608: java_lang_System::allow_security_manager() doesn't set its initialization flag In-Reply-To: References: Message-ID: On Thu, 26 Aug 2021 16:00:01 GMT, Matias Saavedra Silva wrote: > Originally the initialized flag was always false causing the System fields to be read each time the method is called. The flag is now set the first time it runs. > Tested with tier1, specifically with runtime/logging/ProtectionDomainVerificationTest.java. This pull request has now been integrated. Changeset: 08f0be83 Author: matias9927 Committer: Coleen Phillimore URL: https://git.openjdk.java.net/jdk/commit/08f0be8388914901ac40525ed995136ce020f432 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8272608: java_lang_System::allow_security_manager() doesn't set its initialization flag Reviewed-by: coleenp, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5268 From dholmes at openjdk.java.net Fri Sep 10 01:30:07 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Fri, 10 Sep 2021 01:30:07 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 18:13:10 GMT, Yumin Qi wrote: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. > > Tests: ter1-4 > > Thanks > Yumin Hi Yumin, There's obviously a lot more going on here than just a simple rename so I think the JBS issue should be changed accordingly. A few minor comments below. Thanks, David src/hotspot/share/cds/cdsConstants.cpp line 61: > 59: > 60: size_t get_cds_offset(const char* name) { > 61: for (int i = 0; i < (int)(sizeof(cds_offsets)/sizeof(cds_offsets[0])); i++) { Can't we just define a size for the array and use that? It isn't really a dynamic/unknown quantity. src/hotspot/share/cds/dynamicArchive.hpp line 45: > 43: > 44: public: > 45: int _base_region_crc[MetaspaceShared::n_regions]; This looks like it should be private with either a public accessor or else a friend declaration for the client code. src/hotspot/share/cds/filemap.hpp line 211: > 209: // will function correctly with this JVM and the bootclasspath it's > 210: // invoked with. > 211: public: Again this looks like it should be private with either a public accessor or else a friend declaration for the client code. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From ysuenaga at openjdk.java.net Fri Sep 10 02:25:40 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Fri, 10 Sep 2021 02:25:40 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v5] In-Reply-To: References: Message-ID: > We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. > > `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. > > `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. > They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. > > > share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); > share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); > > share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " > > share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); > share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); > share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); > > > I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` > > In addition, we might see following logs which relate to UL: > > > [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied > [0.000s][error][logging] Invalid tag 'aaa' in log selection. > [0.000s][error][logging] Invalid level 'aaa' in log selection. > [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). > [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file > [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: output options for stdout/err should be applied just once ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5407/files - new: https://git.openjdk.java.net/jdk/pull/5407/files/6bba4376..68d113f5 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=03-04 Stats: 28 lines in 4 files changed: 18 ins; 2 del; 8 mod Patch: https://git.openjdk.java.net/jdk/pull/5407.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5407/head:pull/5407 PR: https://git.openjdk.java.net/jdk/pull/5407 From lzang at openjdk.java.net Fri Sep 10 03:06:17 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Fri, 10 Sep 2021 03:06:17 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: On Mon, 6 Sep 2021 08:03:22 GMT, Lin Zang wrote: >> 8252842: Extend jmap to support parallel heap dump > > Lin Zang has updated the pull request incrementally with one additional commit since the last revision: > > fix build error Seems the #5410 has made some change that will affect this one. I am wondering should I start to rebase this PR based on that ? Thanks. Lin ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From dholmes at openjdk.java.net Fri Sep 10 05:09:02 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Fri, 10 Sep 2021 05:09:02 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v5] In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 02:25:40 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: > > output options for stdout/err should be applied just once A couple of comments/queries below. Thanks, David src/hotspot/share/logging/logConfiguration.cpp line 419: > 417: if (output == NULL || strlen(output) == 0 || > 418: strcmp("stdout", output) == 0 || strcmp("#0", output) == 0) { > 419: if (!stdout_configured) { So you are piggy-backing on parse_log_arguments() to produce the warning ... can you add a comment at the end: // else - fall-through to normal option processing which will be rejected with a warning src/hotspot/share/logging/logFileOutput.cpp line 461: > 459: void LogFileOutput::describe(outputStream *out) { > 460: LogFileStreamOutput::describe(out); > 461: out->print(",filecount=%u,filesize=" SIZE_FORMAT "%s,async=%s", _file_count, Don't we just need to add `foldMultilines` to this print statement? Or is it separate so that it applies to stdout/err as well? ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From minqi at openjdk.java.net Fri Sep 10 06:08:06 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Fri, 10 Sep 2021 06:08:06 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 01:20:12 GMT, David Holmes wrote: >> Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. >> The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. >> >> Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. >> >> Tests: ter1-4 >> >> Thanks >> Yumin > > src/hotspot/share/cds/cdsConstants.cpp line 61: > >> 59: >> 60: size_t get_cds_offset(const char* name) { >> 61: for (int i = 0; i < (int)(sizeof(cds_offsets)/sizeof(cds_offsets[0])); i++) { > > Can't we just define a size for the array and use that? It isn't really a dynamic/unknown quantity. The array size is known at compile time --- it is not dynamic but we do not need to manually count the size of the array this way. If define a size for the array, we need to count the number of items in the array to define the array size. We may add more items to the array --- just add items and don't need change anything else. Since total array memory size and array component size are known at compile time, so compiler will not generate code to calculate the size. How about this? const int size = (int)(sizeof(cds_offsets)/sizeof(cds_offsets[0])); for (int i = 0; i < size; i++) { ... } > src/hotspot/share/cds/dynamicArchive.hpp line 45: > >> 43: >> 44: public: >> 45: int _base_region_crc[MetaspaceShared::n_regions]; > > This looks like it should be private with either a public accessor or else a friend declaration for the client code. Let me try but I remember it does not work with constexpr initialization. This is why I move the data field to public not using the public accessor. > src/hotspot/share/cds/filemap.hpp line 211: > >> 209: // will function correctly with this JVM and the bootclasspath it's >> 210: // invoked with. >> 211: public: > > Again this looks like it should be private with either a public accessor or else a friend declaration for the client code. same reason as above. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From shade at openjdk.java.net Fri Sep 10 07:23:06 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Fri, 10 Sep 2021 07:23:06 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: <8vaICuN5ZWtQ8WJyIrW_-My_g72eC_TYdL6KtGE8NOs=.deb9e722-2f77-4cec-a2b3-4f9cc9db479a@github.com> On Thu, 9 Sep 2021 14:31:19 GMT, Magnus Ihse Bursie wrote: >> Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. >> >> Additional testing: >> - [x] Linux x86_64 Zero build >> - [x] Linux x86_64 Zero bootcycle-images >> - [ ] Linux x86_64 Zero `tier1` > > And as for @dholmes-ora comment: I'm not sure who "own" zero at this point in time. Aleksey has made a lot of the zero patches lately; does that not count? Are you thinking about any specific person that needs to weight in on this? > @magicus every "port" in OpenJDK is supposed to have a clear owner and support system. Zero has been somewhat lacking in that area but there were enough people to keep it surviving. Now I'm not so sure. Does Zero have an active user community? Developer community? If so they are the ones who need to assess this change. FWIW, Zero had fallen into Red Hat hands for support. The official lead (if you look at Census) is Gary Benson, who is not active in this project anymore. Since then, it was mostly supported by RH folks (like me) with contributions from Debian, Tencent, Huawei, Alibaba -- mostly because all of us have arch ports that do not have full-blown Server VMs yet. I have put things in motion to claim the leadership more formally. I do have to note, though, that over the last few years of me whipping Zero into shape, this is the first time anyone asked the formal governance question, which must tell us something about how much we care about ownership formalities here ;) ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From ysuenaga at openjdk.java.net Fri Sep 10 08:41:04 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Fri, 10 Sep 2021 08:41:04 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v5] In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 05:01:23 GMT, David Holmes wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: >> >> output options for stdout/err should be applied just once > > src/hotspot/share/logging/logFileOutput.cpp line 461: > >> 459: void LogFileOutput::describe(outputStream *out) { >> 460: LogFileStreamOutput::describe(out); >> 461: out->print(",filecount=%u,filesize=" SIZE_FORMAT "%s,async=%s", _file_count, > > Don't we just need to add `foldMultilines` to this print statement? Or is it separate so that it applies to stdout/err as well? `foldmultilines` is provided by `LogFileStreamOutput`, and it might provide more options in future. So I delegate statement printing to `LogFileStreamOutput`, then print options in `LogFileOutput`. This change also applies to stdout/err log outputs. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From dholmes at openjdk.java.net Fri Sep 10 10:06:09 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Fri, 10 Sep 2021 10:06:09 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 10:17:02 GMT, Aleksey Shipilev wrote: > Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. > > Additional testing: > - [x] Linux x86_64 Zero build > - [x] Linux x86_64 Zero bootcycle-images > - [ ] Linux x86_64 Zero `tier1` It isn't the "formal governance" I'm concerned about, more about the folk who use/rely on Zero being the ones to evaluate the impact of a change like this. People, like myself, who do not use Zero in any way cannot evaluate whether this change is appropriate - it's that simple. :) ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From mbaesken at openjdk.java.net Fri Sep 10 11:07:52 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 10 Sep 2021 11:07:52 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v2] In-Reply-To: References: Message-ID: <3PokFyPHsil0S9A15OWUj97Xls1tFpkeXuqHydXnh4o=.64e6daaa-5dc3-438c-b362-ba61775d1403@github.com> > 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid > that would be helpful too and can be added to the OSContainer API . > pids.current : > A read-only single value file which exists on all cgroups. > The number of processes currently in the cgroup and its descendants. > > Best regards, Matthias Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Some simplifications and test adjustment suggested by Severin ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5437/files - new: https://git.openjdk.java.net/jdk/pull/5437/files/aa93a12b..422aef68 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5437&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5437&range=00-01 Stats: 13 lines in 3 files changed: 8 ins; 1 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/5437.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5437/head:pull/5437 PR: https://git.openjdk.java.net/jdk/pull/5437 From mbaesken at openjdk.java.net Fri Sep 10 11:07:53 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 10 Sep 2021 11:07:53 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 09:21:59 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid > that would be helpful too and can be added to the OSContainer API . > pids.current : > A read-only single value file which exists on all cgroups. > The number of processes currently in the cgroup and its descendants. > > Best regards, Matthias Hi Severin, I added another commit dealing with your comments. Thanks, Matthias ------------- PR: https://git.openjdk.java.net/jdk/pull/5437 From ysuenaga at openjdk.java.net Fri Sep 10 12:17:41 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Fri, 10 Sep 2021 12:17:41 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v6] In-Reply-To: References: Message-ID: > We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. > > `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. > > `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. > They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. > > > share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); > share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); > > share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " > > share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); > share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); > share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); > > > I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` > > In addition, we might see following logs which relate to UL: > > > [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied > [0.000s][error][logging] Invalid tag 'aaa' in log selection. > [0.000s][error][logging] Invalid level 'aaa' in log selection. > [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). > [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file > [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. Yasumasa Suenaga has updated the pull request incrementally with two additional commits since the last revision: - Add comments about parse_options() call - Fix GTest failure ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5407/files - new: https://git.openjdk.java.net/jdk/pull/5407/files/68d113f5..97c924d3 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=04-05 Stats: 16 lines in 3 files changed: 14 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5407.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5407/head:pull/5407 PR: https://git.openjdk.java.net/jdk/pull/5407 From sgehwolf at openjdk.java.net Fri Sep 10 12:41:08 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Fri, 10 Sep 2021 12:41:08 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v2] In-Reply-To: <3PokFyPHsil0S9A15OWUj97Xls1tFpkeXuqHydXnh4o=.64e6daaa-5dc3-438c-b362-ba61775d1403@github.com> References: <3PokFyPHsil0S9A15OWUj97Xls1tFpkeXuqHydXnh4o=.64e6daaa-5dc3-438c-b362-ba61775d1403@github.com> Message-ID: On Fri, 10 Sep 2021 11:07:52 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid >> that would be helpful too and can be added to the OSContainer API . >> pids.current : >> A read-only single value file which exists on all cgroups. >> The number of processes currently in the cgroup and its descendants. >> >> Best regards, Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Some simplifications and test adjustment suggested by Severin Sorry for not being clear earlier. I meant that we can do those simplifications throughout. src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp line 255: > 253: } > 254: > 255: char* CgroupV1Subsystem::pids_current_val() { This function can get removed. It's unused now. src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp line 110: > 108: > 109: char * pids_max_val(); > 110: char * pids_current_val(); This is not needed. src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp line 238: > 236: } > 237: > 238: char* CgroupV2Subsystem::pids_current_val() { We don't need that function. src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp line 270: > 268: * OSCONTAINER_ERROR for not supported > 269: */ > 270: jlong CgroupV2Subsystem::pids_current() { This should use something akin to `memory_usage_in_bytes` in this class. `pids_current_val()` isn't needed. src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsystem.java line 317: > 315: public long getPidsCurrent() { > 316: String pidsCurrentStr = CgroupSubsystemController.getStringValue(unified, "pids.current"); > 317: return CgroupSubsystem.limitFromString(pidsCurrentStr); This should use: `return getLongVal("pids.current");` instead. src/java.base/share/classes/sun/launcher/LauncherHelper.java line 415: > 413: ostream.println(formatLimitString(val, INDENT + "Current number of processes: ", > 414: longRetvalNotSupported, false)); > 415: I'm not sure we should add this to `-XshowSettings:system` output at all. What's reported there is enforced limits. Note that current memory usage isn't shown either. test/hotspot/jtreg/containers/docker/TestPids.java line 101: > 99: System.out.println("Found " + lineMarker + " with value: " + ivalue); > 100: try { > 101: int ai = Integer.parseInt(ivalue); Could you move the debug print line to after line 101, please. It could say: `System.out.println("Found " + lineMarker + " with value: " + ai + ". PASS.");` ------------- Changes requested by sgehwolf (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5437 From ysuenaga at openjdk.java.net Fri Sep 10 14:43:46 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Fri, 10 Sep 2021 14:43:46 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v5] In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 05:04:34 GMT, David Holmes wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision: >> >> output options for stdout/err should be applied just once > > src/hotspot/share/logging/logConfiguration.cpp line 419: > >> 417: if (output == NULL || strlen(output) == 0 || >> 418: strcmp("stdout", output) == 0 || strcmp("#0", output) == 0) { >> 419: if (!stdout_configured) { > > So you are piggy-backing on parse_log_arguments() to produce the warning ... can you add a comment at the end: > // else - fall-through to normal option processing which will be rejected with a warning I added it. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From ysuenaga at openjdk.java.net Fri Sep 10 14:47:57 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Fri, 10 Sep 2021 14:47:57 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v6] In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 12:17:41 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request incrementally with two additional commits since the last revision: > > - Add comments about parse_options() call > - Fix GTest failure I pushed some changes. Could you review again? I saw some error in GTest by adding foldmultilines to output options. I fixed it in new commit and it works fine on GHA. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From andrew at openjdk.java.net Fri Sep 10 15:51:49 2021 From: andrew at openjdk.java.net (Andrew John Hughes) Date: Fri, 10 Sep 2021 15:51:49 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 14:31:19 GMT, Magnus Ihse Bursie wrote: >> Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. >> >> Additional testing: >> - [x] Linux x86_64 Zero build >> - [x] Linux x86_64 Zero bootcycle-images >> - [ ] Linux x86_64 Zero `tier1` > > And as for @dholmes-ora comment: I'm not sure who "own" zero at this point in time. Aleksey has made a lot of the zero patches lately; does that not count? Are you thinking about any specific person that needs to weight in on this? > > @magicus every "port" in OpenJDK is supposed to have a clear owner and support system. Zero has been somewhat lacking in that area but there were enough people to keep it surviving. Now I'm not so sure. Does Zero have an active user community? Developer community? If so they are the ones who need to assess this change. > > FWIW, Zero had fallen into Red Hat hands for support. The official lead (if you look at Census) is Gary Benson, who is not active in this project anymore. Since then, it was mostly supported by RH folks (like me) with contributions from Debian, Tencent, Huawei, Alibaba -- mostly because all of us have arch ports that do not have full-blown Server VMs yet. For clarity, Gary was a part of the Red Hat Java team at the time, so it has always been a Red Hat project. At the time, the only JIT ports in OpenJDK were x86, x86-64 and SPARC, so the other architectures Red Hat supported (ppc, ppc64, s390, s390x) needed some way to at least build and run to allow OpenJDK packages to be shipped, even if end users desiring greater performance used some other JDK. As OpenJDK has gained further JIT ports, the use of Zero has declined in response. For example, we can build OpenJDK 17 on every architecture we need without using Zero, so it's not going to receive that kind of "you broke our build" testing any more. It is still used for 8u & 11u, and is definitely worth keeping alive to help bootstrap any new ports. So, in short, the owner has always been and remains Red Hat, even if the individual personnel have changed. The formal project represents a time when it was maintained outside the mainline OpenJDK, so there has been no need to update that for a long time, as any JDK project committer can make changes to the code in the main JDK project. > > I have put things in motion to claim the leadership more formally. I do have to note, though, that over the last few years of me whipping Zero into shape, this is the first time anyone asked the formal governance question, which must tell us something about how much we care about ownership formalities here ;) Most of the OpenJDK committers at Red Hat have pushed Zero fixes at some time, myself included, as need has arisen. This has the first time this has been raised to my knowledge. Regarding this change itself, I think it's fine for trunk, where there's time to shake out any issues for OpenJDK 18, but I wouldn't want to backport it. These kind of changes tend to throw up things only when someone's application breaks, and, at least if that's a new JDK version, that's somewhat expected. ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From shade at openjdk.java.net Fri Sep 10 16:33:05 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Fri, 10 Sep 2021 16:33:05 GMT Subject: RFR: 8273606: Zero: SPARC64 build fails with si_band type mismatch Message-ID: This is actually caught by `-Werror=format` that is enabled by default. $ sh ./configure --with-debug-level=slowdebug --with-boot-jdk=/home/shade/Install/jdk16-16.0.2-ea/ --openjdk-target=sparc64-linux-gnu --with-sysroot=/chroots/sparc64/ --with-jvm-variants=zero $ make images ------------- Commit messages: - Fix Changes: https://git.openjdk.java.net/jdk/pull/5470/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5470&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273606 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5470.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5470/head:pull/5470 PR: https://git.openjdk.java.net/jdk/pull/5470 From iklam at openjdk.java.net Fri Sep 10 18:07:55 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Fri, 10 Sep 2021 18:07:55 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v6] In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 12:17:41 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request incrementally with two additional commits since the last revision: > > - Add comments about parse_options() call > - Fix GTest failure test/hotspot/gtest/logging/logTestFixture.cpp line 104: > 102: } > 103: > 104: // TODO: Restore following code if options for existing log output can be changed. I think this change needs a better explanation and should be done in a separate RFE. I've file https://bugs.openjdk.java.net/browse/JDK-8273610 and will post a PR soon. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From iklam at openjdk.java.net Fri Sep 10 18:16:50 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Fri, 10 Sep 2021 18:16:50 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v6] In-Reply-To: References: Message-ID: <4-o4duRXC_1e696wkRlPrS9JlJftt_dKlxyxa6MI8Og=.2bbd7e57-6ffd-4740-a9c2-dfdb5520a2d1@github.com> On Fri, 10 Sep 2021 18:04:20 GMT, Ioi Lam wrote: >> Yasumasa Suenaga has updated the pull request incrementally with two additional commits since the last revision: >> >> - Add comments about parse_options() call >> - Fix GTest failure > > test/hotspot/gtest/logging/logTestFixture.cpp line 104: > >> 102: } >> 103: >> 104: // TODO: Restore following code if options for existing log output can be changed. > > I think this change needs a better explanation and should be done in a separate RFE. I've file https://bugs.openjdk.java.net/browse/JDK-8273610 and will post a PR soon. I posted the PR: https://github.com/openjdk/jdk/pull/5472 ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From hseigel at openjdk.java.net Fri Sep 10 18:20:51 2021 From: hseigel at openjdk.java.net (Harold Seigel) Date: Fri, 10 Sep 2021 18:20:51 GMT Subject: RFR: JDK-8195809: [TESTBUG] jps and jcmd -l support for containers is not tested [v2] In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 19:44:35 GMT, Mikhailo Seledtsov wrote: >> Please review this addition of new testing: >> - new test for sending jcmd commands across container boundaries >> - updated existing sidecar test, enabling jcmd test case > > Mikhailo Seledtsov has updated the pull request incrementally with one additional commit since the last revision: > > Updated comment The changes look good! Thanks for doing this. Harold ------------- Marked as reviewed by hseigel (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5368 From iklam at openjdk.java.net Fri Sep 10 18:21:02 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Fri, 10 Sep 2021 18:21:02 GMT Subject: RFR: 8273610: LogTestFixture::restore_config() should not restore options Message-ID: This is a prerequisite of https://github.com/openjdk/jdk/pull/5407 LogTestFixture::restore_config() should not restore the options because it's neither necessary nor allowed. Please see the RFE description for details. ------------- Commit messages: - 8273610: LogTestFixture::restore_config() should not restore options Changes: https://git.openjdk.java.net/jdk/pull/5472/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5472&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273610 Stats: 9 lines in 1 file changed: 4 ins; 3 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5472.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5472/head:pull/5472 PR: https://git.openjdk.java.net/jdk/pull/5472 From coleenp at openjdk.java.net Fri Sep 10 18:39:10 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 10 Sep 2021 18:39:10 GMT Subject: RFR: 8273611: Remove unused ProfilePrint_lock Message-ID: Remove a lock that's no longer used. Tested with local build. ------------- Commit messages: - remove stray comment - 8273611: Remove unused ProfilePrint_lock Changes: https://git.openjdk.java.net/jdk/pull/5474/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5474&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273611 Stats: 4 lines in 2 files changed: 0 ins; 3 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5474.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5474/head:pull/5474 PR: https://git.openjdk.java.net/jdk/pull/5474 From iklam at openjdk.java.net Fri Sep 10 19:10:49 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Fri, 10 Sep 2021 19:10:49 GMT Subject: RFR: 8273611: Remove unused ProfilePrint_lock In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 18:30:57 GMT, Coleen Phillimore wrote: > Remove a lock that's no longer used. Tested with local build. LGTM and trivial ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5474 From coleenp at openjdk.java.net Fri Sep 10 19:27:56 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 10 Sep 2021 19:27:56 GMT Subject: RFR: 8273611: Remove unused ProfilePrint_lock In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 18:30:57 GMT, Coleen Phillimore wrote: > Remove a lock that's no longer used. Tested with local build. Thanks Ioi! ------------- PR: https://git.openjdk.java.net/jdk/pull/5474 From coleenp at openjdk.java.net Fri Sep 10 19:27:57 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 10 Sep 2021 19:27:57 GMT Subject: Integrated: 8273611: Remove unused ProfilePrint_lock In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 18:30:57 GMT, Coleen Phillimore wrote: > Remove a lock that's no longer used. Tested with local build. This pull request has now been integrated. Changeset: e4cd2097 Author: Coleen Phillimore URL: https://git.openjdk.java.net/jdk/commit/e4cd2097a56df20da07a2b5c70838431b42c9a73 Stats: 4 lines in 2 files changed: 0 ins; 3 del; 1 mod 8273611: Remove unused ProfilePrint_lock Reviewed-by: iklam ------------- PR: https://git.openjdk.java.net/jdk/pull/5474 From glaubitz at openjdk.java.net Fri Sep 10 19:39:47 2021 From: glaubitz at openjdk.java.net (John Paul Adrian Glaubitz) Date: Fri, 10 Sep 2021 19:39:47 GMT Subject: RFR: 8273606: Zero: SPARC64 build fails with si_band type mismatch In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 16:25:34 GMT, Aleksey Shipilev wrote: > This is actually caught by `-Werror=format` that is enabled by default. > > > $ sh ./configure --with-debug-level=slowdebug --with-boot-jdk=/home/shade/Install/jdk16-16.0.2-ea/ --openjdk-target=sparc64-linux-gnu --with-sysroot=/chroots/sparc64/ --with-jvm-variants=zero > $ make images > Apparently, it was never fixed in glibc for sparc64? We can still make a defensive cast to `long`. Can you file a bug report to the glibc bug tracker? > I looked at how Debian folks avoid this problem, and I think there is Debian patch that just disables `-Werror` wholesale. Right, @glaubitz? :) Yes, that's correct. See: https://salsa.debian.org/openjdk-team/openjdk/-/blob/openjdk-16/debian/patches/hotspot-disable-werror.diff ------------- PR: https://git.openjdk.java.net/jdk/pull/5470 From ccheung at openjdk.java.net Fri Sep 10 20:47:44 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Fri, 10 Sep 2021 20:47:44 GMT Subject: RFR: 8273522: Rename test property vm.cds.archived.java.heap to vm.cds.write.archived.java.heap In-Reply-To: References: Message-ID: <_uOKRrhKvHX5E9DXDs3B-Dt07tgneyj0bfAKVuImjIk=.0a3c37a8-fa4c-4cf7-975b-40e41bf69550@github.com> On Thu, 9 Sep 2021 20:28:55 GMT, Ioi Lam wrote: > The vm.cds.archived.java.heap test property (see test/jtreg-ext/requires/VMProps.java) is ambiguous -- after JDK-8270489, there are now two distinct capabilities: > > - HeapShared::can_write() -- G1 only > - HeapShared::can_read() -- G1, Epsilon > > A few CDS tests are marked with > > > @requires vm.cds.archived.java.heap > > > These tests actually require the VM to be able to write Java objects into the CDS archive. Therefore, for clarify, they should be changed to use > > > @requires vm.cds.write.archived.java.heap > > > ***** > This fix is required for JDK-8273508 - "Support archived heap objects in SerialGC". > > Without this fix, tests marked with `@requires vm.cds.archived.java.heap` would be executed even if SerialGC is selected, but this will dump CDS archives without archived heap objects, causing the tests to fail. LGTM. ------------- Marked as reviewed by ccheung (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5455 From mseledtsov at openjdk.java.net Fri Sep 10 21:18:23 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Fri, 10 Sep 2021 21:18:23 GMT Subject: RFR: JDK-8195809: [TESTBUG] jps and jcmd -l support for containers is not tested [v3] In-Reply-To: References: Message-ID: > Please review this addition of new testing: > - new test for sending jcmd commands across container boundaries > - updated existing sidecar test, enabling jcmd test case Mikhailo Seledtsov has updated the pull request incrementally with one additional commit since the last revision: Removed unnecessary UsePerfData per review feedback ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5368/files - new: https://git.openjdk.java.net/jdk/pull/5368/files/1a66f1c0..f1eead47 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5368&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5368&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5368.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5368/head:pull/5368 PR: https://git.openjdk.java.net/jdk/pull/5368 From mseledtsov at openjdk.java.net Fri Sep 10 21:20:54 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Fri, 10 Sep 2021 21:20:54 GMT Subject: RFR: 8273522: Rename test property vm.cds.archived.java.heap to vm.cds.write.archived.java.heap In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 20:28:55 GMT, Ioi Lam wrote: > The vm.cds.archived.java.heap test property (see test/jtreg-ext/requires/VMProps.java) is ambiguous -- after JDK-8270489, there are now two distinct capabilities: > > - HeapShared::can_write() -- G1 only > - HeapShared::can_read() -- G1, Epsilon > > A few CDS tests are marked with > > > @requires vm.cds.archived.java.heap > > > These tests actually require the VM to be able to write Java objects into the CDS archive. Therefore, for clarify, they should be changed to use > > > @requires vm.cds.write.archived.java.heap > > > ***** > This fix is required for JDK-8273508 - "Support archived heap objects in SerialGC". > > Without this fix, tests marked with `@requires vm.cds.archived.java.heap` would be executed even if SerialGC is selected, but this will dump CDS archives without archived heap objects, causing the tests to fail. Looks good. ------------- Marked as reviewed by mseledtsov (Committer). PR: https://git.openjdk.java.net/jdk/pull/5455 From cjplummer at openjdk.java.net Fri Sep 10 21:26:55 2021 From: cjplummer at openjdk.java.net (Chris Plummer) Date: Fri, 10 Sep 2021 21:26:55 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 03:03:01 GMT, Lin Zang wrote: > Seems the #5410 has made some change that will affect this one. I am wondering should I start to rebase this PR based on that ? It looks like at most there would be one conflict, and it is trivial. You'll eventually have to merge before integrating anyway. ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From iklam at openjdk.java.net Fri Sep 10 22:39:50 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Fri, 10 Sep 2021 22:39:50 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump In-Reply-To: References: Message-ID: <7tS6Rp9DRCfFZ2EbuBYXk8bfvOBDP1_j51jkaBb8k3E=.1e5c76e1-a5a4-4b26-8252-f57b4a5838b8@github.com> On Fri, 10 Sep 2021 00:20:04 GMT, Calvin Cheung wrote: > Before this change, unregistered classes are loaded by the boot class loader during CDS dump time. > This RFE creates an URLClassLoader based on the source specified in the classlist and uses the URLClassLoader to load the unregistered class during CDS dump time. The URLClassLoader instances will be cached in a hash table with the source as the key so that classes associated with the same source will be loaded by the same instance of class loader. > > Passed tiers 1 - 4 testing. Changes requested by iklam (Reviewer). src/hotspot/share/cds/classListParser.cpp line 476: > 474: } > 475: > 476: // This tells JVM_FindLoadedClass to not find this class. This comment can be deleted. The class `k` used to be defined by the boot loader. As a result, when `JVM_FindLoadedClass` looked up a class in the boot/platform/app loaders, it may inadvertently find `k`. However, after this PR, `k` is no longer defined by the boot loader. src/hotspot/share/classfile/classLoaderExt.cpp line 297: > 295: } > 296: > 297: class URLClassLoaderTable : public ResourceHashtable< I think we should try to decouple the loading of unregistered classes from ClassLoader/ClassloaderExt. Maybe these new functions can be placed in a new file, shared/cds/unregisteredClasses.cpp, and the API entry point would be `UnregisteredClasses::load_class(name, path)`. Also, `ClassLoaderExt::find_classpath_entry_from_cache` shouldn't be needed anymore. If the JAR file doesn't exist, URLClassLoader will throw an exception, so we don't need to create a ClassPathEntry just to check for the JAR file's existence. I wonder if there's any code in classLoader.cpp that was used only for supporting the loading of unregistered classes. If so, it can be removed, too. src/hotspot/share/classfile/classLoaderExt.cpp line 299: > 297: class URLClassLoaderTable : public ResourceHashtable< > 298: Symbol*, Handle, > 299: 7, // prime number I think 7 is too small. Maybe 137? src/hotspot/share/classfile/classLoaderExt.cpp line 327: > 325: Handle ClassLoaderExt::create_and_add_url_classloader(Symbol* path, TRAPS) { > 326: Handle url_classloader = create_url_classloader(path, CHECK_NH); > 327: bool added = _url_classloader_table->put(path, url_classloader); added is not used. Did you want to assert that `added == true`? I think it's better to move the body of this function to line 342. Then it would be clear that the entry doesn't exist (and there's no need to check for `added`). src/hotspot/share/classfile/classLoaderExt.cpp line 336: > 334: _url_classloader_table = new (ResourceObj::C_HEAP, mtClass)URLClassLoaderTable(); > 335: Handle url_classloader = create_and_add_url_classloader(path, CHECK_NH); > 336: return url_classloader; I think the above 2 lines should be removed and the creation should be done in a single place. This means `_url_classloader_table->get()` would be unnecessarily called when the table is created, but I think that's OK since this happens only once. src/hotspot/share/classfile/classLoaderExt.cpp line 368: > 366: assert(result.get_type() == T_OBJECT, "just checking"); > 367: oop obj = result.get_oop(); > 368: InstanceKlass* k = InstanceKlass::cast(java_lang_Class::as_Klass(obj)); No need for the temp variable `k` since it's immediately returned. ------------- PR: https://git.openjdk.java.net/jdk/pull/5458 From iklam at openjdk.java.net Fri Sep 10 22:48:51 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Fri, 10 Sep 2021 22:48:51 GMT Subject: RFR: 8273522: Rename test property vm.cds.archived.java.heap to vm.cds.write.archived.java.heap In-Reply-To: <_uOKRrhKvHX5E9DXDs3B-Dt07tgneyj0bfAKVuImjIk=.0a3c37a8-fa4c-4cf7-975b-40e41bf69550@github.com> References: <_uOKRrhKvHX5E9DXDs3B-Dt07tgneyj0bfAKVuImjIk=.0a3c37a8-fa4c-4cf7-975b-40e41bf69550@github.com> Message-ID: On Fri, 10 Sep 2021 20:45:16 GMT, Calvin Cheung wrote: >> The vm.cds.archived.java.heap test property (see test/jtreg-ext/requires/VMProps.java) is ambiguous -- after JDK-8270489, there are now two distinct capabilities: >> >> - HeapShared::can_write() -- G1 only >> - HeapShared::can_read() -- G1, Epsilon >> >> A few CDS tests are marked with >> >> >> @requires vm.cds.archived.java.heap >> >> >> These tests actually require the VM to be able to write Java objects into the CDS archive. Therefore, for clarify, they should be changed to use >> >> >> @requires vm.cds.write.archived.java.heap >> >> >> ***** >> This fix is required for JDK-8273508 - "Support archived heap objects in SerialGC". >> >> Without this fix, tests marked with `@requires vm.cds.archived.java.heap` would be executed even if SerialGC is selected, but this will dump CDS archives without archived heap objects, causing the tests to fail. > > LGTM. Thanks @calvinccheung @yminqi @mseledts for the review. ------------- PR: https://git.openjdk.java.net/jdk/pull/5455 From iklam at openjdk.java.net Fri Sep 10 22:48:52 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Fri, 10 Sep 2021 22:48:52 GMT Subject: Integrated: 8273522: Rename test property vm.cds.archived.java.heap to vm.cds.write.archived.java.heap In-Reply-To: References: Message-ID: <_1sZcnhlDry_rirBc0kIwuLQ4rsHyNXX1kqy6di-OGA=.07576400-8813-4805-9c6c-e68126349e18@github.com> On Thu, 9 Sep 2021 20:28:55 GMT, Ioi Lam wrote: > The vm.cds.archived.java.heap test property (see test/jtreg-ext/requires/VMProps.java) is ambiguous -- after JDK-8270489, there are now two distinct capabilities: > > - HeapShared::can_write() -- G1 only > - HeapShared::can_read() -- G1, Epsilon > > A few CDS tests are marked with > > > @requires vm.cds.archived.java.heap > > > These tests actually require the VM to be able to write Java objects into the CDS archive. Therefore, for clarify, they should be changed to use > > > @requires vm.cds.write.archived.java.heap > > > ***** > This fix is required for JDK-8273508 - "Support archived heap objects in SerialGC". > > Without this fix, tests marked with `@requires vm.cds.archived.java.heap` would be executed even if SerialGC is selected, but this will dump CDS archives without archived heap objects, causing the tests to fail. This pull request has now been integrated. Changeset: 922e86f4 Author: Ioi Lam URL: https://git.openjdk.java.net/jdk/commit/922e86f4ff28c7b17af8e7b5867a40fc76b7fdd7 Stats: 53 lines in 40 files changed: 0 ins; 3 del; 50 mod 8273522: Rename test property vm.cds.archived.java.heap to vm.cds.write.archived.java.heap Reviewed-by: minqi, ccheung, mseledtsov ------------- PR: https://git.openjdk.java.net/jdk/pull/5455 From ysuenaga at openjdk.java.net Sat Sep 11 01:45:47 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Sat, 11 Sep 2021 01:45:47 GMT Subject: RFR: 8273610: LogTestFixture::restore_config() should not restore options In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 18:13:37 GMT, Ioi Lam wrote: > This is a prerequisite of https://github.com/openjdk/jdk/pull/5407 > > LogTestFixture::restore_config() should not restore the options because it's neither necessary nor allowed. Please see the RFE description for details. Looks good. Thank you for fixing this! ------------- Marked as reviewed by ysuenaga (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5472 From ysuenaga at openjdk.java.net Sat Sep 11 01:46:49 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Sat, 11 Sep 2021 01:46:49 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v6] In-Reply-To: <4-o4duRXC_1e696wkRlPrS9JlJftt_dKlxyxa6MI8Og=.2bbd7e57-6ffd-4740-a9c2-dfdb5520a2d1@github.com> References: <4-o4duRXC_1e696wkRlPrS9JlJftt_dKlxyxa6MI8Og=.2bbd7e57-6ffd-4740-a9c2-dfdb5520a2d1@github.com> Message-ID: On Fri, 10 Sep 2021 18:14:07 GMT, Ioi Lam wrote: >> test/hotspot/gtest/logging/logTestFixture.cpp line 104: >> >>> 102: } >>> 103: >>> 104: // TODO: Restore following code if options for existing log output can be changed. >> >> I think this change needs a better explanation and should be done in a separate RFE. I've file https://bugs.openjdk.java.net/browse/JDK-8273610 and will post a PR soon. > > I posted the PR: https://github.com/openjdk/jdk/pull/5472 Thanks! I will modify this PR after merging #5472 . ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From kevinw at openjdk.java.net Sat Sep 11 06:42:42 2021 From: kevinw at openjdk.java.net (Kevin Walls) Date: Sat, 11 Sep 2021 06:42:42 GMT Subject: RFR: JDK-8195809: [TESTBUG] jps and jcmd -l support for containers is not tested [v3] In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 21:18:23 GMT, Mikhailo Seledtsov wrote: >> Please review this addition of new testing: >> - new test for sending jcmd commands across container boundaries >> - updated existing sidecar test, enabling jcmd test case > > Mikhailo Seledtsov has updated the pull request incrementally with one additional commit since the last revision: > > Removed unnecessary UsePerfData per review feedback Yes looks good. I've run the tests and both running OK and passing. ------------- Marked as reviewed by kevinw (Committer). PR: https://git.openjdk.java.net/jdk/pull/5368 From dholmes at openjdk.java.net Sun Sep 12 06:12:52 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sun, 12 Sep 2021 06:12:52 GMT Subject: RFR: 8273610: LogTestFixture::restore_config() should not restore options In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 18:13:37 GMT, Ioi Lam wrote: > This is a prerequisite of https://github.com/openjdk/jdk/pull/5407 > > LogTestFixture::restore_config() should not restore the options because it's neither necessary nor allowed. Please see the RFE description for details. Seems ok. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5472 From dholmes at openjdk.java.net Sun Sep 12 22:20:48 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sun, 12 Sep 2021 22:20:48 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v6] In-Reply-To: References: Message-ID: <5diu3ROKNiqkE3B1VFsaKUHif4MhnZ5CiHqna_qo28I=.56bd6b88-979b-4c90-9f67-af2131efbb12@github.com> On Fri, 10 Sep 2021 12:17:41 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request incrementally with two additional commits since the last revision: > > - Add comments about parse_options() call > - Fix GTest failure Changes requested by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From dholmes at openjdk.java.net Sun Sep 12 22:20:49 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sun, 12 Sep 2021 22:20:49 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v5] In-Reply-To: References: Message-ID: <_A7pPQWXHEKvk0vWMOX9bppNqCWhWykoELNVwqjnRQM=.e1f5149b-958c-49e6-b499-9823bb66fef9@github.com> On Fri, 10 Sep 2021 14:40:51 GMT, Yasumasa Suenaga wrote: >> src/hotspot/share/logging/logConfiguration.cpp line 419: >> >>> 417: if (output == NULL || strlen(output) == 0 || >>> 418: strcmp("stdout", output) == 0 || strcmp("#0", output) == 0) { >>> 419: if (!stdout_configured) { >> >> So you are piggy-backing on parse_log_arguments() to produce the warning ... can you add a comment at the end: >> // else - fall-through to normal option processing which will be rejected with a warning > > I added it. You added it in the wrong place - it is supposed to document the not-present "else" part of "if (!stdout_configured) {" ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From iklam at openjdk.java.net Mon Sep 13 01:59:55 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Mon, 13 Sep 2021 01:59:55 GMT Subject: RFR: 8273610: LogTestFixture::restore_config() should not restore options In-Reply-To: References: Message-ID: On Sat, 11 Sep 2021 01:42:34 GMT, Yasumasa Suenaga wrote: >> This is a prerequisite of https://github.com/openjdk/jdk/pull/5407 >> >> LogTestFixture::restore_config() should not restore the options because it's neither necessary nor allowed. Please see the RFE description for details. > > Looks good. Thank you for fixing this! Thanks @YaSuenag and @dholmes-ora for the review. ------------- PR: https://git.openjdk.java.net/jdk/pull/5472 From iklam at openjdk.java.net Mon Sep 13 01:59:55 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Mon, 13 Sep 2021 01:59:55 GMT Subject: Integrated: 8273610: LogTestFixture::restore_config() should not restore options In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 18:13:37 GMT, Ioi Lam wrote: > This is a prerequisite of https://github.com/openjdk/jdk/pull/5407 > > LogTestFixture::restore_config() should not restore the options because it's neither necessary nor allowed. Please see the RFE description for details. This pull request has now been integrated. Changeset: 9f86082f Author: Ioi Lam URL: https://git.openjdk.java.net/jdk/commit/9f86082fd5174b4543eb6abc0879690430208ba0 Stats: 9 lines in 1 file changed: 4 ins; 3 del; 2 mod 8273610: LogTestFixture::restore_config() should not restore options Reviewed-by: ysuenaga, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5472 From ysuenaga at openjdk.java.net Mon Sep 13 02:48:17 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Mon, 13 Sep 2021 02:48:17 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v7] In-Reply-To: References: Message-ID: > We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. > > `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. > > `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. > They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. > > > share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); > share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); > > share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " > > share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); > share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); > share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); > > > I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` > > In addition, we might see following logs which relate to UL: > > > [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied > [0.000s][error][logging] Invalid tag 'aaa' in log selection. > [0.000s][error][logging] Invalid level 'aaa' in log selection. > [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). > [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file > [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. Yasumasa Suenaga has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: - Fix comments - Merge remote-tracking branch 'upstream/master' into JDK-8273471 - Add comments about parse_options() call - Fix GTest failure - output options for stdout/err should be applied just once - Refactoring FoldMultilinesTest - Merge remote-tracking branch 'upstream/master' into JDK-8273471 - Add test for default log output (stdout) - Fix comments - 8273471: Add foldmultilines to UL for stdout/err ------------- Changes: https://git.openjdk.java.net/jdk/pull/5407/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5407&range=06 Stats: 130 lines in 7 files changed: 87 ins; 20 del; 23 mod Patch: https://git.openjdk.java.net/jdk/pull/5407.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5407/head:pull/5407 PR: https://git.openjdk.java.net/jdk/pull/5407 From ysuenaga at openjdk.java.net Mon Sep 13 02:48:19 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Mon, 13 Sep 2021 02:48:19 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v5] In-Reply-To: <_A7pPQWXHEKvk0vWMOX9bppNqCWhWykoELNVwqjnRQM=.e1f5149b-958c-49e6-b499-9823bb66fef9@github.com> References: <_A7pPQWXHEKvk0vWMOX9bppNqCWhWykoELNVwqjnRQM=.e1f5149b-958c-49e6-b499-9823bb66fef9@github.com> Message-ID: On Sun, 12 Sep 2021 22:16:35 GMT, David Holmes wrote: >> I added it. > > You added it in the wrong place - it is supposed to document the not-present "else" part of "if (!stdout_configured) {" Sorry, I fixed it in new commit. ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From ysuenaga at openjdk.java.net Mon Sep 13 02:48:20 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Mon, 13 Sep 2021 02:48:20 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v6] In-Reply-To: References: <4-o4duRXC_1e696wkRlPrS9JlJftt_dKlxyxa6MI8Og=.2bbd7e57-6ffd-4740-a9c2-dfdb5520a2d1@github.com> Message-ID: On Sat, 11 Sep 2021 01:43:21 GMT, Yasumasa Suenaga wrote: >> I posted the PR: https://github.com/openjdk/jdk/pull/5472 > > Thanks! I will modify this PR after merging #5472 . I merged #5472 . ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From dholmes at openjdk.java.net Mon Sep 13 03:35:55 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Mon, 13 Sep 2021 03:35:55 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v7] In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 02:48:17 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: > > - Fix comments > - Merge remote-tracking branch 'upstream/master' into JDK-8273471 > - Add comments about parse_options() call > - Fix GTest failure > - output options for stdout/err should be applied just once > - Refactoring FoldMultilinesTest > - Merge remote-tracking branch 'upstream/master' into JDK-8273471 > - Add test for default log output (stdout) > - Fix comments > - 8273471: Add foldmultilines to UL for stdout/err Looks good. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5407 From iklam at openjdk.java.net Mon Sep 13 06:09:57 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Mon, 13 Sep 2021 06:09:57 GMT Subject: RFR: 8273471: Add foldmultilines to UL for stdout/err [v7] In-Reply-To: References: Message-ID: <2YPQIY6ITS3pa-9Z4W_5KC8mZxOWK-M8cIf8LdpHtUU=.ee604db2-4b2d-4450-8bfa-6a60e30574aa@github.com> On Mon, 13 Sep 2021 02:48:17 GMT, Yasumasa Suenaga wrote: >> We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. >> >> `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. >> >> `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. >> They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. >> >> >> share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); >> share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); >> >> share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " >> >> share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); >> share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); >> share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); >> >> >> I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` >> >> In addition, we might see following logs which relate to UL: >> >> >> [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied >> [0.000s][error][logging] Invalid tag 'aaa' in log selection. >> [0.000s][error][logging] Invalid level 'aaa' in log selection. >> [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). >> [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file >> [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. > > Yasumasa Suenaga has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: > > - Fix comments > - Merge remote-tracking branch 'upstream/master' into JDK-8273471 > - Add comments about parse_options() call > - Fix GTest failure > - output options for stdout/err should be applied just once > - Refactoring FoldMultilinesTest > - Merge remote-tracking branch 'upstream/master' into JDK-8273471 > - Add test for default log output (stdout) > - Fix comments > - 8273471: Add foldmultilines to UL for stdout/err LGTM ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5407 From ihse at openjdk.java.net Mon Sep 13 06:42:47 2021 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Mon, 13 Sep 2021 06:42:47 GMT Subject: RFR: 8273606: Zero: SPARC64 build fails with si_band type mismatch In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 19:36:35 GMT, John Paul Adrian Glaubitz wrote: > Yes, that's correct. See: https://salsa.debian.org/openjdk-team/openjdk/-/blob/openjdk-16/debian/patches/hotspot-disable-werror.diff @glaubitz That patch seems unlikely to work on modern JDK?! The old hotspot build system was removed ages ago. ------------- PR: https://git.openjdk.java.net/jdk/pull/5470 From stuefe at openjdk.java.net Mon Sep 13 07:54:51 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Mon, 13 Sep 2021 07:54:51 GMT Subject: RFR: 8273606: Zero: SPARC64 build fails with si_band type mismatch In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 16:25:34 GMT, Aleksey Shipilev wrote: > This is actually caught by `-Werror=format` that is enabled by default. > > > $ sh ./configure --with-debug-level=slowdebug --with-boot-jdk=/home/shade/Install/jdk16-16.0.2-ea/ --openjdk-target=sparc64-linux-gnu --with-sysroot=/chroots/sparc64/ --with-jvm-variants=zero > $ make images Patch itself seems fine and trivial. Lest someone removes the cast, maybe add a comment that this is for the sake of glibc problems on sparc? Leave it up to you. ------------- Marked as reviewed by stuefe (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5470 From shade at openjdk.java.net Mon Sep 13 07:59:49 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Mon, 13 Sep 2021 07:59:49 GMT Subject: RFR: 8273606: Zero: SPARC64 build fails with si_band type mismatch In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 19:36:35 GMT, John Paul Adrian Glaubitz wrote: > > Apparently, it was never fixed in glibc for sparc64? We can still make a defensive cast to `long`. > > Can you file a bug report to the glibc bug tracker? I see that was already reported as [glibc bug #23821](https://sourceware.org/bugzilla/show_bug.cgi?id=23821), and glibc maintainers decided not to fix it. So, we can still make a defensive cast to (long), which would be no-op if the type is in fact long. I verified that latest glibc sources still have: sysdeps/unix/sysv/linux/bits/types/siginfo_t.h 110: __SI_BAND_TYPE si_band; /* Band event for SIGPOLL. */ sysdeps/unix/sysv/linux/sparc/bits/siginfo-arch.h 9:# define __SI_BAND_TYPE int ------------- PR: https://git.openjdk.java.net/jdk/pull/5470 From shade at openjdk.java.net Mon Sep 13 08:05:20 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Mon, 13 Sep 2021 08:05:20 GMT Subject: RFR: 8273606: Zero: SPARC64 build fails with si_band type mismatch [v2] In-Reply-To: References: Message-ID: > This is actually caught by `-Werror=format` that is enabled by default. > > > $ sh ./configure --with-debug-level=slowdebug --with-boot-jdk=/home/shade/Install/jdk16-16.0.2-ea/ --openjdk-target=sparc64-linux-gnu --with-sysroot=/chroots/sparc64/ --with-jvm-variants=zero > $ make images Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Add comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5470/files - new: https://git.openjdk.java.net/jdk/pull/5470/files/b1c72819..4746e91c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5470&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5470&range=00-01 Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5470.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5470/head:pull/5470 PR: https://git.openjdk.java.net/jdk/pull/5470 From shade at openjdk.java.net Mon Sep 13 08:05:21 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Mon, 13 Sep 2021 08:05:21 GMT Subject: RFR: 8273606: Zero: SPARC64 build fails with si_band type mismatch [v2] In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 07:51:48 GMT, Thomas Stuefe wrote: > Lest someone removes the cast, maybe add a comment that this is for the sake of glibc problems on sparc? Leave it up to you. Yes. I added a comment block describing what happens here, plus a link to glibc bugtracker. ------------- PR: https://git.openjdk.java.net/jdk/pull/5470 From shade at openjdk.java.net Mon Sep 13 08:16:53 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Mon, 13 Sep 2021 08:16:53 GMT Subject: RFR: 8256977: Bump minimum GCC from 5.x to 6 for JDK In-Reply-To: References: Message-ID: <9AfHTba66cQbBVqcJmzdlN01t6MwQ1RtF6ZaJy3vVAI=.a4e91977-dc83-4a3d-ac9f-ca2ff0389901@github.com> On Thu, 9 Sep 2021 19:28:54 GMT, Magnus Ihse Bursie wrote: > The minimum acceptable version is raised from 5 to 6. There were no objections on the mailing list for doing so in the mainline, see https://mail.openjdk.java.net/pipermail/build-dev/2021-August/031899.html. > > This patch also reverts the workaround that was introduced in JDK-8252797 to support gcc 5.x. Yes, I think there would be no harm to do this for JDK mainline. ------------- Marked as reviewed by shade (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5452 From glaubitz at openjdk.java.net Mon Sep 13 08:31:49 2021 From: glaubitz at openjdk.java.net (John Paul Adrian Glaubitz) Date: Mon, 13 Sep 2021 08:31:49 GMT Subject: RFR: 8273606: Zero: SPARC64 build fails with si_band type mismatch In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 06:39:42 GMT, Magnus Ihse Bursie wrote: > > Yes, that's correct. See: https://salsa.debian.org/openjdk-team/openjdk/-/blob/openjdk-16/debian/patches/hotspot-disable-werror.diff > > @glaubitz That patch seems unlikely to work on modern JDK?! The old hotspot build system was removed ages ago. This is for OpenJDK-16, was that changed recently. In any case, Matthias Klose is the maintainer of the package in Debian and Ubuntu. I will let him know. ------------- PR: https://git.openjdk.java.net/jdk/pull/5470 From mgronlun at openjdk.java.net Mon Sep 13 11:04:58 2021 From: mgronlun at openjdk.java.net (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 13 Sep 2021 11:04:58 GMT Subject: RFR: 8266936: Add a finalization JFR event [v10] In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 17:37:20 GMT, Coleen Phillimore wrote: >> Markus Gr?nlund has updated the pull request incrementally with three additional commits since the last revision: >> >> - localize >> - cleanup >> - FinalizerStatistics > > src/hotspot/share/services/classLoadingService.cpp line 80: > >> 78: >> 79: size_t ClassLoadingService::compute_class_size(InstanceKlass* k) { >> 80: // lifted from ClassStatistics.do_class(Klass* k) > > Can you remove this line? I think that function is gone now. Thanks Coleen for taking a look at this. It is used internally by notify_class_loaded() and notify_class_unloaded(); therefore I will change it to have internal linkage. > src/hotspot/share/services/finalizerService.cpp line 44: > >> 42: _ik(ik), >> 43: _objects_on_heap(0), >> 44: _total_finalizers_run(0) {} > > Is this hashtable for every InstanceKlass that defines a finalizer? How many are there generally? Why couldn't this be a simple hashtable like ResourceHashtable (soon to be renamed) which you can write in only a few lines of code? This hashtable holds a FinalizerEntry for every InstanceKlass that provides a non-empty finalizer method and have allocated at least one object. How many there are in general depends on the application. A ResourceHashtable does not have the concurrency property required, as lookups and inserts will happen as part of object allocation. > src/hotspot/share/services/finalizerService.cpp line 114: > >> 112: >> 113: static inline void added() { >> 114: set_atomic(&_count); > > Why isn't Atomic::inc() good enough here? It's used everywhere else. Our Atomic implementation does not support CAS of a 64-bit value on 32-bit platforms (compiles but does not link). > src/hotspot/share/services/finalizerService.cpp line 123: > >> 121: static inline uintx hash_function(const InstanceKlass* ik) { >> 122: assert(ik != nullptr, "invariant"); >> 123: return primitive_hash(ik); > > If the hash function is primitive_hash, this hash is good enough to not need rehashing. The only reason for the rehashing for symbol and string table was that the char* had a dumb hash that was faster but could be hacked, so it needed to become a different hashcode. This doesn't need rehashing. Thank you for pointing that out. I had assumed this to be a part of the syntactic contract for using the ConcurrentHashTable. My wrong assumption was because the SymbolTable (which I used as a model) seemed to pass a "rehash_warning" bool to the accessor APIs (get, insert). However, looking more closely at the signatures in ConcurrentHashTable, that bool is a "grow_hint", not "rehash" specifically. Thanks again; I will remove the rehash support code. > src/hotspot/share/services/finalizerService.cpp line 485: > >> 483: void FinalizerService::purge_unloaded() { >> 484: assert_locked_or_safepoint(ClassLoaderDataGraph_lock); >> 485: ClassLoaderDataGraph::classes_unloading_do(&on_unloading); > > Since you remove entries on unloading, I don't see any reason to have any concurrent cleanup. > You do however need in the lookup code, some code that doesn't find the InstanceKlass if !ik->is_loader_alive() "Since you remove entries on unloading, I don't see any reason to have any concurrent cleanup." Thank you, that is true. The only concurrent work required will be to grow the table. "You do however need in the lookup code, some code that doesn't find the InstanceKlass if !ik->is_loader_alive()" A precondition is that the code doing the lookup hold the ClassLoaderDataGraph_lock or is at a safepoint. Is that still the case? Would not purge_unloaded() take out the InstanceKlass from the table, as part of unloading, before !ik->is_loader_alive() is published to the outside world? ------------- PR: https://git.openjdk.java.net/jdk/pull/4731 From pliden at openjdk.java.net Mon Sep 13 12:06:06 2021 From: pliden at openjdk.java.net (Per Liden) Date: Mon, 13 Sep 2021 12:06:06 GMT Subject: RFR: 8273639: tests fail with "assert(_handle_mark_nesting > 1) failed: memory leak: allocating handle outside HandleMark" Message-ID: <-ZR4QFDz_0QatpN-nuJnzKSBQJ6jUZf0Qp3ZPOHJwUQ=.2315aca1-f4db-401f-be08-56bf41859dc4@github.com> This is a fix for an unintended side-effect of JDK-8273482. The problem is that we need to have a HandleMark on the stack before calling ThreadStackTrace::dump_stack_at_safepoint(). Before JDK-8273482, calls to ThreadStackTrace::dump_stack_at_safepoint() were always done from the VMThread, which always has a HandleMark on the stack before evaluating a VM operation. After JDK-8273482, calls to this function can be made from WorkerThreads, which doesn't always have a HandleMark on its stack. The fix is simple, make sure we have a HandleMark on the stack before calling ThreadStackTrace::dump_stack_at_safepoint(). ------------- Commit messages: - 8273639: tests fail with "assert(_handle_mark_nesting > 1) failed: memory leak: allocating handle outside HandleMark" Changes: https://git.openjdk.java.net/jdk/pull/5492/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5492&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273639 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5492.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5492/head:pull/5492 PR: https://git.openjdk.java.net/jdk/pull/5492 From dholmes at openjdk.java.net Mon Sep 13 12:46:56 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Mon, 13 Sep 2021 12:46:56 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 06:01:42 GMT, Yumin Qi wrote: >> src/hotspot/share/cds/cdsConstants.cpp line 61: >> >>> 59: >>> 60: size_t get_cds_offset(const char* name) { >>> 61: for (int i = 0; i < (int)(sizeof(cds_offsets)/sizeof(cds_offsets[0])); i++) { >> >> Can't we just define a size for the array and use that? It isn't really a dynamic/unknown quantity. > > The array size is known at compile time --- it is not dynamic but we do not need to manually count the size of the array this way. If define a size for the array, we need to count the number of items in the array to define the array size. We may add more items to the array --- just add items and don't need change anything else. Since total array memory size and array component size are known at compile time, so compiler will not generate code to calculate the size. How about this? > const int size = (int)(sizeof(cds_offsets)/sizeof(cds_offsets[0])); > for (int i = 0; i < size; i++) { > ... > } I always thought that was a hack way of determining an array size, not an approved method. :( Don't worry just leave it as-is. >> src/hotspot/share/cds/dynamicArchive.hpp line 45: >> >>> 43: >>> 44: public: >>> 45: int _base_region_crc[MetaspaceShared::n_regions]; >> >> This looks like it should be private with either a public accessor or else a friend declaration for the client code. > > Let me try but I remember it does not work with constexpr initialization. This is why I move the data field to public not using the public accessor. So we are trading off use of constexpr versus broken encapsulation? :( I can't say I understand the details here. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From stefank at openjdk.java.net Mon Sep 13 13:41:32 2021 From: stefank at openjdk.java.net (Stefan Karlsson) Date: Mon, 13 Sep 2021 13:41:32 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 18:13:10 GMT, Yumin Qi wrote: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. > > Tests: ter1-4 > > Thanks > Yumin I saw the array size comments ... src/hotspot/share/cds/cdsConstants.cpp line 26: > 24: > 25: #include "precompiled.hpp" > 26: #include It is not stated in the style guide, but I think most files include the system headers after the HotSpot headers, separated by a blank line. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From stefank at openjdk.java.net Mon Sep 13 13:41:34 2021 From: stefank at openjdk.java.net (Stefan Karlsson) Date: Mon, 13 Sep 2021 13:41:34 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 12:42:27 GMT, David Holmes wrote: >> The array size is known at compile time --- it is not dynamic but we do not need to manually count the size of the array this way. If define a size for the array, we need to count the number of items in the array to define the array size. We may add more items to the array --- just add items and don't need change anything else. Since total array memory size and array component size are known at compile time, so compiler will not generate code to calculate the size. How about this? >> const int size = (int)(sizeof(cds_offsets)/sizeof(cds_offsets[0])); >> for (int i = 0; i < size; i++) { >> ... >> } > > I always thought that was a hack way of determining an array size, not an approved method. :( > > Don't worry just leave it as-is. We have functionality for this in globalDefinitions.hpp: #define ARRAY_SIZE(array) sizeof(array_size_impl(array)) ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From coleenp at openjdk.java.net Mon Sep 13 14:01:17 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Mon, 13 Sep 2021 14:01:17 GMT Subject: RFR: 8273639: tests fail with "assert(_handle_mark_nesting > 1) failed: memory leak: allocating handle outside HandleMark" In-Reply-To: <-ZR4QFDz_0QatpN-nuJnzKSBQJ6jUZf0Qp3ZPOHJwUQ=.2315aca1-f4db-401f-be08-56bf41859dc4@github.com> References: <-ZR4QFDz_0QatpN-nuJnzKSBQJ6jUZf0Qp3ZPOHJwUQ=.2315aca1-f4db-401f-be08-56bf41859dc4@github.com> Message-ID: On Mon, 13 Sep 2021 11:57:05 GMT, Per Liden wrote: > This is a fix for an unintended side-effect of JDK-8273482. The problem is that we need to have a HandleMark on the stack before calling ThreadStackTrace::dump_stack_at_safepoint(). Before JDK-8273482, calls to ThreadStackTrace::dump_stack_at_safepoint() were always done from the VMThread, which always has a HandleMark on the stack before evaluating a VM operation. After JDK-8273482, calls to this function can be made from WorkerThreads, which doesn't always have a HandleMark on its stack. The fix is simple, make sure we have a HandleMark on the stack before calling ThreadStackTrace::dump_stack_at_safepoint(). Looks good and trivial. We should remove the HandleMark mechanism which is a leftover from when Metadata was in Handles. There aren't many places where we have a lot of Handles that would benefit from the optimization of bulk cleanup of Handles and it's really easy to have unnecessary Handles that GC has to process. ------------- Marked as reviewed by coleenp (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5492 From minqi at openjdk.java.net Mon Sep 13 15:59:50 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Mon, 13 Sep 2021 15:59:50 GMT Subject: RFR: 8261455: Automatically generate the CDS archive if necessary [v2] In-Reply-To: References: <3RvE2aINt6h4QvSPdW_G-wPIPm6wKkl7cVCvCQNrW5Y=.aae553c8-eaf2-4e03-9454-50f86ec0bd62@github.com> Message-ID: On Sat, 14 Aug 2021 15:21:50 GMT, Yumin Qi wrote: >> When shared archive (dynamic archive) failed to map due to damage of the archive file, dump/run jdk version mismatch or non-existence file etc, the new patch will automatically create a new shared archive if -XX:+AutoCreateSharedArchive specified with the name based on SharedArchiveFile. >> >> Tests: tier1,tier2,tier3,tier4 >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: > > Fixed base:top related issue and add more tests The work will continue after related small bug fixed first. ------------- PR: https://git.openjdk.java.net/jdk/pull/5077 From rschmelter at openjdk.java.net Mon Sep 13 16:25:59 2021 From: rschmelter at openjdk.java.net (Ralf Schmelter) Date: Mon, 13 Sep 2021 16:25:59 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: On Mon, 6 Sep 2021 08:03:22 GMT, Lin Zang wrote: >> 8252842: Extend jmap to support parallel heap dump > > Lin Zang has updated the pull request incrementally with one additional commit since the last revision: > > fix build error The change seems OK so far, but I've found a few issues. src/hotspot/share/services/attachListener.cpp line 255: > 253: HeapDumper dumper(live_objects_only /* request GC */); > 254: dumper.dump(path, out, (int)level, (uint)parallel_thread_num); > 255: } The call signature for dump has changed, since it now takes an overwrite bool value after the compression level. This means that actually the number of parallel threads is not set but remains at the default value of 1. So the parallel case is never executed currently. src/hotspot/share/services/heapDumper.cpp line 1681: > 1679: }; > 1680: > 1681: HeapDumpLargeObjectListElem* _head; This should be volatile. src/hotspot/share/services/heapDumper.cpp line 1682: > 1680: > 1681: HeapDumpLargeObjectListElem* _head; > 1682: uint _length; I don't think the length is needed at all. You just have to know if the list is empty or not and that can be found out via the _head field. src/hotspot/share/services/heapDumper.cpp line 1714: > 1712: } > 1713: HeapDumpLargeObjectListElem* entry = _head; > 1714: if (_head->_next != NULL) { Why the check? Wouldn't you want _head to be NULL when the last entry was removed? src/hotspot/share/services/heapDumper.cpp line 1717: > 1715: _head = _head->_next; > 1716: } > 1717: entry->_next = NULL; I don't see why you would NULL out the _next field. The entry is deleted shortly after anyway. src/hotspot/share/services/heapDumper.cpp line 1797: > 1795: if (o->is_instance()) { > 1796: InstanceKlass* ik = InstanceKlass::cast(o->klass()); > 1797: size = DumperSupport::instance_size(ik); Getting the size of an instance can be surprisingly expensive for classes with many static fields, since we iterate over all static fields of the class. So I would avoid having to calculate the size twice (here and when we are actually dump it). Maybe here it would just be enough to use o->size() * 8 as an upper limit value of the real size in the heap dump. After all practically no non-array object will ever we that large. src/hotspot/share/services/heapDumper.cpp line 1822: > 1820: Monitor* _lock; > 1821: uint _dumper_number; > 1822: uint _waiting_number; The _waiting_number doesn't seem to really have a purpose. No decision depends on it. src/hotspot/share/services/heapDumper.cpp line 2448: > 2446: // dump the large objects. > 2447: void VM_HeapDumper::dump_large_objects(ObjectClosure* cl) { > 2448: if (_large_object_list->is_empty()) { drain() should be able to handle an empyt list, so this check should not be needed. src/hotspot/share/services/heapDumperCompression.cpp line 386: > 384: size_t tmp_max = 0; > 385: > 386: MonitorLocker ml(_lock, Mutex::_no_safepoint_check_flag); This is not thread safe if flush_external_buffer() or get_new_buffer() are called concurrently. But it seems to be Ok since flush_external_buffer() is only called with the _lock var of the parallel writer locked, so there is no contention. Is this correct? ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From mgronlun at openjdk.java.net Mon Sep 13 17:12:49 2021 From: mgronlun at openjdk.java.net (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 13 Sep 2021 17:12:49 GMT Subject: RFR: 8266936: Add a finalization JFR event [v11] In-Reply-To: References: Message-ID: <3hNX4mQ98TyLNDmCXO4hDz8EMDoQ4ukr1Y1bvX1k8kk=.cc67221c-258a-4cac-a368-09d5fe44f245@github.com> > Greetings, > > Object.finalize() was deprecated in JDK9. There is an ongoing effort to replace and mitigate Object.finalize() uses in the JDK libraries; please see https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. > > We also like to assist users in replacing and mitigating uses in non-JDK code. > > Hence, this changeset adds a periodic JFR event to help identify which classes are overriding Object.finalize(). > > Thanks > Markus Markus Gr?nlund has updated the pull request incrementally with two additional commits since the last revision: - remove rehashing and rely on default grow_hint for table resize - mtStatistics ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4731/files - new: https://git.openjdk.java.net/jdk/pull/4731/files/fd86899f..62592daf Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4731&range=10 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4731&range=09-10 Stats: 258 lines in 6 files changed: 25 ins; 197 del; 36 mod Patch: https://git.openjdk.java.net/jdk/pull/4731.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4731/head:pull/4731 PR: https://git.openjdk.java.net/jdk/pull/4731 From mseledtsov at openjdk.java.net Mon Sep 13 17:40:32 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Mon, 13 Sep 2021 17:40:32 GMT Subject: RFR: JDK-8195809: [TESTBUG] jps and jcmd -l support for containers is not tested [v3] In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 21:18:23 GMT, Mikhailo Seledtsov wrote: >> Please review this addition of new testing: >> - new test for sending jcmd commands across container boundaries >> - updated existing sidecar test, enabling jcmd test case > > Mikhailo Seledtsov has updated the pull request incrementally with one additional commit since the last revision: > > Removed unnecessary UsePerfData per review feedback Harold, Kevin, thank you for review. ------------- PR: https://git.openjdk.java.net/jdk/pull/5368 From mseledtsov at openjdk.java.net Mon Sep 13 17:40:35 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Mon, 13 Sep 2021 17:40:35 GMT Subject: Integrated: JDK-8195809: [TESTBUG] jps and jcmd -l support for containers is not tested In-Reply-To: References: Message-ID: On Sat, 4 Sep 2021 00:03:14 GMT, Mikhailo Seledtsov wrote: > Please review this addition of new testing: > - new test for sending jcmd commands across container boundaries > - updated existing sidecar test, enabling jcmd test case This pull request has now been integrated. Changeset: 7c26ddb5 Author: Mikhailo Seledtsov URL: https://git.openjdk.java.net/jdk/commit/7c26ddb575bb6f1161850c31a933d154ae8b96e3 Stats: 200 lines in 3 files changed: 193 ins; 2 del; 5 mod 8195809: [TESTBUG] jps and jcmd -l support for containers is not tested Reviewed-by: hseigel, kevinw ------------- PR: https://git.openjdk.java.net/jdk/pull/5368 From minqi at openjdk.java.net Mon Sep 13 19:04:24 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Mon, 13 Sep 2021 19:04:24 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 13:35:11 GMT, Stefan Karlsson wrote: >> I always thought that was a hack way of determining an array size, not an approved method. :( >> >> Don't worry just leave it as-is. > > We have functionality for this in globalDefinitions.hpp: > > #define ARRAY_SIZE(array) sizeof(array_size_impl(array)) @stefank Thanks --- it saves code size. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From minqi at openjdk.java.net Mon Sep 13 19:10:53 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Mon, 13 Sep 2021 19:10:53 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 12:43:59 GMT, David Holmes wrote: >> Let me try but I remember it does not work with constexpr initialization. This is why I move the data field to public not using the public accessor. > > So we are trading off use of constexpr versus broken encapsulation? :( I can't say I understand the details here. For constexpr array --- the initialization requires every item in the array must be initialized with const expression. I have rolled back the access change. By putting the global arrays offsets and constants inside CDSConstants, and making CDSConstants a friend class of the accessed class, we can avoid such changes. Thanks! ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From coleenp at openjdk.java.net Mon Sep 13 20:18:52 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Mon, 13 Sep 2021 20:18:52 GMT Subject: RFR: 8273675: Remove unused Universe::_verify_in_progress flag Message-ID: <0g1o8QrgLveO9E2Mfag25O0LtISf4YUSvRgNJhy4jiY=.105f031d-c523-4c1b-a23e-1673a2bba544@github.com> This is a trivial change to remove an unused flag in class Universe. Tested with tier1 on Oracle platforms. ------------- Commit messages: - 8273675: Remove unused Universe::_verify_in_progress flag Changes: https://git.openjdk.java.net/jdk/pull/5501/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5501&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273675 Stats: 13 lines in 2 files changed: 0 ins; 13 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5501.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5501/head:pull/5501 PR: https://git.openjdk.java.net/jdk/pull/5501 From minqi at openjdk.java.net Mon Sep 13 20:25:46 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Mon, 13 Sep 2021 20:25:46 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp [v2] In-Reply-To: References: Message-ID: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. > > Tests: ter1-4 > > Thanks > Yumin Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: Make array of offsets and constants member of class CDSConstants and made CDSConstants a friend class of accessed classes ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5450/files - new: https://git.openjdk.java.net/jdk/pull/5450/files/30ede36e..7bb5ee2e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=00-01 Stats: 46 lines in 4 files changed: 14 ins; 8 del; 24 mod Patch: https://git.openjdk.java.net/jdk/pull/5450.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5450/head:pull/5450 PR: https://git.openjdk.java.net/jdk/pull/5450 From hseigel at openjdk.java.net Mon Sep 13 20:30:58 2021 From: hseigel at openjdk.java.net (Harold Seigel) Date: Mon, 13 Sep 2021 20:30:58 GMT Subject: RFR: 8273675: Remove unused Universe::_verify_in_progress flag In-Reply-To: <0g1o8QrgLveO9E2Mfag25O0LtISf4YUSvRgNJhy4jiY=.105f031d-c523-4c1b-a23e-1673a2bba544@github.com> References: <0g1o8QrgLveO9E2Mfag25O0LtISf4YUSvRgNJhy4jiY=.105f031d-c523-4c1b-a23e-1673a2bba544@github.com> Message-ID: <_fooOcAsJat0PlE-tHxL9L20DWtgoutTvlye41BA2rs=.998aa342-34c7-40ec-a6eb-5e2f8d609fdc@github.com> On Mon, 13 Sep 2021 20:07:14 GMT, Coleen Phillimore wrote: > This is a trivial change to remove an unused flag in class Universe. > Tested with tier1 on Oracle platforms. Looks good and trivial. Thanks, Harold ------------- Marked as reviewed by hseigel (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5501 From coleenp at openjdk.java.net Mon Sep 13 20:36:08 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Mon, 13 Sep 2021 20:36:08 GMT Subject: RFR: 8273675: Remove unused Universe::_verify_in_progress flag In-Reply-To: <0g1o8QrgLveO9E2Mfag25O0LtISf4YUSvRgNJhy4jiY=.105f031d-c523-4c1b-a23e-1673a2bba544@github.com> References: <0g1o8QrgLveO9E2Mfag25O0LtISf4YUSvRgNJhy4jiY=.105f031d-c523-4c1b-a23e-1673a2bba544@github.com> Message-ID: <6bA3Fd5brrlQ0_yd30DF6hZmaZOUULn3I-bLGl3Pfxs=.15745fb1-a812-4ba4-8501-9ea2446a563e@github.com> On Mon, 13 Sep 2021 20:07:14 GMT, Coleen Phillimore wrote: > This is a trivial change to remove an unused flag in class Universe. > Tested with tier1 on Oracle platforms. Thanks Harold! ------------- PR: https://git.openjdk.java.net/jdk/pull/5501 From coleenp at openjdk.java.net Mon Sep 13 20:39:59 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Mon, 13 Sep 2021 20:39:59 GMT Subject: Integrated: 8273675: Remove unused Universe::_verify_in_progress flag In-Reply-To: <0g1o8QrgLveO9E2Mfag25O0LtISf4YUSvRgNJhy4jiY=.105f031d-c523-4c1b-a23e-1673a2bba544@github.com> References: <0g1o8QrgLveO9E2Mfag25O0LtISf4YUSvRgNJhy4jiY=.105f031d-c523-4c1b-a23e-1673a2bba544@github.com> Message-ID: On Mon, 13 Sep 2021 20:07:14 GMT, Coleen Phillimore wrote: > This is a trivial change to remove an unused flag in class Universe. > Tested with tier1 on Oracle platforms. This pull request has now been integrated. Changeset: 5095068d Author: Coleen Phillimore URL: https://git.openjdk.java.net/jdk/commit/5095068d3ba411c56752716df8e35e4215885e1d Stats: 13 lines in 2 files changed: 0 ins; 13 del; 0 mod 8273675: Remove unused Universe::_verify_in_progress flag Reviewed-by: hseigel ------------- PR: https://git.openjdk.java.net/jdk/pull/5501 From iklam at openjdk.java.net Mon Sep 13 20:42:59 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Mon, 13 Sep 2021 20:42:59 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp [v2] In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 19:07:30 GMT, Yumin Qi wrote: >> So we are trading off use of constexpr versus broken encapsulation? :( I can't say I understand the details here. > > For constexpr array --- the initialization requires every item in the array must be initialized with const expression. I have rolled back the access change. By putting the global arrays offsets and constants inside CDSConstants, and making CDSConstants a friend class of the accessed class, we can avoid such changes. Thanks! `_base_region_crc` should be private and `CDSConstants` should be a friend class of `DynamicArchiveHeader` ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From iklam at openjdk.java.net Mon Sep 13 20:42:58 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Mon, 13 Sep 2021 20:42:58 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp [v2] In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 20:25:46 GMT, Yumin Qi wrote: >> Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. >> The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. >> >> Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. >> >> Tests: ter1-4 >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: > > Make array of offsets and constants member of class CDSConstants and made CDSConstants a friend class of accessed classes Changes requested by iklam (Reviewer). src/hotspot/share/cds/cdsConstants.cpp line 49: > 47: { "dynamic_magic", (int)CDS_DYNAMIC_ARCHIVE_MAGIC }, > 48: { "int_size", sizeof(int) }, > 49: { "CDSFileMapRegion_size", sizeof(CDSFileMapRegion) }, Should be `(int)sizeof(int)` because the type of `sizeof(...)` is implementation-defined. See https://en.cppreference.com/w/cpp/types/size_t ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From minqi at openjdk.java.net Mon Sep 13 21:36:42 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Mon, 13 Sep 2021 21:36:42 GMT Subject: RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp [v2] In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 20:38:41 GMT, Ioi Lam wrote: >> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: >> >> Make array of offsets and constants member of class CDSConstants and made CDSConstants a friend class of accessed classes > > src/hotspot/share/cds/cdsConstants.cpp line 49: > >> 47: { "dynamic_magic", (int)CDS_DYNAMIC_ARCHIVE_MAGIC }, >> 48: { "int_size", sizeof(int) }, >> 49: { "CDSFileMapRegion_size", sizeof(CDSFileMapRegion) }, > > Should be `(int)sizeof(int)` because the type of `sizeof(...)` is implementation-defined. See https://en.cppreference.com/w/cpp/types/size_t Now that all almost all (except for 'magic') with size_t, we should use name vs size_t in the struct and get functions, cast when return from vm in whiteBox.cpp. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From dholmes at openjdk.java.net Mon Sep 13 22:59:12 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Mon, 13 Sep 2021 22:59:12 GMT Subject: RFR: 8273675: Remove unused Universe::_verify_in_progress flag In-Reply-To: <0g1o8QrgLveO9E2Mfag25O0LtISf4YUSvRgNJhy4jiY=.105f031d-c523-4c1b-a23e-1673a2bba544@github.com> References: <0g1o8QrgLveO9E2Mfag25O0LtISf4YUSvRgNJhy4jiY=.105f031d-c523-4c1b-a23e-1673a2bba544@github.com> Message-ID: <3rM2FwEjaTuC2DftjrLwO8_FdU2EaZFSnH7xyH5gwUE=.7386bdf1-40f2-4839-909e-8e2941e258c4@github.com> On Mon, 13 Sep 2021 20:07:14 GMT, Coleen Phillimore wrote: > This is a trivial change to remove an unused flag in class Universe. > Tested with tier1 on Oracle platforms. Thanks for splitting this part out Coleen! David ------------- PR: https://git.openjdk.java.net/jdk/pull/5501 From minqi at openjdk.java.net Mon Sep 13 23:12:19 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Mon, 13 Sep 2021 23:12:19 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v3] In-Reply-To: References: Message-ID: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. > > Tests: ter1-4 > > Thanks > Yumin Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: Rollled back _base_region_crc to private, changed CDSConst's value from type int to size_t ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5450/files - new: https://git.openjdk.java.net/jdk/pull/5450/files/7bb5ee2e..c290e7c1 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=01-02 Stats: 25 lines in 3 files changed: 2 ins; 2 del; 21 mod Patch: https://git.openjdk.java.net/jdk/pull/5450.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5450/head:pull/5450 PR: https://git.openjdk.java.net/jdk/pull/5450 From dholmes at openjdk.java.net Tue Sep 14 00:53:09 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Tue, 14 Sep 2021 00:53:09 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v3] In-Reply-To: References: Message-ID: <4nBhGQuePMa50TjDO5tkirpP9pwUn5zRqiHmbMjMzfM=.9af4475a-e97b-491b-b289-44724f5cfd73@github.com> On Mon, 13 Sep 2021 23:12:19 GMT, Yumin Qi wrote: >> Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. >> The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. >> >> Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. >> >> Tests: ter1-4 >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: > > Rollled back _base_region_crc to private, changed CDSConst's value from type int to size_t src/hotspot/share/cds/cdsConstants.hpp line 37: > 35: public: > 36: static CDSConst offsets[]; > 37: static CDSConst constants[]; Why are these public? ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From dholmes at openjdk.java.net Tue Sep 14 02:21:06 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Tue, 14 Sep 2021 02:21:06 GMT Subject: RFR: 8273639: tests fail with "assert(_handle_mark_nesting > 1) failed: memory leak: allocating handle outside HandleMark" In-Reply-To: <-ZR4QFDz_0QatpN-nuJnzKSBQJ6jUZf0Qp3ZPOHJwUQ=.2315aca1-f4db-401f-be08-56bf41859dc4@github.com> References: <-ZR4QFDz_0QatpN-nuJnzKSBQJ6jUZf0Qp3ZPOHJwUQ=.2315aca1-f4db-401f-be08-56bf41859dc4@github.com> Message-ID: On Mon, 13 Sep 2021 11:57:05 GMT, Per Liden wrote: > This is a fix for an unintended side-effect of JDK-8273482. The problem is that we need to have a HandleMark on the stack before calling ThreadStackTrace::dump_stack_at_safepoint(). Before JDK-8273482, calls to ThreadStackTrace::dump_stack_at_safepoint() were always done from the VMThread, which always has a HandleMark on the stack before evaluating a VM operation. After JDK-8273482, calls to this function can be made from WorkerThreads, which doesn't always have a HandleMark on its stack. The fix is simple, make sure we have a HandleMark on the stack before calling ThreadStackTrace::dump_stack_at_safepoint(). Looks good. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5492 From minqi at openjdk.java.net Tue Sep 14 03:04:14 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Tue, 14 Sep 2021 03:04:14 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v4] In-Reply-To: References: Message-ID: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. > > Tests: ter1-4 > > Thanks > Yumin Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: offsets and constants should be private ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5450/files - new: https://git.openjdk.java.net/jdk/pull/5450/files/c290e7c1..4f045e35 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=02-03 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5450.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5450/head:pull/5450 PR: https://git.openjdk.java.net/jdk/pull/5450 From minqi at openjdk.java.net Tue Sep 14 03:16:05 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Tue, 14 Sep 2021 03:16:05 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v3] In-Reply-To: <4nBhGQuePMa50TjDO5tkirpP9pwUn5zRqiHmbMjMzfM=.9af4475a-e97b-491b-b289-44724f5cfd73@github.com> References: <4nBhGQuePMa50TjDO5tkirpP9pwUn5zRqiHmbMjMzfM=.9af4475a-e97b-491b-b289-44724f5cfd73@github.com> Message-ID: On Tue, 14 Sep 2021 00:50:13 GMT, David Holmes wrote: >> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: >> >> Rollled back _base_region_crc to private, changed CDSConst's value from type int to size_t > > src/hotspot/share/cds/cdsConstants.hpp line 37: > >> 35: public: >> 36: static CDSConst offsets[]; >> 37: static CDSConst constants[]; > > Why are these public? Should be private, thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From dholmes at openjdk.java.net Tue Sep 14 04:22:04 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Tue, 14 Sep 2021 04:22:04 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v4] In-Reply-To: References: Message-ID: On Tue, 14 Sep 2021 03:04:14 GMT, Yumin Qi wrote: >> Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. >> The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. >> >> Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. >> >> Tests: ter1-4 >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: > > offsets and constants should be private Hi Yumin, Updates seem okay to me. One query below. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5450 From dholmes at openjdk.java.net Tue Sep 14 04:22:05 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Tue, 14 Sep 2021 04:22:05 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v4] In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 13:33:19 GMT, Stefan Karlsson wrote: >> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: >> >> offsets and constants should be private > > src/hotspot/share/cds/cdsConstants.cpp line 26: > >> 24: >> 25: #include "precompiled.hpp" >> 26: #include > > It is not stated in the style guide, but I think most files include the system headers after the HotSpot headers, separated by a blank line. Is this even needed now? I don't see it being used. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From ccheung at openjdk.java.net Tue Sep 14 05:15:13 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Tue, 14 Sep 2021 05:15:13 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump In-Reply-To: <7tS6Rp9DRCfFZ2EbuBYXk8bfvOBDP1_j51jkaBb8k3E=.1e5c76e1-a5a4-4b26-8252-f57b4a5838b8@github.com> References: <7tS6Rp9DRCfFZ2EbuBYXk8bfvOBDP1_j51jkaBb8k3E=.1e5c76e1-a5a4-4b26-8252-f57b4a5838b8@github.com> Message-ID: On Fri, 10 Sep 2021 22:19:11 GMT, Ioi Lam wrote: >> Before this change, unregistered classes are loaded by the boot class loader during CDS dump time. >> This RFE creates an URLClassLoader based on the source specified in the classlist and uses the URLClassLoader to load the unregistered class during CDS dump time. The URLClassLoader instances will be cached in a hash table with the source as the key so that classes associated with the same source will be loaded by the same instance of class loader. >> >> Passed tiers 1 - 4 testing. > > src/hotspot/share/cds/classListParser.cpp line 476: > >> 474: } >> 475: >> 476: // This tells JVM_FindLoadedClass to not find this class. > > This comment can be deleted. > > The class `k` used to be defined by the boot loader. As a result, when `JVM_FindLoadedClass` looked up a class in the boot/platform/app loaders, it may inadvertently find `k`. > > However, after this PR, `k` is no longer defined by the boot loader. Removed the comment. ------------- PR: https://git.openjdk.java.net/jdk/pull/5458 From ysuenaga at openjdk.java.net Tue Sep 14 05:18:10 2021 From: ysuenaga at openjdk.java.net (Yasumasa Suenaga) Date: Tue, 14 Sep 2021 05:18:10 GMT Subject: Integrated: 8273471: Add foldmultilines to UL for stdout/err In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 06:12:21 GMT, Yasumasa Suenaga wrote: > We've introduced `foldmultilines` to UL in [JDK-8271186](https://bugs.openjdk.java.net/browse/JDK-8271186) (PR #4885 ) to replace newline characters within a multiline log event with the character sequence '' and 'n'. It helps to work log shippers. > > `foldmultilines` supports file output only. It is useful if it affects to stdout/err output because many container applications would redirect logs to stdout. > > `foldmultilines` will be enabled after option processing, so note that the log what happens before it isn't folded. AFAICS following logs might happen. > They are not practical concern because the log which happens before option processing is determinative and does not have newline char (at least now), so I think we can excuse they are not folded. > > > share/logging/logConfiguration.cpp:379: log_error(logging)("Missing terminating quote in -Xlog option '%s'", str); > share/logging/logConfiguration.cpp:397: log_warning(logging)("Ignoring excess -Xlog options: "%s"", str); > > share/prims/jvmtiTrace.cpp:91: log_warning(arguments)("-XX:+TraceJVMTI specified, " > > share/runtime/os.cpp:700: log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); > share/runtime/os.cpp:752: log_warning(malloc, free)("os::realloc caught " PTR_FORMAT, p2i(memblock)); > share/runtime/os.cpp:788: log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock)); > > > I checked them with `$ grep -nrE '(warning|error)' * | grep -i log | grep -vwE '(cds|gc|safepoint|thread|codecache|symboltable|stringtable|jfr|jvmti|jni|container|pagesize|metaspace|exceptions|nmt|attach|class|handshake|monitorinflation)' | grep -vwE '(log_info|log_debug)'` > > In addition, we might see following logs which relate to UL: > > > [0.000s][error][logging] Error opening log file '/all-info.log': Permission denied > [0.000s][error][logging] Invalid tag 'aaa' in log selection. > [0.000s][error][logging] Invalid level 'aaa' in log selection. > [0.012s][error][logging] Invalid option 'aaa' for log output (file=all-info.log). > [0.021s][error][logging] Unable to log to file all-info.log with log file rotation: all-info.log is not a regular file > [0.012s][error][logging] Initialization of output 'file=all-info.log' using options 'aaa=bbb' failed. This pull request has now been integrated. Changeset: 8d73ee68 Author: Yasumasa Suenaga URL: https://git.openjdk.java.net/jdk/commit/8d73ee684a47fa6a10995a19a431062b54c7eb27 Stats: 130 lines in 7 files changed: 87 ins; 20 del; 23 mod 8273471: Add foldmultilines to UL for stdout/err Reviewed-by: dholmes, iklam ------------- PR: https://git.openjdk.java.net/jdk/pull/5407 From ccheung at openjdk.java.net Tue Sep 14 05:21:11 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Tue, 14 Sep 2021 05:21:11 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump In-Reply-To: <7tS6Rp9DRCfFZ2EbuBYXk8bfvOBDP1_j51jkaBb8k3E=.1e5c76e1-a5a4-4b26-8252-f57b4a5838b8@github.com> References: <7tS6Rp9DRCfFZ2EbuBYXk8bfvOBDP1_j51jkaBb8k3E=.1e5c76e1-a5a4-4b26-8252-f57b4a5838b8@github.com> Message-ID: On Fri, 10 Sep 2021 22:26:20 GMT, Ioi Lam wrote: > I think we should try to decouple the loading of unregistered classes from ClassLoader/ClassloaderExt. Maybe these new functions can be placed in a new file, shared/cds/unregisteredClasses.cpp, and the API entry point would be `UnregisteredClasses::load_class(name, path)`. I've moved the new code to unregistedClasses.[c|h]pp. > > Also, `ClassLoaderExt::find_classpath_entry_from_cache` shouldn't be needed anymore. If the JAR file doesn't exist, URLClassLoader will throw an exception, so we don't need to create a ClassPathEntry just to check for the JAR file's existence. As we've discussed off-line, after removing the `ClassLoaderExt::find_classpath_entry_from_cache`, the calculation of the length and crc of the ClassFileSteam will be performed in `jvm_define_class_common()`. > > I wonder if there's any code in classLoader.cpp that was used only for supporting the loading of unregistered classes. If so, it can be removed, too. I don't see any functions in classLoader.cpp could be removed. However, I think the `ClassLoader::record_result()` could be simplified since it is no longer called with unregistered classes. I'd prefer handle the simplification in a follow-up bug. > src/hotspot/share/classfile/classLoaderExt.cpp line 299: > >> 297: class URLClassLoaderTable : public ResourceHashtable< >> 298: Symbol*, Handle, >> 299: 7, // prime number > > I think 7 is too small. Maybe 137? Ok. I've increased it to 137. > src/hotspot/share/classfile/classLoaderExt.cpp line 327: > >> 325: Handle ClassLoaderExt::create_and_add_url_classloader(Symbol* path, TRAPS) { >> 326: Handle url_classloader = create_url_classloader(path, CHECK_NH); >> 327: bool added = _url_classloader_table->put(path, url_classloader); > > added is not used. Did you want to assert that `added == true`? > > I think it's better to move the body of this function to line 342. Then it would be clear that the entry doesn't exist (and there's no need to check for `added`). Modified per your suggestions and I don't need to keep the bool variable. > src/hotspot/share/classfile/classLoaderExt.cpp line 336: > >> 334: _url_classloader_table = new (ResourceObj::C_HEAP, mtClass)URLClassLoaderTable(); >> 335: Handle url_classloader = create_and_add_url_classloader(path, CHECK_NH); >> 336: return url_classloader; > > I think the above 2 lines should be removed and the creation should be done in a single place. This means `_url_classloader_table->get()` would be unnecessarily called when the table is created, but I think that's OK since this happens only once. Done. > src/hotspot/share/classfile/classLoaderExt.cpp line 368: > >> 366: assert(result.get_type() == T_OBJECT, "just checking"); >> 367: oop obj = result.get_oop(); >> 368: InstanceKlass* k = InstanceKlass::cast(java_lang_Class::as_Klass(obj)); > > No need for the temp variable `k` since it's immediately returned. Fixed. ------------- PR: https://git.openjdk.java.net/jdk/pull/5458 From ccheung at openjdk.java.net Tue Sep 14 05:24:52 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Tue, 14 Sep 2021 05:24:52 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump [v2] In-Reply-To: References: Message-ID: > Before this change, unregistered classes are loaded by the boot class loader during CDS dump time. > This RFE creates an URLClassLoader based on the source specified in the classlist and uses the URLClassLoader to load the unregistered class during CDS dump time. The URLClassLoader instances will be cached in a hash table with the source as the key so that classes associated with the same source will be loaded by the same instance of class loader. > > Passed tiers 1 - 4 testing. Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision: @iklam comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5458/files - new: https://git.openjdk.java.net/jdk/pull/5458/files/cf1fd7a4..781a9ad9 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5458&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5458&range=00-01 Stats: 361 lines in 7 files changed: 182 ins; 174 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/5458.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5458/head:pull/5458 PR: https://git.openjdk.java.net/jdk/pull/5458 From stefank at openjdk.java.net Tue Sep 14 06:28:12 2021 From: stefank at openjdk.java.net (Stefan Karlsson) Date: Tue, 14 Sep 2021 06:28:12 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v4] In-Reply-To: References: Message-ID: <46BqyqUOhUQh7HE9rQFv4FOiIsCMXctbRpw5zxzpPHU=.02be90bb-fb0d-48de-99ec-c933589c8168@github.com> On Tue, 14 Sep 2021 03:04:14 GMT, Yumin Qi wrote: >> Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. >> The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. >> >> Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. >> >> Tests: ter1-4 >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: > > offsets and constants should be private Changes requested by stefank (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From stefank at openjdk.java.net Tue Sep 14 06:28:13 2021 From: stefank at openjdk.java.net (Stefan Karlsson) Date: Tue, 14 Sep 2021 06:28:13 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v4] In-Reply-To: References: Message-ID: On Tue, 14 Sep 2021 04:18:56 GMT, David Holmes wrote: >> src/hotspot/share/cds/cdsConstants.cpp line 26: >> >>> 24: >>> 25: #include "precompiled.hpp" >>> 26: #include >> >> It is not stated in the style guide, but I think most files include the system headers after the HotSpot headers, separated by a blank line. > > Is this even needed now? I don't see it being used. To be clear, the layout that I'd like to see is: #include "precompiled.hpp" #include "cds.hpp" ... #include "cds/filemap.hpp" #include However, I think the more appropriate change is to include globalDefinitions.hpp instead of explicitly including cstddef. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From pliden at openjdk.java.net Tue Sep 14 08:42:11 2021 From: pliden at openjdk.java.net (Per Liden) Date: Tue, 14 Sep 2021 08:42:11 GMT Subject: RFR: 8273639: tests fail with "assert(_handle_mark_nesting > 1) failed: memory leak: allocating handle outside HandleMark" In-Reply-To: References: <-ZR4QFDz_0QatpN-nuJnzKSBQJ6jUZf0Qp3ZPOHJwUQ=.2315aca1-f4db-401f-be08-56bf41859dc4@github.com> Message-ID: On Mon, 13 Sep 2021 13:48:12 GMT, Coleen Phillimore wrote: >> This is a fix for an unintended side-effect of JDK-8273482. The problem is that we need to have a HandleMark on the stack before calling ThreadStackTrace::dump_stack_at_safepoint(). Before JDK-8273482, calls to ThreadStackTrace::dump_stack_at_safepoint() were always done from the VMThread, which always has a HandleMark on the stack before evaluating a VM operation. After JDK-8273482, calls to this function can be made from WorkerThreads, which doesn't always have a HandleMark on its stack. The fix is simple, make sure we have a HandleMark on the stack before calling ThreadStackTrace::dump_stack_at_safepoint(). > > Looks good and trivial. We should remove the HandleMark mechanism which is a leftover from when Metadata was in Handles. There aren't many places where we have a lot of Handles that would benefit from the optimization of bulk cleanup of Handles and it's really easy to have unnecessary Handles that GC has to process. Thanks for reviewing @coleenp and @dholmes-ora! ------------- PR: https://git.openjdk.java.net/jdk/pull/5492 From pliden at openjdk.java.net Tue Sep 14 08:42:12 2021 From: pliden at openjdk.java.net (Per Liden) Date: Tue, 14 Sep 2021 08:42:12 GMT Subject: Integrated: 8273639: tests fail with "assert(_handle_mark_nesting > 1) failed: memory leak: allocating handle outside HandleMark" In-Reply-To: <-ZR4QFDz_0QatpN-nuJnzKSBQJ6jUZf0Qp3ZPOHJwUQ=.2315aca1-f4db-401f-be08-56bf41859dc4@github.com> References: <-ZR4QFDz_0QatpN-nuJnzKSBQJ6jUZf0Qp3ZPOHJwUQ=.2315aca1-f4db-401f-be08-56bf41859dc4@github.com> Message-ID: On Mon, 13 Sep 2021 11:57:05 GMT, Per Liden wrote: > This is a fix for an unintended side-effect of JDK-8273482. The problem is that we need to have a HandleMark on the stack before calling ThreadStackTrace::dump_stack_at_safepoint(). Before JDK-8273482, calls to ThreadStackTrace::dump_stack_at_safepoint() were always done from the VMThread, which always has a HandleMark on the stack before evaluating a VM operation. After JDK-8273482, calls to this function can be made from WorkerThreads, which doesn't always have a HandleMark on its stack. The fix is simple, make sure we have a HandleMark on the stack before calling ThreadStackTrace::dump_stack_at_safepoint(). This pull request has now been integrated. Changeset: f5272899 Author: Per Liden URL: https://git.openjdk.java.net/jdk/commit/f52728993dc8f61a537b899ed0c47d83ca594738 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod 8273639: tests fail with "assert(_handle_mark_nesting > 1) failed: memory leak: allocating handle outside HandleMark" Reviewed-by: coleenp, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5492 From shade at openjdk.java.net Tue Sep 14 10:19:10 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 14 Sep 2021 10:19:10 GMT Subject: RFR: 8273606: Zero: SPARC64 build fails with si_band type mismatch [v2] In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 08:05:20 GMT, Aleksey Shipilev wrote: >> This is actually caught by `-Werror=format` that is enabled by default. >> >> >> $ sh ./configure --with-debug-level=slowdebug --with-boot-jdk=/home/shade/Install/jdk16-16.0.2-ea/ --openjdk-target=sparc64-linux-gnu --with-sysroot=/chroots/sparc64/ --with-jvm-variants=zero >> $ make images > > Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: > > Add comments All right, I suppose everyone is happy with this patch? I'll be integrating it soon. ------------- PR: https://git.openjdk.java.net/jdk/pull/5470 From shade at openjdk.java.net Tue Sep 14 10:19:44 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 14 Sep 2021 10:19:44 GMT Subject: RFR: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero [v2] In-Reply-To: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: > See the bug for more discussion. > > Additional testing: > - [x] Linux Zero x86_64 passes most gtests now (there are unrelated failures) > - [x] Linux Zero x86_32 passes most gtests now (there are unrelated failures) Aleksey Shipilev 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 revision: - Merge branch 'master' into JDK-8273373-zero-initial-stack - Coming up with a more limited fix - Merge branch 'master' into JDK-8273373-zero-initial-stack - Merge branch 'master' into JDK-8273373-zero-initial-stack - Fix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5376/files - new: https://git.openjdk.java.net/jdk/pull/5376/files/e6545c1e..29021f40 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5376&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5376&range=00-01 Stats: 13877 lines in 610 files changed: 8641 ins; 3090 del; 2146 mod Patch: https://git.openjdk.java.net/jdk/pull/5376.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5376/head:pull/5376 PR: https://git.openjdk.java.net/jdk/pull/5376 From shade at openjdk.java.net Tue Sep 14 10:52:32 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 14 Sep 2021 10:52:32 GMT Subject: RFR: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero [v3] In-Reply-To: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: <2cK0WbflRssf_7MZCryUcH6pDf69wdHUBgF1rFpMefw=.be738df1-dad2-4c92-b510-44b0df5be49c@github.com> > See the bug for more discussion. > > Additional testing: > - [x] Linux Zero x86_64 passes most gtests now (there are unrelated failures) > - [x] Linux Zero x86_32 passes most gtests now (there are unrelated failures) Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Even more conservative patch ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5376/files - new: https://git.openjdk.java.net/jdk/pull/5376/files/29021f40..b8b5774c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5376&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5376&range=01-02 Stats: 67 lines in 1 file changed: 24 ins; 16 del; 27 mod Patch: https://git.openjdk.java.net/jdk/pull/5376.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5376/head:pull/5376 PR: https://git.openjdk.java.net/jdk/pull/5376 From shade at openjdk.java.net Tue Sep 14 10:52:40 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 14 Sep 2021 10:52:40 GMT Subject: RFR: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero [v2] In-Reply-To: References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: On Tue, 14 Sep 2021 10:19:44 GMT, Aleksey Shipilev wrote: >> See the bug for more discussion. >> >> Additional testing: >> - [x] Linux Zero x86_64 passes most gtests now (there are unrelated failures) >> - [x] Linux Zero x86_32 passes most gtests now (there are unrelated failures) > > Aleksey Shipilev 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 revision: > > - Merge branch 'master' into JDK-8273373-zero-initial-stack > - Coming up with a more limited fix > - Merge branch 'master' into JDK-8273373-zero-initial-stack > - Merge branch 'master' into JDK-8273373-zero-initial-stack > - Fix I pushed the most conservative version I could think of now. Debian folks seem to also patch this method for HPPA: it seems to have unusual stack arrangements too, so I left the original method body as untouched as possible. This still makes gtests happier for Zero. ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From ihse at openjdk.java.net Tue Sep 14 11:32:15 2021 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Tue, 14 Sep 2021 11:32:15 GMT Subject: Integrated: 8256977: Bump minimum GCC from 5.x to 6 for JDK In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 19:28:54 GMT, Magnus Ihse Bursie wrote: > The minimum acceptable version is raised from 5 to 6. There were no objections on the mailing list for doing so in the mainline, see https://mail.openjdk.java.net/pipermail/build-dev/2021-August/031899.html. > > This patch also reverts the workaround that was introduced in JDK-8252797 to support gcc 5.x. This pull request has now been integrated. Changeset: ed7789d6 Author: Magnus Ihse Bursie URL: https://git.openjdk.java.net/jdk/commit/ed7789d6a08bcf5e49907389c6c36a09e88e852a Stats: 5 lines in 2 files changed: 0 ins; 4 del; 1 mod 8256977: Bump minimum GCC from 5.x to 6 for JDK Reviewed-by: erikj, shade ------------- PR: https://git.openjdk.java.net/jdk/pull/5452 From ihse at openjdk.java.net Tue Sep 14 11:37:58 2021 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Tue, 14 Sep 2021 11:37:58 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: <_RzxWBDAsjsGgktVG8WL_0Xhgl894b6LXeb33cQGowM=.37460cd8-7b3c-4f44-b677-fc05a641be96@github.com> On Thu, 9 Sep 2021 10:17:02 GMT, Aleksey Shipilev wrote: > Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. > > Additional testing: > - [x] Linux x86_64 Zero build > - [x] Linux x86_64 Zero bootcycle-images > - [ ] Linux x86_64 Zero `tier1` I'm changing my response to "approve". I agree that we can change zero only in this patch to facilitate backporting, and fix the remaining odds and ends in a separate PR. And also let me be clear that I see no reason to delay pushing this any further. Everyone who has any vested interest in zero has had ample chance to comment on the PR. ------------- Marked as reviewed by ihse (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5440 From stuefe at openjdk.java.net Tue Sep 14 12:12:07 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Tue, 14 Sep 2021 12:12:07 GMT Subject: RFR: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero [v3] In-Reply-To: <2cK0WbflRssf_7MZCryUcH6pDf69wdHUBgF1rFpMefw=.be738df1-dad2-4c92-b510-44b0df5be49c@github.com> References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> <2cK0WbflRssf_7MZCryUcH6pDf69wdHUBgF1rFpMefw=.be738df1-dad2-4c92-b510-44b0df5be49c@github.com> Message-ID: On Tue, 14 Sep 2021 10:52:32 GMT, Aleksey Shipilev wrote: >> See the bug for more discussion. >> >> Additional testing: >> - [x] Linux Zero x86_64 passes most gtests now (there are unrelated failures) >> - [x] Linux Zero x86_32 passes most gtests now (there are unrelated failures) > > Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: > > Even more conservative patch Looks good ------------- Marked as reviewed by stuefe (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5376 From sgehwolf at openjdk.java.net Tue Sep 14 12:47:11 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Tue, 14 Sep 2021 12:47:11 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: <_qfv6SEbfuo5um8s87v9BLlw7gwLdl-MdDbGvPZOR3g=.23f2ba5c-fc04-46bd-b167-2b027e88eae6@github.com> On Thu, 9 Sep 2021 10:17:02 GMT, Aleksey Shipilev wrote: > Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. > > Additional testing: > - [x] Linux x86_64 Zero build > - [x] Linux x86_64 Zero bootcycle-images > - [ ] Linux x86_64 Zero `tier1` Looks fine to me. ------------- Marked as reviewed by sgehwolf (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5440 From lzang at openjdk.java.net Tue Sep 14 14:20:15 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Tue, 14 Sep 2021 14:20:15 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 13:39:08 GMT, Ralf Schmelter wrote: >> Lin Zang has updated the pull request incrementally with one additional commit since the last revision: >> >> fix build error > > src/hotspot/share/services/attachListener.cpp line 255: > >> 253: HeapDumper dumper(live_objects_only /* request GC */); >> 254: dumper.dump(path, out, (int)level, (uint)parallel_thread_num); >> 255: } > > The call signature for dump has changed, since it now takes an overwrite bool value after the compression level. This means that actually the number of parallel threads is not set but remains at the default value of 1. So the parallel case is never executed currently. The parallel threads number is set to `MAX2(1, (uint)os::initial_active_processor_count() * 3 / 8);` after the change. > src/hotspot/share/services/heapDumperCompression.cpp line 386: > >> 384: size_t tmp_max = 0; >> 385: >> 386: MonitorLocker ml(_lock, Mutex::_no_safepoint_check_flag); > > This is not thread safe if flush_external_buffer() or get_new_buffer() are called concurrently. But it seems to be Ok since flush_external_buffer() is only called with the _lock var of the parallel writer locked, so there is no contention. Is this correct? Yes, it is correct. ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From lzang at openjdk.java.net Tue Sep 14 14:23:10 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Tue, 14 Sep 2021 14:23:10 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 05:02:18 GMT, Ralf Schmelter wrote: >> Lin Zang has updated the pull request incrementally with one additional commit since the last revision: >> >> fix build error > > I will start reviewing this today. Hi Ralf @schmelter-sap , Thanks for your review and comments! The change is conflict with latest master, so I will rebase it first and then fix the issue you mentioned. BRs, Lin ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From mbaesken at openjdk.java.net Tue Sep 14 14:27:36 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Tue, 14 Sep 2021 14:27:36 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v3] In-Reply-To: References: Message-ID: > 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid > that would be helpful too and can be added to the OSContainer API . > pids.current : > A read-only single value file which exists on all cgroups. > The number of processes currently in the cgroup and its descendants. > > Best regards, Matthias Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Simplify coding following Severins advice ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5437/files - new: https://git.openjdk.java.net/jdk/pull/5437/files/422aef68..afe0efd4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5437&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5437&range=01-02 Stats: 31 lines in 6 files changed: 1 ins; 27 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/5437.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5437/head:pull/5437 PR: https://git.openjdk.java.net/jdk/pull/5437 From mbaesken at openjdk.java.net Tue Sep 14 14:27:40 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Tue, 14 Sep 2021 14:27:40 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v2] In-Reply-To: <3PokFyPHsil0S9A15OWUj97Xls1tFpkeXuqHydXnh4o=.64e6daaa-5dc3-438c-b362-ba61775d1403@github.com> References: <3PokFyPHsil0S9A15OWUj97Xls1tFpkeXuqHydXnh4o=.64e6daaa-5dc3-438c-b362-ba61775d1403@github.com> Message-ID: On Fri, 10 Sep 2021 11:07:52 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid >> that would be helpful too and can be added to the OSContainer API . >> pids.current : >> A read-only single value file which exists on all cgroups. >> The number of processes currently in the cgroup and its descendants. >> >> Best regards, Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Some simplifications and test adjustment suggested by Severin Hi Severin, I adjusted my change following your latest comments. Thanks, Matthias ------------- PR: https://git.openjdk.java.net/jdk/pull/5437 From lzang at openjdk.java.net Tue Sep 14 14:35:18 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Tue, 14 Sep 2021 14:35:18 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: On Mon, 13 Sep 2021 16:12:48 GMT, Ralf Schmelter wrote: >> Lin Zang has updated the pull request incrementally with one additional commit since the last revision: >> >> fix build error > > src/hotspot/share/services/heapDumper.cpp line 1797: > >> 1795: if (o->is_instance()) { >> 1796: InstanceKlass* ik = InstanceKlass::cast(o->klass()); >> 1797: size = DumperSupport::instance_size(ik); > > Getting the size of an instance can be surprisingly expensive for classes with many static fields, since we iterate over all static fields of the class. So I would avoid having to calculate the size twice (here and when we are actually dump it). Maybe here it would just be enough to use o->size() * 8 as an upper limit value of the real size in the heap dump. After all practically no non-array object will ever we that large. Good suggestion! I didn't realize that o->size() * 8 can be used as an upper limit. ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From shade at openjdk.java.net Tue Sep 14 15:52:09 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 14 Sep 2021 15:52:09 GMT Subject: RFR: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero [v3] In-Reply-To: <2cK0WbflRssf_7MZCryUcH6pDf69wdHUBgF1rFpMefw=.be738df1-dad2-4c92-b510-44b0df5be49c@github.com> References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> <2cK0WbflRssf_7MZCryUcH6pDf69wdHUBgF1rFpMefw=.be738df1-dad2-4c92-b510-44b0df5be49c@github.com> Message-ID: On Tue, 14 Sep 2021 10:52:32 GMT, Aleksey Shipilev wrote: >> See the bug for more discussion. >> >> Additional testing: >> - [x] Linux Zero x86_64 passes most gtests now (there are unrelated failures) >> - [x] Linux Zero x86_32 passes most gtests now (there are unrelated failures) > > Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: > > Even more conservative patch Thank you! ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From shade at openjdk.java.net Tue Sep 14 15:52:10 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 14 Sep 2021 15:52:10 GMT Subject: Integrated: 8273373: Zero: Cannot invoke JVM in primordial threads on Zero In-Reply-To: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> References: <5qmWTkxODLzio45dhdUT2ahZHqiOAKKr6NXSUXMC970=.404281bf-77bd-4960-9808-44f711f444bb@github.com> Message-ID: On Mon, 6 Sep 2021 09:45:12 GMT, Aleksey Shipilev wrote: > See the bug for more discussion. > > Additional testing: > - [x] Linux Zero x86_64 passes most gtests now (there are unrelated failures) > - [x] Linux Zero x86_32 passes most gtests now (there are unrelated failures) This pull request has now been integrated. Changeset: 0f31d0fb Author: Aleksey Shipilev URL: https://git.openjdk.java.net/jdk/commit/0f31d0fb2c0d5db305e75e1d61bcc44de3e77839 Stats: 29 lines in 2 files changed: 17 ins; 12 del; 0 mod 8273373: Zero: Cannot invoke JVM in primordial threads on Zero Reviewed-by: stuefe ------------- PR: https://git.openjdk.java.net/jdk/pull/5376 From shade at openjdk.java.net Tue Sep 14 15:53:08 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 14 Sep 2021 15:53:08 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 10:02:43 GMT, David Holmes wrote: >> Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. >> >> Additional testing: >> - [x] Linux x86_64 Zero build >> - [x] Linux x86_64 Zero bootcycle-images >> - [x] Linux x86_64 Zero `tier1` > > It isn't the "formal governance" I'm concerned about, more about the folk who use/rely on Zero being the ones to evaluate the impact of a change like this. People, like myself, who do not use Zero in any way cannot evaluate whether this change is appropriate - it's that simple. :) I'll be happy to integrate as long as @dholmes-ora has no objections. ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From sgehwolf at openjdk.java.net Tue Sep 14 16:36:09 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Tue, 14 Sep 2021 16:36:09 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v3] In-Reply-To: References: Message-ID: <3aTKQILDCNwWGM4TGKA-YjW86UQFqKujjWyrGkrNf-s=.e489ddac-53dd-4c91-a608-e5b04f95f5ec@github.com> 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid >> that would be helpful too and can be added to the OSContainer API . >> pids.current : >> A read-only single value file which exists on all cgroups. >> The number of processes currently in the cgroup and its descendants. >> >> Best regards, Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Simplify coding following Severins advice Looks fine. I suggest to move the debug printing from line 99 to after line 101 as suggested here: https://github.com/openjdk/jdk/pull/5437#discussion_r706145165 ------------- Marked as reviewed by sgehwolf (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5437 From iklam at openjdk.java.net Tue Sep 14 16:40:11 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Tue, 14 Sep 2021 16:40:11 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v3] In-Reply-To: References: Message-ID: 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid >> that would be helpful too and can be added to the OSContainer API . >> pids.current : >> A read-only single value file which exists on all cgroups. >> The number of processes currently in the cgroup and its descendants. >> >> Best regards, Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Simplify coding following Severins advice HotSpot changes look good to me. I have a comment on the test. test/hotspot/jtreg/containers/docker/TestPids.java line 97: > 95: System.out.println("DEBUG: parts.length = " + parts.length); > 96: if (expectedValue.equals("no_value_expected")) { > 97: Asserts.assertEquals(parts.length, 2); Is "no_value_expected" generated by Docker? I searched the entire HotSpot source code and couldn't find it. I also couldn't find "WARNING: Your kernel does not support pids limit capabilities". To make it easier to understand this test, I would suggest grouping all messages that were generated outside of HotSpot into something like: // These messages are generated by Docker static final String warning_kernel_no_pids_support = "WARNING: Your kernel does not support pids limit capabilities"; static final String no_value_expected = "no_value_expected"; ------------- PR: https://git.openjdk.java.net/jdk/pull/5437 From minqi at openjdk.java.net Tue Sep 14 16:58:41 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Tue, 14 Sep 2021 16:58:41 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v5] In-Reply-To: References: Message-ID: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. > > Tests: ter1-4 > > Thanks > Yumin Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: remove including , instead include globalDefinitions.hpp explicitly ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5450/files - new: https://git.openjdk.java.net/jdk/pull/5450/files/4f045e35..5eaf079b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=03-04 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5450.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5450/head:pull/5450 PR: https://git.openjdk.java.net/jdk/pull/5450 From iklam at openjdk.java.net Tue Sep 14 17:28:03 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Tue, 14 Sep 2021 17:28:03 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v3] In-Reply-To: References: Message-ID: 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/TestPids.java line 97: > >> 95: System.out.println("DEBUG: parts.length = " + parts.length); >> 96: if (expectedValue.equals("no_value_expected")) { >> 97: Asserts.assertEquals(parts.length, 2); > > Is "no_value_expected" generated by Docker? I searched the entire HotSpot source code and couldn't find it. I also couldn't find "WARNING: Your kernel does not support pids limit capabilities". > > To make it easier to understand this test, I would suggest grouping all messages that were generated outside of HotSpot into something like: > > > // These messages are generated by Docker > static final String warning_kernel_no_pids_support = "WARNING: Your kernel does not support pids limit capabilities"; > static final String no_value_expected = "no_value_expected"; Oh, I misunderstood the test. "no_value_expected" was passed in from `testPids()` in this file, but that's confusing because you are expecting an integer value. Maybe it should be "any_integer"? ------------- PR: https://git.openjdk.java.net/jdk/pull/5437 From iklam at openjdk.java.net Tue Sep 14 17:35:07 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Tue, 14 Sep 2021 17:35:07 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v5] In-Reply-To: References: Message-ID: On Tue, 14 Sep 2021 16:58:41 GMT, Yumin Qi wrote: >> Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. >> The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. >> >> Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. >> >> Tests: ter1-4 >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: > > remove including , instead include globalDefinitions.hpp explicitly LGTM. Small nit on friend class declaration. src/hotspot/share/cds/filemap.hpp line 184: > 182: class FileMapHeader: private CDSFileMapHeaderBase { > 183: friend class VMStructs; > 184: friend class CDSConstants; It's better to sort the classes alphabetically. CDSConstants should come before VMStructs. ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5450 From lzang at openjdk.java.net Tue Sep 14 17:43:31 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Tue, 14 Sep 2021 17:43:31 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v33] In-Reply-To: References: Message-ID: > 8252842: Extend jmap to support parallel heap dump Lin Zang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 49 commits: - fix parallel issue - Merge branch 'master' into pd-fix - Merge branch 'master' of https://github.com/openjdk/jdk - fix build error - rewrite dumper and writer number calculation logic - Merge branch 'master' into par-dump - Merge branch 'master' of https://github.com/openjdk/jdk - remove gzipaccessor - fix build error - Merge branch 'master' into par-dump - ... and 39 more: https://git.openjdk.java.net/jdk/compare/fe89dd3b...26255e3f ------------- Changes: https://git.openjdk.java.net/jdk/pull/2261/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2261&range=32 Stats: 848 lines in 6 files changed: 653 ins; 42 del; 153 mod Patch: https://git.openjdk.java.net/jdk/pull/2261.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2261/head:pull/2261 PR: https://git.openjdk.java.net/jdk/pull/2261 From lzang at openjdk.java.net Tue Sep 14 17:43:35 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Tue, 14 Sep 2021 17:43:35 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: On Mon, 6 Sep 2021 08:03:22 GMT, Lin Zang wrote: >> 8252842: Extend jmap to support parallel heap dump > > Lin Zang has updated the pull request incrementally with one additional commit since the last revision: > > fix build error rebased with latest master, and made some change to fix the conflict issue. I will handle Ralf's comments asap. Thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From sgehwolf at openjdk.java.net Tue Sep 14 18:27:10 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Tue, 14 Sep 2021 18:27:10 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v3] In-Reply-To: References: Message-ID: On Tue, 14 Sep 2021 17:25:05 GMT, Ioi Lam wrote: > Maybe it should be "any_integer"? +1 ------------- PR: https://git.openjdk.java.net/jdk/pull/5437 From minqi at openjdk.java.net Tue Sep 14 18:52:56 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Tue, 14 Sep 2021 18:52:56 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v6] In-Reply-To: References: Message-ID: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. > > Tests: ter1-4 > > Thanks > Yumin Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: Reorder friend classes ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5450/files - new: https://git.openjdk.java.net/jdk/pull/5450/files/5eaf079b..dfd65258 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=04-05 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5450.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5450/head:pull/5450 PR: https://git.openjdk.java.net/jdk/pull/5450 From lkorinth at openjdk.java.net Tue Sep 14 21:23:23 2021 From: lkorinth at openjdk.java.net (Leo Korinth) Date: Tue, 14 Sep 2021 21:23:23 GMT Subject: Integrated: 8273414: ResourceObj::operator delete should handle nullptr in debug builds In-Reply-To: References: Message-ID: On Tue, 7 Sep 2021 09:40:33 GMT, Leo Korinth wrote: > This is how delete usually works, This is also how FreeHeap and CHeapObj::operator delete works. Delete does handle nullptr in release builds, it is the assert that may crash. Also, as a user it is nice to call delete without first checking the argument for nullptr. This pull request has now been integrated. Changeset: e66bf472 Author: Leo Korinth URL: https://git.openjdk.java.net/jdk/commit/e66bf472484f6873faf45d634f17b68777fdcfa6 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod 8273414: ResourceObj::operator delete should handle nullptr in debug builds Reviewed-by: stuefe ------------- PR: https://git.openjdk.java.net/jdk/pull/5385 From minqi at openjdk.java.net Tue Sep 14 21:55:05 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Tue, 14 Sep 2021 21:55:05 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v6] In-Reply-To: References: Message-ID: On Tue, 14 Sep 2021 06:23:20 GMT, Stefan Karlsson wrote: >> Is this even needed now? I don't see it being used. > > To be clear, the layout that I'd like to see is: > > #include "precompiled.hpp" > #include "cds.hpp" > ... > #include "cds/filemap.hpp" > > #include > > > However, I think the more appropriate change is to include globalDefinitions.hpp instead of explicitly including cstddef. The pre-submit tests failed to build hotspot for linux on arm/ppc/s390 etc after removed. needed for defining size_t. So will add it back at last section of 'include'. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From minqi at openjdk.java.net Tue Sep 14 22:01:05 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Tue, 14 Sep 2021 22:01:05 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v7] In-Reply-To: References: Message-ID: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. > > Tests: ter1-4 > > Thanks > Yumin Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: Add back for additional platforms ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5450/files - new: https://git.openjdk.java.net/jdk/pull/5450/files/dfd65258..10ef5a4d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=06 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=05-06 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5450.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5450/head:pull/5450 PR: https://git.openjdk.java.net/jdk/pull/5450 From iklam at openjdk.java.net Tue Sep 14 22:12:26 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Tue, 14 Sep 2021 22:12:26 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v7] In-Reply-To: References: Message-ID: On Tue, 14 Sep 2021 21:52:04 GMT, Yumin Qi wrote: >> To be clear, the layout that I'd like to see is: >> >> #include "precompiled.hpp" >> #include "cds.hpp" >> ... >> #include "cds/filemap.hpp" >> >> #include >> >> >> However, I think the more appropriate change is to include globalDefinitions.hpp instead of explicitly including cstddef. > > The pre-submit tests failed to build hotspot for linux on arm/ppc/s390 etc after removed. needed for defining size_t. So will add it back at last section of 'include'. The problem is here in cdsConstants.hpp #include "memory/allStatic.hpp" typedef struct { const char* _name; size_t _value; } CDSConst; globalDefinitions.hpp should be included here for the declaration of `size_t`. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From minqi at openjdk.java.net Tue Sep 14 22:49:56 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Tue, 14 Sep 2021 22:49:56 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v7] In-Reply-To: References: Message-ID: <4ytobhcVDLgrOobT_j3uNwGXL49WxUcBM3dKFrfsG8k=.02c0b4f0-d9c5-4132-be02-6303de5105b6@github.com> On Tue, 14 Sep 2021 22:07:10 GMT, Ioi Lam wrote: >> The pre-submit tests failed to build hotspot for linux on arm/ppc/s390 etc after removed. needed for defining size_t. So will add it back at last section of 'include'. > > The problem is here in cdsConstants.hpp > > > #include "memory/allStatic.hpp" > typedef struct { > const char* _name; > size_t _value; > } CDSConst; > > > globalDefinitions.hpp should be included here for the declaration of `size_t`. Yes, but it still failed for non-pch since cds.h is before cdsConstants.hpp. size_t in cds.h is not defined yet. Should I add it to cds.h? ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From iklam at openjdk.java.net Wed Sep 15 00:00:12 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 15 Sep 2021 00:00:12 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v7] In-Reply-To: <4ytobhcVDLgrOobT_j3uNwGXL49WxUcBM3dKFrfsG8k=.02c0b4f0-d9c5-4132-be02-6303de5105b6@github.com> References: <4ytobhcVDLgrOobT_j3uNwGXL49WxUcBM3dKFrfsG8k=.02c0b4f0-d9c5-4132-be02-6303de5105b6@github.com> Message-ID: On Tue, 14 Sep 2021 22:47:53 GMT, Yumin Qi wrote: >> The problem is here in cdsConstants.hpp >> >> >> #include "memory/allStatic.hpp" >> typedef struct { >> const char* _name; >> size_t _value; >> } CDSConst; >> >> >> globalDefinitions.hpp should be included here for the declaration of `size_t`. > > Yes, but it still failed for non-pch since cds.h is before cdsConstants.hpp. size_t in cds.h is not defined yet. Should I add it to cds.h? This is a bit complicated. The file is src/hotspot/share/include/cds.h, and the HotSpot convention for including files in this directory usually drops the "include/" part. E.g., #include "jvm.h" But this will put `#include "cds.h"` at the very beginning of all includes, so it doesn't take up `size_t` which is indirectly declared later via globalDefinitions.hpp. However, header files in src/hotspot/share/ may be included by C/C++ files outside of HotSpot. As a result, these headers cannot include other HotSpot headers. I.e., you cannot put `#include "utilities/globalDefinitions.hpp"` in cds.h, because cds.h is included by src/jdk.hotspot.agent/share/native/libsaproc/ps_core_common.c. I think one compromise is to add `#include ` in cds.h. Since cds.h can be included by C source code, we cannot use `#include ` which is a C++ thing. `` is part of ANSI C standard and we already include it inside share/utilities/debug.hpp, so we can safely assume that it exists for all compilers that can build HotSpot. ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From dholmes at openjdk.java.net Wed Sep 15 01:20:51 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 15 Sep 2021 01:20:51 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v7] In-Reply-To: References: <4ytobhcVDLgrOobT_j3uNwGXL49WxUcBM3dKFrfsG8k=.02c0b4f0-d9c5-4132-be02-6303de5105b6@github.com> Message-ID: On Tue, 14 Sep 2021 23:57:01 GMT, Ioi Lam wrote: >> Yes, but it still failed for non-pch since cds.h is before cdsConstants.hpp. size_t in cds.h is not defined yet. Should I add it to cds.h? > > This is a bit complicated. The file is src/hotspot/share/include/cds.h, and the HotSpot convention for including files in this directory usually drops the "include/" part. E.g., > > > #include "jvm.h" > > > But this will put `#include "cds.h"` at the very beginning of all includes, so it doesn't take up `size_t` which is indirectly declared later via globalDefinitions.hpp. > > However, header files in src/hotspot/share/ may be included by C/C++ files outside of HotSpot. As a result, these headers cannot include other HotSpot headers. I.e., you cannot put `#include "utilities/globalDefinitions.hpp"` in cds.h, because cds.h is included by src/jdk.hotspot.agent/share/native/libsaproc/ps_core_common.c. > > I think one compromise is to add `#include ` in cds.h. Since cds.h can be included by C source code, we cannot use `#include ` which is a C++ thing. `` is part of ANSI C standard and we already include it inside share/utilities/debug.hpp, so we can safely assume that it exists for all compilers that can build HotSpot. I agree with Ioi - use stddefs.h in cds.h ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From dholmes at openjdk.java.net Wed Sep 15 01:36:50 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 15 Sep 2021 01:36:50 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: On Tue, 14 Sep 2021 15:49:36 GMT, Aleksey Shipilev wrote: >> It isn't the "formal governance" I'm concerned about, more about the folk who use/rely on Zero being the ones to evaluate the impact of a change like this. People, like myself, who do not use Zero in any way cannot evaluate whether this change is appropriate - it's that simple. :) > > I'll be happy to integrate as long as @dholmes-ora has no objections. @shipilev no objections from me. I will leave it to the Zero developers to worry, or not, about the Zero users. Cheers, David ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From ccheung at openjdk.java.net Wed Sep 15 03:58:40 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Wed, 15 Sep 2021 03:58:40 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump [v3] In-Reply-To: References: Message-ID: > Before this change, unregistered classes are loaded by the boot class loader during CDS dump time. > This RFE creates an URLClassLoader based on the source specified in the classlist and uses the URLClassLoader to load the unregistered class during CDS dump time. The URLClassLoader instances will be cached in a hash table with the source as the key so that classes associated with the same source will be loaded by the same instance of class loader. > > Passed tiers 1 - 4 testing. Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision: 1. revert changes to jvm.cpp since SystemDictionaryShared::set_shared_class_misc_info() is being called in ClassLoader::record_result(); 2. remove UnregisteredClasses::seen_classloader(); 3. remove call to ClassLoaderExt::record_result() in ClassListParser::load_class_from_source() since it is being called in ClassLoader::record_result(). ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5458/files - new: https://git.openjdk.java.net/jdk/pull/5458/files/781a9ad9..dd11b6db Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5458&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5458&range=01-02 Stats: 30 lines in 4 files changed: 0 ins; 28 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5458.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5458/head:pull/5458 PR: https://git.openjdk.java.net/jdk/pull/5458 From iklam at openjdk.java.net Wed Sep 15 05:40:43 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 15 Sep 2021 05:40:43 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump [v3] In-Reply-To: References: Message-ID: On Wed, 15 Sep 2021 03:58:40 GMT, Calvin Cheung wrote: >> Before this change, unregistered classes are loaded by the boot class loader during CDS dump time. >> This RFE creates an URLClassLoader based on the source specified in the classlist and uses the URLClassLoader to load the unregistered class during CDS dump time. The URLClassLoader instances will be cached in a hash table with the source as the key so that classes associated with the same source will be loaded by the same instance of class loader. >> >> Passed tiers 1 - 4 testing. > > Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision: > > 1. revert changes to jvm.cpp since SystemDictionaryShared::set_shared_class_misc_info() is being called in ClassLoader::record_result(); > 2. remove UnregisteredClasses::seen_classloader(); > 3. remove call to ClassLoaderExt::record_result() in ClassListParser::load_class_from_source() since it is being called in ClassLoader::record_result(). Looks good overall. Just two minor comments. src/hotspot/share/cds/classListParser.cpp line 477: > 475: } > 476: > 477: k->clear_shared_class_loader_type(); I think this may not be necessary, as the correct loader type should have been set inside ClassLoaderExt::record_result(). Maybe change this to? assert(k->is_shared_unregistered_class(), "must be"); src/hotspot/share/classfile/systemDictionaryShared.cpp line 454: > 452: bool SystemDictionaryShared::add_unregistered_class_for_static_archive(Thread* current, InstanceKlass* k) { > 453: assert(DumpSharedSpaces, "only when dumping"); > 454: return add_unregistered_class(current, k); Since this function is now just a pass-through to `add_unregistered_class()`, maybe we should delete this function, and make `add_unregistered_class()` public? ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5458 From minqi at openjdk.java.net Wed Sep 15 05:44:20 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Wed, 15 Sep 2021 05:44:20 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v8] In-Reply-To: References: Message-ID: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. > > Tests: ter1-4 > > Thanks > Yumin Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: Include stddef.h in cds.h ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5450/files - new: https://git.openjdk.java.net/jdk/pull/5450/files/10ef5a4d..d23e70e4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=07 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=06-07 Stats: 5 lines in 3 files changed: 3 ins; 2 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5450.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5450/head:pull/5450 PR: https://git.openjdk.java.net/jdk/pull/5450 From iklam at openjdk.java.net Wed Sep 15 05:44:22 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 15 Sep 2021 05:44:22 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v8] In-Reply-To: References: Message-ID: <4P5KJv3VUrOmvGqjXEvDU-s6KDrjG0lrjqWk1i6pV9U=.c4f6a379-5867-47e3-9a82-f1e9ac64cd44@github.com> On Wed, 15 Sep 2021 05:40:57 GMT, Yumin Qi wrote: >> Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. >> The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. >> >> Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. >> >> Tests: ter1-4 >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: > > Include stddef.h in cds.h The new version looks good to me. ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5450 From mbaesken at openjdk.java.net Wed Sep 15 07:12:45 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Wed, 15 Sep 2021 07:12:45 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v3] In-Reply-To: References: Message-ID: On Tue, 14 Sep 2021 18:23:49 GMT, Severin Gehwolf wrote: >> Oh, I misunderstood the test. "no_value_expected" was passed in from `testPids()` in this file, but that's confusing because you are expecting an integer value. Maybe it should be "any_integer"? > >> Maybe it should be "any_integer"? > > +1 > Is "no_value_expected" generated by Docker? I searched the entire HotSpot source code and couldn't find it. I also couldn't find "WARNING: Your kernel does not support pids limit capabilities". > Hi, this warning is showing up on some of our Linux ppc64le machines where the pids limit capabilities is not supported. Best regards, Matthias ------------- PR: https://git.openjdk.java.net/jdk/pull/5437 From dholmes at openjdk.java.net Wed Sep 15 07:39:09 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 15 Sep 2021 07:39:09 GMT Subject: RFR: 8271569: Clean up the use of CDS constants and field offsets [v8] In-Reply-To: References: Message-ID: On Wed, 15 Sep 2021 05:44:20 GMT, Yumin Qi wrote: >> Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. >> The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. >> >> Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. >> >> Tests: ter1-4 >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: > > Include stddef.h in cds.h Marked as reviewed by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From mbaesken at openjdk.java.net Wed Sep 15 07:46:34 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Wed, 15 Sep 2021 07:46:34 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v4] In-Reply-To: References: Message-ID: > 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid > that would be helpful too and can be added to the OSContainer API . > pids.current : > A read-only single value file which exists on all cgroups. > The number of processes currently in the cgroup and its descendants. > > Best regards, Matthias Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Adjust TestPids ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5437/files - new: https://git.openjdk.java.net/jdk/pull/5437/files/afe0efd4..86f3f534 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5437&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5437&range=02-03 Stats: 7 lines in 1 file changed: 3 ins; 1 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/5437.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5437/head:pull/5437 PR: https://git.openjdk.java.net/jdk/pull/5437 From mbaesken at openjdk.java.net Wed Sep 15 08:07:55 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Wed, 15 Sep 2021 08:07:55 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v3] In-Reply-To: References: Message-ID: <-AS4eYSWQbIT2pnPY1hveJCn4o1h8Aoc66xTHejbLMs=.937d0af0-290e-414a-ad8d-0e38b7e3c775@github.com> On Wed, 15 Sep 2021 07:09:54 GMT, Matthias Baesken wrote: >>> Maybe it should be "any_integer"? >> >> +1 > >> Is "no_value_expected" generated by Docker? I searched the entire HotSpot source code and couldn't find it. I also couldn't find "WARNING: Your kernel does not support pids limit capabilities". >> > > Hi, this warning is showing up on some of our Linux ppc64le machines where the pids limit capabilities is not supported. > > Best regards, Matthias Hello, I adjusted to any_integer, and introduced the "final String warning_kernel_no_pids_support" . I think the message is more related to the kernel features so I did not add the add the 'generated by Docker' comment. Best regards, Matthias ------------- PR: https://git.openjdk.java.net/jdk/pull/5437 From mbaesken at openjdk.java.net Wed Sep 15 08:07:56 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Wed, 15 Sep 2021 08:07:56 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v2] In-Reply-To: References: <3PokFyPHsil0S9A15OWUj97Xls1tFpkeXuqHydXnh4o=.64e6daaa-5dc3-438c-b362-ba61775d1403@github.com> Message-ID: On Fri, 10 Sep 2021 12:36:35 GMT, Severin Gehwolf wrote: >> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: >> >> Some simplifications and test adjustment suggested by Severin > > test/hotspot/jtreg/containers/docker/TestPids.java line 101: > >> 99: System.out.println("Found " + lineMarker + " with value: " + ivalue); >> 100: try { >> 101: int ai = Integer.parseInt(ivalue); > > Could you move the debug print line to after line 101, please. It could say: > > `System.out.println("Found " + lineMarker + " with value: " + ai + ". PASS.");` the debug println has been moved down. ------------- PR: https://git.openjdk.java.net/jdk/pull/5437 From shade at openjdk.java.net Wed Sep 15 09:00:57 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 15 Sep 2021 09:00:57 GMT Subject: Integrated: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 10:17:02 GMT, Aleksey Shipilev wrote: > Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. > > Additional testing: > - [x] Linux x86_64 Zero build > - [x] Linux x86_64 Zero bootcycle-images > - [x] Linux x86_64 Zero `tier1` This pull request has now been integrated. Changeset: 8fbcc823 Author: Aleksey Shipilev URL: https://git.openjdk.java.net/jdk/commit/8fbcc8239a3fc04e56ebbd287c7bb5db731977b7 Stats: 14 lines in 6 files changed: 0 ins; 3 del; 11 mod 8273494: Zero: Put libjvm.so into "zero" folder, not "server" Reviewed-by: ihse, sgehwolf ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From shade at openjdk.java.net Wed Sep 15 09:00:56 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 15 Sep 2021 09:00:56 GMT Subject: RFR: 8273494: Zero: Put libjvm.so into "zero" folder, not "server" In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 10:17:02 GMT, Aleksey Shipilev wrote: > Currently, the build system defaults the libjvm.so location to "server". This makes looking for `libjvm.so` awkward, see JDK-8273487 for example. We need to see if moving the libjvm.so to a proper location breaks anything. > > Additional testing: > - [x] Linux x86_64 Zero build > - [x] Linux x86_64 Zero bootcycle-images > - [x] Linux x86_64 Zero `tier1` Thank you all! ------------- PR: https://git.openjdk.java.net/jdk/pull/5440 From sgehwolf at openjdk.java.net Wed Sep 15 09:35:49 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Wed, 15 Sep 2021 09:35:49 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v4] In-Reply-To: References: Message-ID: <-dUrye6VcX6yUG8OlEiGO1-vdojEMY_vY3niClPCF3Y=.4cac75ba-b785-4a13-b511-b3067808b7f7@github.com> 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid >> that would be helpful too and can be added to the OSContainer API . >> pids.current : >> A read-only single value file which exists on all cgroups. >> The number of processes currently in the cgroup and its descendants. >> >> Best regards, Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust TestPids Marked as reviewed by sgehwolf (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5437 From shade at openjdk.java.net Wed Sep 15 10:36:06 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Wed, 15 Sep 2021 10:36:06 GMT Subject: RFR: 8273804: Platform.isTieredSupported should handle the no-compiler case Message-ID: Happens with Zero tests: $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=compiler/codecache/CheckSegmentedCodeCache.java ... java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because "jdk.test.lib.Platform.compiler" is null at jdk.test.lib.Platform.isTieredSupported(Platform.java:82) at compiler.codecache.CheckSegmentedCodeCache.verifySegmentedCodeCache(CheckSegmentedCodeCache.java:61) at compiler.codecache.CheckSegmentedCodeCache.main(CheckSegmentedCodeCache.java:108) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) at java.base/java.lang.Thread.run(Thread.java:833) Additional testing: - [x] Linux x86_64 Zero, `compiler/codecache/CheckSegmentedCodeCache.java` now properly fails with "no compilers" error ------------- Commit messages: - Fix Changes: https://git.openjdk.java.net/jdk/pull/5528/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5528&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273804 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5528.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5528/head:pull/5528 PR: https://git.openjdk.java.net/jdk/pull/5528 From dholmes at openjdk.java.net Wed Sep 15 13:01:57 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 15 Sep 2021 13:01:57 GMT Subject: RFR: 8273804: Platform.isTieredSupported should handle the no-compiler case In-Reply-To: References: Message-ID: On Wed, 15 Sep 2021 10:29:36 GMT, Aleksey Shipilev wrote: > Happens with Zero tests: > > > $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=compiler/codecache/CheckSegmentedCodeCache.java > ... > > java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because "jdk.test.lib.Platform.compiler" is null > at jdk.test.lib.Platform.isTieredSupported(Platform.java:82) > at compiler.codecache.CheckSegmentedCodeCache.verifySegmentedCodeCache(CheckSegmentedCodeCache.java:61) > at compiler.codecache.CheckSegmentedCodeCache.main(CheckSegmentedCodeCache.java:108) > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) > at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:568) > at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) > at java.base/java.lang.Thread.run(Thread.java:833) > > > Additional testing: > - [x] Linux x86_64 Zero, `compiler/codecache/CheckSegmentedCodeCache.java` now properly fails with "no compilers" error Looks fine and trivial. Cheers, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5528 From iklam at openjdk.java.net Wed Sep 15 16:21:56 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 15 Sep 2021 16:21:56 GMT Subject: RFR: JDK-8273526: Extend the OSContainer API pids controller with pids.current [v4] In-Reply-To: References: Message-ID: <2YWy5hYePGAF37qNzKNWfXOzseN2w2ASotVayUFCfLc=.e3d2be21-a335-4b15-9007-af93865b2afe@github.com> 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid >> that would be helpful too and can be added to the OSContainer API . >> pids.current : >> A read-only single value file which exists on all cgroups. >> The number of processes currently in the cgroup and its descendants. >> >> Best regards, Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust TestPids Marked as reviewed by iklam (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5437 From ccheung at openjdk.java.net Wed Sep 15 18:04:50 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Wed, 15 Sep 2021 18:04:50 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump [v4] In-Reply-To: References: Message-ID: <6vtyQlrcFO_q6iiCte_q6tDB420vft-HLfd0e4u42WQ=.372a61c9-d6b7-4d0f-92d3-7ce3313a02f7@github.com> > Before this change, unregistered classes are loaded by the boot class loader during CDS dump time. > This RFE creates an URLClassLoader based on the source specified in the classlist and uses the URLClassLoader to load the unregistered class during CDS dump time. The URLClassLoader instances will be cached in a hash table with the source as the key so that classes associated with the same source will be loaded by the same instance of class loader. > > Passed tiers 1 - 4 testing. Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision: @iklam comment ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5458/files - new: https://git.openjdk.java.net/jdk/pull/5458/files/dd11b6db..6272a480 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5458&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5458&range=02-03 Stats: 14 lines in 4 files changed: 1 ins; 11 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5458.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5458/head:pull/5458 PR: https://git.openjdk.java.net/jdk/pull/5458 From ccheung at openjdk.java.net Wed Sep 15 18:06:20 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Wed, 15 Sep 2021 18:06:20 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump [v3] In-Reply-To: References: Message-ID: On Wed, 15 Sep 2021 05:35:31 GMT, Ioi Lam wrote: >> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision: >> >> 1. revert changes to jvm.cpp since SystemDictionaryShared::set_shared_class_misc_info() is being called in ClassLoader::record_result(); >> 2. remove UnregisteredClasses::seen_classloader(); >> 3. remove call to ClassLoaderExt::record_result() in ClassListParser::load_class_from_source() since it is being called in ClassLoader::record_result(). > > src/hotspot/share/cds/classListParser.cpp line 477: > >> 475: } >> 476: >> 477: k->clear_shared_class_loader_type(); > > I think this may not be necessary, as the correct loader type should have been set inside ClassLoaderExt::record_result(). Maybe change this to? > > > assert(k->is_shared_unregistered_class(), "must be"); I've changed it to assert. Also removed the `clear_shared_class_loader_type()` since it is not used anymore. The class loader type is not set not due to the call to `ClassLoaderExt::record_result()` which will default the loader type to boot loader. For unregistered classes, the `ClassLoaderExt::record_result()` won't be called in `ClassLoader::record_result()`. > src/hotspot/share/classfile/systemDictionaryShared.cpp line 454: > >> 452: bool SystemDictionaryShared::add_unregistered_class_for_static_archive(Thread* current, InstanceKlass* k) { >> 453: assert(DumpSharedSpaces, "only when dumping"); >> 454: return add_unregistered_class(current, k); > > Since this function is now just a pass-through to `add_unregistered_class()`, maybe we should delete this function, and make `add_unregistered_class()` public? I've made the change. The `add_unregistered_class()` is already declared public. ------------- PR: https://git.openjdk.java.net/jdk/pull/5458 From iklam at openjdk.java.net Wed Sep 15 21:16:57 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 15 Sep 2021 21:16:57 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump [v4] In-Reply-To: <6vtyQlrcFO_q6iiCte_q6tDB420vft-HLfd0e4u42WQ=.372a61c9-d6b7-4d0f-92d3-7ce3313a02f7@github.com> References: <6vtyQlrcFO_q6iiCte_q6tDB420vft-HLfd0e4u42WQ=.372a61c9-d6b7-4d0f-92d3-7ce3313a02f7@github.com> Message-ID: On Wed, 15 Sep 2021 18:04:50 GMT, Calvin Cheung wrote: >> Before this change, unregistered classes are loaded by the boot class loader during CDS dump time. >> This RFE creates an URLClassLoader based on the source specified in the classlist and uses the URLClassLoader to load the unregistered class during CDS dump time. The URLClassLoader instances will be cached in a hash table with the source as the key so that classes associated with the same source will be loaded by the same instance of class loader. >> >> Passed tiers 1 - 4 testing. > > Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision: > > @iklam comment Marked as reviewed by iklam (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5458 From minqi at openjdk.java.net Wed Sep 15 22:08:57 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Wed, 15 Sep 2021 22:08:57 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump [v4] In-Reply-To: <6vtyQlrcFO_q6iiCte_q6tDB420vft-HLfd0e4u42WQ=.372a61c9-d6b7-4d0f-92d3-7ce3313a02f7@github.com> References: <6vtyQlrcFO_q6iiCte_q6tDB420vft-HLfd0e4u42WQ=.372a61c9-d6b7-4d0f-92d3-7ce3313a02f7@github.com> Message-ID: On Wed, 15 Sep 2021 18:04:50 GMT, Calvin Cheung wrote: >> Before this change, unregistered classes are loaded by the boot class loader during CDS dump time. >> This RFE creates an URLClassLoader based on the source specified in the classlist and uses the URLClassLoader to load the unregistered class during CDS dump time. The URLClassLoader instances will be cached in a hash table with the source as the key so that classes associated with the same source will be loaded by the same instance of class loader. >> >> Passed tiers 1 - 4 testing. > > Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision: > > @iklam comment LGTM. ------------- Marked as reviewed by minqi (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5458 From lzang at openjdk.java.net Thu Sep 16 02:22:15 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Thu, 16 Sep 2021 02:22:15 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v34] In-Reply-To: References: Message-ID: > 8252842: Extend jmap to support parallel heap dump Lin Zang has updated the pull request incrementally with one additional commit since the last revision: fix issue ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/2261/files - new: https://git.openjdk.java.net/jdk/pull/2261/files/26255e3f..64d72dbc Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2261&range=33 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2261&range=32-33 Stats: 14 lines in 1 file changed: 5 ins; 4 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/2261.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2261/head:pull/2261 PR: https://git.openjdk.java.net/jdk/pull/2261 From lzang at openjdk.java.net Thu Sep 16 03:25:09 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Thu, 16 Sep 2021 03:25:09 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v35] In-Reply-To: References: Message-ID: > 8252842: Extend jmap to support parallel heap dump Lin Zang has updated the pull request incrementally with one additional commit since the last revision: code refine ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/2261/files - new: https://git.openjdk.java.net/jdk/pull/2261/files/64d72dbc..272c632e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2261&range=34 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2261&range=33-34 Stats: 27 lines in 1 file changed: 0 ins; 16 del; 11 mod Patch: https://git.openjdk.java.net/jdk/pull/2261.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2261/head:pull/2261 PR: https://git.openjdk.java.net/jdk/pull/2261 From lzang at openjdk.java.net Thu Sep 16 05:42:20 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Thu, 16 Sep 2021 05:42:20 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v36] In-Reply-To: References: Message-ID: <-bgDgDvEVnCW9yreta95MNFbpGhqAt44Rtb6Gn6KicE=.9ac67198-5e79-4acc-b5dd-0bac7f297760@github.com> > 8252842: Extend jmap to support parallel heap dump Lin Zang has updated the pull request incrementally with one additional commit since the last revision: fix build issue ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/2261/files - new: https://git.openjdk.java.net/jdk/pull/2261/files/272c632e..43c516a4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2261&range=35 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2261&range=34-35 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/2261.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2261/head:pull/2261 PR: https://git.openjdk.java.net/jdk/pull/2261 From mbaesken at openjdk.java.net Thu Sep 16 07:11:49 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 16 Sep 2021 07:11:49 GMT Subject: Integrated: JDK-8273526: Extend the OSContainer API pids controller with pids.current In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 09:21:59 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 pids.current , see https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid > that would be helpful too and can be added to the OSContainer API . > pids.current : > A read-only single value file which exists on all cgroups. > The number of processes currently in the cgroup and its descendants. > > Best regards, Matthias This pull request has now been integrated. Changeset: d4546b6b Author: Matthias Baesken URL: https://git.openjdk.java.net/jdk/commit/d4546b6b36f9dc9ff3d626f8cfe62b62daa0de01 Stats: 88 lines in 14 files changed: 85 ins; 0 del; 3 mod 8273526: Extend the OSContainer API pids controller with pids.current Reviewed-by: sgehwolf, iklam ------------- PR: https://git.openjdk.java.net/jdk/pull/5437 From mbaesken at openjdk.java.net Thu Sep 16 07:28:00 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 16 Sep 2021 07:28:00 GMT Subject: RFR: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms Message-ID: We have identical have_special_privileges() for Linux/AIX/BSD so the function is a good candidate to be moved to os_posix. Thanks, Matthias ------------- Commit messages: - JDK-8273815 Changes: https://git.openjdk.java.net/jdk/pull/5540/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5540&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273815 Stats: 50 lines in 4 files changed: 11 ins; 39 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5540.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5540/head:pull/5540 PR: https://git.openjdk.java.net/jdk/pull/5540 From shade at openjdk.java.net Thu Sep 16 07:56:50 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 16 Sep 2021 07:56:50 GMT Subject: Integrated: 8273804: Platform.isTieredSupported should handle the no-compiler case In-Reply-To: References: Message-ID: On Wed, 15 Sep 2021 10:29:36 GMT, Aleksey Shipilev wrote: > Happens with Zero tests: > > > $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=compiler/codecache/CheckSegmentedCodeCache.java > ... > > java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because "jdk.test.lib.Platform.compiler" is null > at jdk.test.lib.Platform.isTieredSupported(Platform.java:82) > at compiler.codecache.CheckSegmentedCodeCache.verifySegmentedCodeCache(CheckSegmentedCodeCache.java:61) > at compiler.codecache.CheckSegmentedCodeCache.main(CheckSegmentedCodeCache.java:108) > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) > at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:568) > at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) > at java.base/java.lang.Thread.run(Thread.java:833) > > > Additional testing: > - [x] Linux x86_64 Zero, `compiler/codecache/CheckSegmentedCodeCache.java` now properly fails with "no compilers" error This pull request has now been integrated. Changeset: 46af82e5 Author: Aleksey Shipilev URL: https://git.openjdk.java.net/jdk/commit/46af82e5b0d176e340f46125f8a3bb17e56bd7b3 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8273804: Platform.isTieredSupported should handle the no-compiler case Reviewed-by: dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5528 From shade at openjdk.java.net Thu Sep 16 07:56:50 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 16 Sep 2021 07:56:50 GMT Subject: RFR: 8273804: Platform.isTieredSupported should handle the no-compiler case In-Reply-To: References: Message-ID: On Wed, 15 Sep 2021 10:29:36 GMT, Aleksey Shipilev wrote: > Happens with Zero tests: > > > $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=compiler/codecache/CheckSegmentedCodeCache.java > ... > > java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because "jdk.test.lib.Platform.compiler" is null > at jdk.test.lib.Platform.isTieredSupported(Platform.java:82) > at compiler.codecache.CheckSegmentedCodeCache.verifySegmentedCodeCache(CheckSegmentedCodeCache.java:61) > at compiler.codecache.CheckSegmentedCodeCache.main(CheckSegmentedCodeCache.java:108) > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) > at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:568) > at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) > at java.base/java.lang.Thread.run(Thread.java:833) > > > Additional testing: > - [x] Linux x86_64 Zero, `compiler/codecache/CheckSegmentedCodeCache.java` now properly fails with "no compilers" error Thank you! ------------- PR: https://git.openjdk.java.net/jdk/pull/5528 From glaubitz at openjdk.java.net Thu Sep 16 08:56:46 2021 From: glaubitz at openjdk.java.net (John Paul Adrian Glaubitz) Date: Thu, 16 Sep 2021 08:56:46 GMT Subject: RFR: 8273606: Zero: SPARC64 build fails with si_band type mismatch [v2] In-Reply-To: References: Message-ID: <6vHp-t2A8BjwIxoTYBqRVmszXN8bkDGizOjLRf5mRe0=.6e080649-1854-42ef-a51c-96f5db2f2fd7@github.com> On Tue, 14 Sep 2021 10:16:26 GMT, Aleksey Shipilev wrote: > All right, I suppose everyone is happy with this patch? I'll be integrating it soon. Yep, fine with me. Thanks for taking care of this. ------------- PR: https://git.openjdk.java.net/jdk/pull/5470 From shade at openjdk.java.net Thu Sep 16 08:56:46 2021 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 16 Sep 2021 08:56:46 GMT Subject: Integrated: 8273606: Zero: SPARC64 build fails with si_band type mismatch In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 16:25:34 GMT, Aleksey Shipilev wrote: > This is actually caught by `-Werror=format` that is enabled by default. > > > $ sh ./configure --with-debug-level=slowdebug --with-boot-jdk=/home/shade/Install/jdk16-16.0.2-ea/ --openjdk-target=sparc64-linux-gnu --with-sysroot=/chroots/sparc64/ --with-jvm-variants=zero > $ make images This pull request has now been integrated. Changeset: 241ac89f Author: Aleksey Shipilev URL: https://git.openjdk.java.net/jdk/commit/241ac89f120f9bcfef65962aa05b51b9f847c4ce Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod 8273606: Zero: SPARC64 build fails with si_band type mismatch Reviewed-by: stuefe ------------- PR: https://git.openjdk.java.net/jdk/pull/5470 From lzang at openjdk.java.net Thu Sep 16 09:35:20 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Thu, 16 Sep 2021 09:35:20 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v37] In-Reply-To: References: Message-ID: > 8252842: Extend jmap to support parallel heap dump Lin Zang has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: fix build issue ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/2261/files - new: https://git.openjdk.java.net/jdk/pull/2261/files/43c516a4..fcc2674c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2261&range=36 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2261&range=35-36 Stats: 6 lines in 1 file changed: 0 ins; 1 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/2261.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2261/head:pull/2261 PR: https://git.openjdk.java.net/jdk/pull/2261 From lzang at openjdk.java.net Thu Sep 16 12:20:02 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Thu, 16 Sep 2021 12:20:02 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 05:02:18 GMT, Ralf Schmelter wrote: >> Lin Zang has updated the pull request incrementally with one additional commit since the last revision: >> >> fix build error > > I will start reviewing this today. Hi Ralf @schmelter-sap, I have updated the PR, would you like to help review it again? Thanks! BRs, Lin ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From stuefe at openjdk.java.net Thu Sep 16 15:56:14 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Thu, 16 Sep 2021 15:56:14 GMT Subject: RFR: JDK-8273783: Simplify Metaspace arena guard handling Message-ID: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> Hi, may I please have reviews for this patch. This simplifies metaspace arena guard handling and reduces the complexity guard mode brings to metaspace and its tests. It makes future modifications easier (esp. wrt Lilliput). ---- Metaspace has a guard mode which I added as part of JEP 387. It means that metaspace allocations are bracketed by canaries which, if broken, indicate a buffer overrun in metaspace. It can be switched on and off using -XX:+MetaspaceGuardAllocations, is by default off, and a debug-only feature. I was always a bit unhappy with the implementation though since it seemed too complex and one needed a bit of lateral thinking when looking at arenas. This is because guard prefixes change block size, cause problems with deallocations, require thinking about user pointer alignment etc. When investigating how to compress compressed class pointers beyond 32-bit for Lilliput, this became a nuisance and I'd like to simplify this. The new mechanism uses the fact that Metaspace is an arena allocator and we therefore know that (almost) all subsequent allocations are adjacent to each other in memory. Therefore, instead of adding guards as prefixes/suffixes with each allocation, we can just allocate the guard block as a separate block after each user allocation, as if the guard were just another user allocation. The result is exactly the same as before: all real allocations are separated in memory by a guard. But to most of the metaspace, these guard blocks are just normal allocations. A lot of special handling can be removed. And we don't have to disable deallocation handling in guard mode. The guard blocks are chained together via a simple pointer list and verifying them just means walking that list and examining the eyecatcher. Note that the guard has two eyecatchers, bracketing the next pointer between them - that way we don't have to do a sanity check on the pointer since an overwriter would likely have overwritten one of the eyecatchers before corrupting the pointer. Small caveats: - the first block in a chunk has no leading fence - the last block in a chunk *may* have no trailing fence - the guard now costs 24 bytes, up from 16 before. Note that all these caveats could be easily solved with a bit more intricate bit fiddling. However, I opted for simplicity here. Guard mode is only activated on demand, if one suspects a problem, and I think it works good enough this way. Tests: - Nightlies at SAP - manual tests on x64 and x86 with and without guards - manual gtests - manual metaspace jtreg tests Thanks, Thomas ------------- Commit messages: - JDK-8273783-Simplify-metaspace-arena-guard-handling Changes: https://git.openjdk.java.net/jdk/pull/5518/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5518&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273783 Stats: 243 lines in 9 files changed: 63 ins; 169 del; 11 mod Patch: https://git.openjdk.java.net/jdk/pull/5518.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5518/head:pull/5518 PR: https://git.openjdk.java.net/jdk/pull/5518 From ccheung at openjdk.java.net Thu Sep 16 16:40:34 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Thu, 16 Sep 2021 16:40:34 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump [v5] In-Reply-To: References: Message-ID: > Before this change, unregistered classes are loaded by the boot class loader during CDS dump time. > This RFE creates an URLClassLoader based on the source specified in the classlist and uses the URLClassLoader to load the unregistered class during CDS dump time. The URLClassLoader instances will be cached in a hash table with the source as the key so that classes associated with the same source will be loaded by the same instance of class loader. > > Passed tiers 1 - 4 testing. Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision: add back a blank line to jvm.cpp ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5458/files - new: https://git.openjdk.java.net/jdk/pull/5458/files/6272a480..bcf20769 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5458&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5458&range=03-04 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5458.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5458/head:pull/5458 PR: https://git.openjdk.java.net/jdk/pull/5458 From ccheung at openjdk.java.net Thu Sep 16 17:35:52 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Thu, 16 Sep 2021 17:35:52 GMT Subject: RFR: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump [v4] In-Reply-To: References: <6vtyQlrcFO_q6iiCte_q6tDB420vft-HLfd0e4u42WQ=.372a61c9-d6b7-4d0f-92d3-7ce3313a02f7@github.com> Message-ID: On Wed, 15 Sep 2021 21:13:39 GMT, Ioi Lam wrote: >> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision: >> >> @iklam comment > > Marked as reviewed by iklam (Reviewer). @iklam, @yminqi Thanks for the review. ------------- PR: https://git.openjdk.java.net/jdk/pull/5458 From ccheung at openjdk.java.net Thu Sep 16 17:35:55 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Thu, 16 Sep 2021 17:35:55 GMT Subject: Integrated: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump In-Reply-To: References: Message-ID: On Fri, 10 Sep 2021 00:20:04 GMT, Calvin Cheung wrote: > Before this change, unregistered classes are loaded by the boot class loader during CDS dump time. > This RFE creates an URLClassLoader based on the source specified in the classlist and uses the URLClassLoader to load the unregistered class during CDS dump time. The URLClassLoader instances will be cached in a hash table with the source as the key so that classes associated with the same source will be loaded by the same instance of class loader. > > Passed tiers 1 - 4 testing. This pull request has now been integrated. Changeset: 12fa7073 Author: Calvin Cheung URL: https://git.openjdk.java.net/jdk/commit/12fa7073c58eb9f204bb60ab6192738f8aece626 Stats: 285 lines in 10 files changed: 169 ins; 114 del; 2 mod 8261941: Use ClassLoader for unregistered classes during -Xshare:dump Reviewed-by: iklam, minqi ------------- PR: https://git.openjdk.java.net/jdk/pull/5458 From minqi at openjdk.java.net Thu Sep 16 18:00:58 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Thu, 16 Sep 2021 18:00:58 GMT Subject: Integrated: 8271569: Clean up the use of CDS constants and field offsets In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 18:13:10 GMT, Yumin Qi wrote: > Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately. > The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first. > > Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file. > > Tests: ter1-4 > > Thanks > Yumin This pull request has now been integrated. Changeset: 9c5441c9 Author: Yumin Qi URL: https://git.openjdk.java.net/jdk/commit/9c5441c9c4eea2ea4ba78ee426729bf646dc042d Stats: 342 lines in 11 files changed: 170 ins; 126 del; 46 mod 8271569: Clean up the use of CDS constants and field offsets Reviewed-by: iklam, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5450 From dholmes at openjdk.java.net Fri Sep 17 01:54:49 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Fri, 17 Sep 2021 01:54:49 GMT Subject: RFR: JDK-8273783: Simplify Metaspace arena guard handling In-Reply-To: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> References: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> Message-ID: On Wed, 15 Sep 2021 06:10:36 GMT, Thomas Stuefe wrote: > Hi, > > may I please have reviews for this patch. > > This simplifies metaspace arena guard handling and reduces the complexity guard mode brings to metaspace and its tests. It makes future modifications easier (esp. wrt Lilliput). > > ---- > > Metaspace has a guard mode which I added as part of JEP 387. It means that metaspace allocations are bracketed by canaries which, if broken, indicate a buffer overrun in metaspace. It can be switched on and off using -XX:+MetaspaceGuardAllocations, is by default off, and a debug-only feature. > > I was always a bit unhappy with the implementation though since it seemed too complex and one needed a bit of lateral thinking when looking at arenas. This is because guard prefixes change block size, cause problems with deallocations, require thinking about user pointer alignment etc. > > When investigating how to compress compressed class pointers beyond 32-bit for Lilliput, this became a nuisance and I'd like to simplify this. > > The new mechanism uses the fact that Metaspace is an arena allocator and we therefore know that (almost) all subsequent allocations are adjacent to each other in memory. Therefore, instead of adding guards as prefixes/suffixes with each allocation, we can just allocate the guard block as a separate block after each user allocation, as if the guard were just another user allocation. > > The result is exactly the same as before: all real allocations are separated in memory by a guard. But to most of the metaspace, these guard blocks are just normal allocations. A lot of special handling can be removed. And we don't have to disable deallocation handling in guard mode. > > The guard blocks are chained together via a simple pointer list and verifying them just means walking that list and examining the eyecatcher. Note that the guard has two eyecatchers, bracketing the next pointer between them - that way we don't have to do a sanity check on the pointer since an overwriter would likely have overwritten one of the eyecatchers before corrupting the pointer. > > Small caveats: > - the first block in a chunk has no leading fence > - the last block in a chunk *may* have no trailing fence > - the guard now costs 24 bytes, up from 16 before. > > Note that all these caveats could be easily solved with a bit more intricate bit fiddling. However, I opted for simplicity here. Guard mode is only activated on demand, if one suspects a problem, and I think it works good enough this way. > > Tests: > - Nightlies at SAP > - manual tests on x64 and x86 with and without guards > - manual gtests > - manual metaspace jtreg tests > > Thanks, Thomas Hi Thomas, I can't really review this, but I'm running it through our internal tier 1-3 testing. David ------------- PR: https://git.openjdk.java.net/jdk/pull/5518 From stuefe at openjdk.java.net Fri Sep 17 07:37:11 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Fri, 17 Sep 2021 07:37:11 GMT Subject: RFR: JDK-8273783: Simplify Metaspace arena guard handling [v2] In-Reply-To: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> References: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> Message-ID: > Hi, > > may I please have reviews for this patch. > > This simplifies metaspace arena guard handling and reduces the complexity guard mode brings to metaspace and its tests. It makes future modifications easier (esp. wrt Lilliput). > > ---- > > Metaspace has a guard mode which I added as part of JEP 387. It means that metaspace allocations are bracketed by canaries which, if broken, indicate a buffer overrun in metaspace. It can be switched on and off using -XX:+MetaspaceGuardAllocations, is by default off, and a debug-only feature. > > I was always a bit unhappy with the implementation though since it seemed too complex and one needed a bit of lateral thinking when looking at arenas. This is because guard prefixes change block size, cause problems with deallocations, require thinking about user pointer alignment etc. > > When investigating how to compress compressed class pointers beyond 32-bit for Lilliput, this became a nuisance and I'd like to simplify this. > > The new mechanism uses the fact that Metaspace is an arena allocator and we therefore know that (almost) all subsequent allocations are adjacent to each other in memory. Therefore, instead of adding guards as prefixes/suffixes with each allocation, we can just allocate the guard block as a separate block after each user allocation, as if the guard were just another user allocation. > > The result is exactly the same as before: all real allocations are separated in memory by a guard. But to most of the metaspace, these guard blocks are just normal allocations. A lot of special handling can be removed. And we don't have to disable deallocation handling in guard mode. > > The guard blocks are chained together via a simple pointer list and verifying them just means walking that list and examining the eyecatcher. Note that the guard has two eyecatchers, bracketing the next pointer between them - that way we don't have to do a sanity check on the pointer since an overwriter would likely have overwritten one of the eyecatchers before corrupting the pointer. > > Small caveats: > - the first block in a chunk has no leading fence > - the last block in a chunk *may* have no trailing fence > - the guard now costs 24 bytes, up from 16 before. > > Note that all these caveats could be easily solved with a bit more intricate bit fiddling. However, I opted for simplicity here. Guard mode is only activated on demand, if one suspects a problem, and I think it works good enough this way. > > Tests: > - Nightlies at SAP > - manual tests on x64 and x86 with and without guards > - manual gtests > - manual metaspace jtreg tests > > Thanks, Thomas Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision: Reduce diff and improve comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5518/files - new: https://git.openjdk.java.net/jdk/pull/5518/files/f576205e..8738a84c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5518&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5518&range=00-01 Stats: 18 lines in 2 files changed: 7 ins; 1 del; 10 mod Patch: https://git.openjdk.java.net/jdk/pull/5518.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5518/head:pull/5518 PR: https://git.openjdk.java.net/jdk/pull/5518 From mbaesken at openjdk.java.net Fri Sep 17 11:08:59 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 17 Sep 2021 11:08:59 GMT Subject: RFR: JDK-8273877: os::unsetenv unused Message-ID: <1ivf1XP8v3Iz59V0kUCgUtAju5Pp8eHUgjsCTu6_BMg=.fab30cbf-2e1c-4772-a6fd-b4ddc6521827@github.com> Please review this small change. It seems the HS function os::unsetenv is not used any more for some time and could be removed. Thanks, Matthias ------------- Commit messages: - JDK-8273877 Changes: https://git.openjdk.java.net/jdk/pull/5561/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5561&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273877 Stats: 13 lines in 3 files changed: 0 ins; 13 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5561.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5561/head:pull/5561 PR: https://git.openjdk.java.net/jdk/pull/5561 From mdoerr at openjdk.java.net Fri Sep 17 11:59:44 2021 From: mdoerr at openjdk.java.net (Martin Doerr) Date: Fri, 17 Sep 2021 11:59:44 GMT Subject: RFR: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms In-Reply-To: References: Message-ID: On Thu, 16 Sep 2021 07:20:39 GMT, Matthias Baesken wrote: > We have identical have_special_privileges() for Linux/AIX/BSD so the function is a good candidate to be moved to os_posix. > > Thanks, Matthias Marked as reviewed by mdoerr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5540 From mdoerr at openjdk.java.net Fri Sep 17 12:00:48 2021 From: mdoerr at openjdk.java.net (Martin Doerr) Date: Fri, 17 Sep 2021 12:00:48 GMT Subject: RFR: JDK-8273877: os::unsetenv unused In-Reply-To: <1ivf1XP8v3Iz59V0kUCgUtAju5Pp8eHUgjsCTu6_BMg=.fab30cbf-2e1c-4772-a6fd-b4ddc6521827@github.com> References: <1ivf1XP8v3Iz59V0kUCgUtAju5Pp8eHUgjsCTu6_BMg=.fab30cbf-2e1c-4772-a6fd-b4ddc6521827@github.com> Message-ID: On Fri, 17 Sep 2021 11:00:37 GMT, Matthias Baesken wrote: > Please review this small change. > It seems the HS function os::unsetenv is not used any more for some time and could be removed. > > Thanks, Matthias Marked as reviewed by mdoerr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5561 From coleenp at openjdk.java.net Fri Sep 17 12:05:47 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 17 Sep 2021 12:05:47 GMT Subject: RFR: 8266936: Add a finalization JFR event [v11] In-Reply-To: <3hNX4mQ98TyLNDmCXO4hDz8EMDoQ4ukr1Y1bvX1k8kk=.cc67221c-258a-4cac-a368-09d5fe44f245@github.com> References: <3hNX4mQ98TyLNDmCXO4hDz8EMDoQ4ukr1Y1bvX1k8kk=.cc67221c-258a-4cac-a368-09d5fe44f245@github.com> Message-ID: On Mon, 13 Sep 2021 17:12:49 GMT, Markus Gr?nlund wrote: >> Greetings, >> >> Object.finalize() was deprecated in JDK9. There is an ongoing effort to replace and mitigate Object.finalize() uses in the JDK libraries; please see https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. >> >> We also like to assist users in replacing and mitigating uses in non-JDK code. >> >> Hence, this changeset adds a periodic JFR event to help identify which classes are overriding Object.finalize(). >> >> Thanks >> Markus > > Markus Gr?nlund has updated the pull request incrementally with two additional commits since the last revision: > > - remove rehashing and rely on default grow_hint for table resize > - mtStatistics src/hotspot/share/runtime/mutexLocker.cpp line 323: > 321: > 322: #if INCLUDE_JFR > 323: def(JfrMsg_lock , PaddedMonitor, leaf-1, true, _safepoint_check_always); // -1 because the ConcurrentHashTable resize lock is leaf The ConcurrentHashTable_lock is a lock that doesn't check for safepoints, so if you take this lock out while checking for safepoints, it should assert when called from a JavaThread, which makes me think it's not called from a JavaThread and should be _safepoint_check_never. _resize_lock = new Mutex(Mutex::nosafepoint-2, "ConcurrentHashTableResize_lock", Mutex::_safepoint_check_never); In my change, this is the ranking for ConcurrentHashTableResize_lock, so this should be nosafepoint-3 if you check in after I do. ------------- PR: https://git.openjdk.java.net/jdk/pull/4731 From mbaesken at openjdk.java.net Fri Sep 17 12:28:42 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 17 Sep 2021 12:28:42 GMT Subject: RFR: JDK-8273877: os::unsetenv unused In-Reply-To: <1ivf1XP8v3Iz59V0kUCgUtAju5Pp8eHUgjsCTu6_BMg=.fab30cbf-2e1c-4772-a6fd-b4ddc6521827@github.com> References: <1ivf1XP8v3Iz59V0kUCgUtAju5Pp8eHUgjsCTu6_BMg=.fab30cbf-2e1c-4772-a6fd-b4ddc6521827@github.com> Message-ID: <-HadfWDqOqwIbvlNvB-JloS0vO6awjPKG63uIP886h4=.49ae1852-db88-494e-936d-3e178163dcc4@github.com> On Fri, 17 Sep 2021 11:00:37 GMT, Matthias Baesken wrote: > Please review this small change. > It seems the HS function os::unsetenv is not used any more for some time and could be removed. > > Thanks, Matthias Hi Martin, thanks for the approval ! Best regards, Matthias ------------- PR: https://git.openjdk.java.net/jdk/pull/5561 From mbaesken at openjdk.java.net Fri Sep 17 12:29:44 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 17 Sep 2021 12:29:44 GMT Subject: RFR: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms In-Reply-To: References: Message-ID: On Thu, 16 Sep 2021 07:20:39 GMT, Matthias Baesken wrote: > We have identical have_special_privileges() for Linux/AIX/BSD so the function is a good candidate to be moved to os_posix. > > Thanks, Matthias Hi Martin, thanks for the approval ! Best regards, Matthias ------------- PR: https://git.openjdk.java.net/jdk/pull/5540 From stuefe at openjdk.java.net Fri Sep 17 12:49:45 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Fri, 17 Sep 2021 12:49:45 GMT Subject: RFR: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms In-Reply-To: References: Message-ID: On Thu, 16 Sep 2021 07:20:39 GMT, Matthias Baesken wrote: > We have identical have_special_privileges() for Linux/AIX/BSD so the function is a good candidate to be moved to os_posix. > > Thanks, Matthias Looks good. Proposal for shorter code inline (if you take it, I need no re-review). Cheers, Thomas src/hotspot/os/posix/os_posix.cpp line 195: > 193: } > 194: return privileges; > 195: } Could be shortened to: bool os::have_special_privileges() { static bool privileges = (getuid() != geteuid()) || (getgid() != getegid()); return privileges; } ------------- Marked as reviewed by stuefe (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5540 From stuefe at openjdk.java.net Fri Sep 17 12:51:42 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Fri, 17 Sep 2021 12:51:42 GMT Subject: RFR: JDK-8273877: os::unsetenv unused In-Reply-To: <1ivf1XP8v3Iz59V0kUCgUtAju5Pp8eHUgjsCTu6_BMg=.fab30cbf-2e1c-4772-a6fd-b4ddc6521827@github.com> References: <1ivf1XP8v3Iz59V0kUCgUtAju5Pp8eHUgjsCTu6_BMg=.fab30cbf-2e1c-4772-a6fd-b4ddc6521827@github.com> Message-ID: On Fri, 17 Sep 2021 11:00:37 GMT, Matthias Baesken wrote: > Please review this small change. > It seems the HS function os::unsetenv is not used any more for some time and could be removed. > > Thanks, Matthias Looks good and trivial. ------------- Marked as reviewed by stuefe (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5561 From mbaesken at openjdk.java.net Fri Sep 17 12:56:51 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 17 Sep 2021 12:56:51 GMT Subject: RFR: JDK-8273877: os::unsetenv unused In-Reply-To: <1ivf1XP8v3Iz59V0kUCgUtAju5Pp8eHUgjsCTu6_BMg=.fab30cbf-2e1c-4772-a6fd-b4ddc6521827@github.com> References: <1ivf1XP8v3Iz59V0kUCgUtAju5Pp8eHUgjsCTu6_BMg=.fab30cbf-2e1c-4772-a6fd-b4ddc6521827@github.com> Message-ID: On Fri, 17 Sep 2021 11:00:37 GMT, Matthias Baesken wrote: > Please review this small change. > It seems the HS function os::unsetenv is not used any more for some time and could be removed. > > Thanks, Matthias Hi Thomas, thanks for the review ! ------------- PR: https://git.openjdk.java.net/jdk/pull/5561 From mbaesken at openjdk.java.net Fri Sep 17 12:56:51 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 17 Sep 2021 12:56:51 GMT Subject: Integrated: JDK-8273877: os::unsetenv unused In-Reply-To: <1ivf1XP8v3Iz59V0kUCgUtAju5Pp8eHUgjsCTu6_BMg=.fab30cbf-2e1c-4772-a6fd-b4ddc6521827@github.com> References: <1ivf1XP8v3Iz59V0kUCgUtAju5Pp8eHUgjsCTu6_BMg=.fab30cbf-2e1c-4772-a6fd-b4ddc6521827@github.com> Message-ID: On Fri, 17 Sep 2021 11:00:37 GMT, Matthias Baesken wrote: > Please review this small change. > It seems the HS function os::unsetenv is not used any more for some time and could be removed. > > Thanks, Matthias This pull request has now been integrated. Changeset: 27d747ad Author: Matthias Baesken URL: https://git.openjdk.java.net/jdk/commit/27d747ad4f13193d5fc651d893540465248c48a6 Stats: 13 lines in 3 files changed: 0 ins; 13 del; 0 mod 8273877: os::unsetenv unused Reviewed-by: mdoerr, stuefe ------------- PR: https://git.openjdk.java.net/jdk/pull/5561 From mgronlun at openjdk.java.net Fri Sep 17 13:55:45 2021 From: mgronlun at openjdk.java.net (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Fri, 17 Sep 2021 13:55:45 GMT Subject: RFR: 8266936: Add a finalization JFR event [v11] In-Reply-To: References: <3hNX4mQ98TyLNDmCXO4hDz8EMDoQ4ukr1Y1bvX1k8kk=.cc67221c-258a-4cac-a368-09d5fe44f245@github.com> Message-ID: On Fri, 17 Sep 2021 12:02:32 GMT, Coleen Phillimore wrote: >> Markus Gr?nlund has updated the pull request incrementally with two additional commits since the last revision: >> >> - remove rehashing and rely on default grow_hint for table resize >> - mtStatistics > > src/hotspot/share/runtime/mutexLocker.cpp line 323: > >> 321: >> 322: #if INCLUDE_JFR >> 323: def(JfrMsg_lock , PaddedMonitor, leaf-1, true, _safepoint_check_always); // -1 because the ConcurrentHashTable resize lock is leaf > > The ConcurrentHashTable_lock is a lock that doesn't check for safepoints, so if you take this lock out while checking for safepoints, it should assert when called from a JavaThread, which makes me think it's not called from a JavaThread and should be _safepoint_check_never. > _resize_lock = > new Mutex(Mutex::nosafepoint-2, "ConcurrentHashTableResize_lock", > Mutex::_safepoint_check_never); > In my change, this is the ranking for ConcurrentHashTableResize_lock, so this should be nosafepoint-3 if you check in after I do. Thanks, the JfrMsg_lock is acquired normally with safepoint checks when the JFR system needs to issue synchronous, blocking operations. Asynchronous operations, like message notifications, only attempt a try_lock() to avoid blocking in the case the lock is contended. The ConcurrentHashTable_lock is held during table iteration to prevent resizes from happening. Fortunately, the callback processing will only post asynchronous messages (like "Buffer full") and therefore will not reach the safepoint check. ------------- PR: https://git.openjdk.java.net/jdk/pull/4731 From mbaesken at openjdk.java.net Fri Sep 17 14:45:09 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 17 Sep 2021 14:45:09 GMT Subject: RFR: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: > We have identical have_special_privileges() for Linux/AIX/BSD so the function is a good candidate to be moved to os_posix. > > Thanks, Matthias Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Simplification proposed by Thomas Stuefe ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5540/files - new: https://git.openjdk.java.net/jdk/pull/5540/files/3e48d8cf..ed47cb34 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5540&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5540&range=00-01 Stats: 6 lines in 1 file changed: 0 ins; 5 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5540.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5540/head:pull/5540 PR: https://git.openjdk.java.net/jdk/pull/5540 From mbaesken at openjdk.java.net Fri Sep 17 15:00:56 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 17 Sep 2021 15:00:56 GMT Subject: RFR: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: On Fri, 17 Sep 2021 12:44:30 GMT, Thomas Stuefe wrote: >> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: >> >> Simplification proposed by Thomas Stuefe > > src/hotspot/os/posix/os_posix.cpp line 195: > >> 193: } >> 194: return privileges; >> 195: } > > Could be shortened to: > > bool os::have_special_privileges() { > static bool privileges = (getuid() != geteuid()) || (getgid() != getegid()); > return privileges; > } Hi Thomas, thanks for the hint - I adjusted the coding. Best regards, Matthias ------------- PR: https://git.openjdk.java.net/jdk/pull/5540 From mdoerr at openjdk.java.net Fri Sep 17 15:24:43 2021 From: mdoerr at openjdk.java.net (Martin Doerr) Date: Fri, 17 Sep 2021 15:24:43 GMT Subject: RFR: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: <-KhFVIHLsZL5cwu6Dw9qfIalf9vQKqV5hnL2r6QL4W4=.c3cfc805-bb1b-4287-aae5-b6cda2de3a09@github.com> On Fri, 17 Sep 2021 14:57:37 GMT, Matthias Baesken wrote: >> src/hotspot/os/posix/os_posix.cpp line 195: >> >>> 193: } >>> 194: return privileges; >>> 195: } >> >> Could be shortened to: >> >> bool os::have_special_privileges() { >> static bool privileges = (getuid() != geteuid()) || (getgid() != getegid()); >> return privileges; >> } > > Hi Thomas, thanks for the hint - I adjusted the coding. > Best regards, Matthias A static bool which gets evaluated on every call makes no sense! ------------- PR: https://git.openjdk.java.net/jdk/pull/5540 From mdoerr at openjdk.java.net Fri Sep 17 15:29:44 2021 From: mdoerr at openjdk.java.net (Martin Doerr) Date: Fri, 17 Sep 2021 15:29:44 GMT Subject: RFR: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: On Fri, 17 Sep 2021 14:45:09 GMT, Matthias Baesken wrote: >> We have identical have_special_privileges() for Linux/AIX/BSD so the function is a good candidate to be moved to os_posix. >> >> Thanks, Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Simplification proposed by Thomas Stuefe Forget my comment. Still good. ------------- Marked as reviewed by mdoerr (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5540 From stuefe at openjdk.java.net Fri Sep 17 15:48:44 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Fri, 17 Sep 2021 15:48:44 GMT Subject: RFR: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms [v2] In-Reply-To: <-KhFVIHLsZL5cwu6Dw9qfIalf9vQKqV5hnL2r6QL4W4=.c3cfc805-bb1b-4287-aae5-b6cda2de3a09@github.com> References: <-KhFVIHLsZL5cwu6Dw9qfIalf9vQKqV5hnL2r6QL4W4=.c3cfc805-bb1b-4287-aae5-b6cda2de3a09@github.com> Message-ID: <69IA1M_vxVhW6p3HTIqIkinBRwUhSMli653w8D7ZDRM=.c550e9b6-a721-48e7-a318-69fddded5ac7@github.com> On Fri, 17 Sep 2021 15:21:51 GMT, Martin Doerr wrote: >> Hi Thomas, thanks for the hint - I adjusted the coding. >> Best regards, Matthias > > A static bool which gets evaluated on every call makes no sense! Oh, wait! I think it's ok. I was only wondering why `privileges` should get initialized when `have_special_privileges()` is called for the first time and not during static initialization of the class. But it's at least equivalent to what we had before. Now I am confused, what class? This is a global function with a function-local static variable. ------------- PR: https://git.openjdk.java.net/jdk/pull/5540 From minqi at openjdk.java.net Fri Sep 17 20:59:45 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Fri, 17 Sep 2021 20:59:45 GMT Subject: RFR: 8273505: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java#default-cl crashed with SIGSEGV in MetaspaceShared::link_shared_classes In-Reply-To: References: Message-ID: On Fri, 17 Sep 2021 17:56:44 GMT, Calvin Cheung wrote: > Please review this small patch for keeping the class loader, which is the holder of the `ClassLoaderData`, alive during class linking within `MetaspaceShared::link_shared_classes()`. Prior to this fix, the `ClassLoaderData::inc_keep_alive()` was used in an attempt to keep the `ClassLoaderData` alive but that was for hidden classes only. > > Testing: tiers 1 - 4. LGTM. ------------- Marked as reviewed by minqi (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5566 From iklam at openjdk.java.net Fri Sep 17 18:53:45 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Fri, 17 Sep 2021 18:53:45 GMT Subject: RFR: 8273505: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java#default-cl crashed with SIGSEGV in MetaspaceShared::link_shared_classes In-Reply-To: References: Message-ID: On Fri, 17 Sep 2021 17:56:44 GMT, Calvin Cheung wrote: > Please review this small patch for keeping the class loader, which is the holder of the `ClassLoaderData`, alive during class linking within `MetaspaceShared::link_shared_classes()`. Prior to this fix, the `ClassLoaderData::inc_keep_alive()` was used in an attempt to keep the `ClassLoaderData` alive but that was for hidden classes only. > > Testing: tiers 1 - 4. LGTM ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5566 From ccheung at openjdk.java.net Fri Sep 17 18:04:57 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Fri, 17 Sep 2021 18:04:57 GMT Subject: RFR: 8273505: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java#default-cl crashed with SIGSEGV in MetaspaceShared::link_shared_classes Message-ID: Please review this small patch for keeping the class loader, which is the holder of the `ClassLoaderData`, alive during class linking within `MetaspaceShared::link_shared_classes()`. Prior to this fix, the `ClassLoaderData::inc_keep_alive()` was used in an attempt to keep the `ClassLoaderData` alive but that was for hidden classes only. Testing: tiers 1 - 4. ------------- Commit messages: - 8273505: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java#default-cl crashed with SIGSEGV in MetaspaceShared::link_shared_classes Changes: https://git.openjdk.java.net/jdk/pull/5566/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5566&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273505 Stats: 15 lines in 2 files changed: 5 ins; 7 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/5566.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5566/head:pull/5566 PR: https://git.openjdk.java.net/jdk/pull/5566 From mseledtsov at openjdk.java.net Sat Sep 18 00:22:01 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Sat, 18 Sep 2021 00:22:01 GMT Subject: RFR: JDK-8267163: Rename anonymous loader tests to hidden loader tests Message-ID: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> Please review this simple change that renames vm/mlvm tests and test package name from anonymous to hidden. Testing: Ran open/test/hotspot/jtreg/vmTestbase/vm/mlvm on MacOS-x64: PASS Running open/test/hotspot/jtreg/vmTestbase/vm/mlvm on multiple platforms: in progress ... ------------- Commit messages: - Renamed AnonkTestee* to HiddenkTestee* - Renamed package name except for VM testbase conversion comment - Renamed Anonk classes - Renamed classes - Renamed anonloader to hiddenloader Changes: https://git.openjdk.java.net/jdk/pull/5570/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5570&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8267163 Stats: 1268 lines in 21 files changed: 631 ins; 631 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/5570.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5570/head:pull/5570 PR: https://git.openjdk.java.net/jdk/pull/5570 From mseledtsov at openjdk.java.net Sat Sep 18 00:22:02 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Sat, 18 Sep 2021 00:22:02 GMT Subject: RFR: JDK-8267163: Rename anonymous loader tests to hidden loader tests In-Reply-To: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> References: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> Message-ID: On Sat, 18 Sep 2021 00:16:08 GMT, Mikhailo Seledtsov wrote: > Please review this simple change that renames vm/mlvm tests and test package name from anonymous to hidden. > Testing: > Ran open/test/hotspot/jtreg/vmTestbase/vm/mlvm on MacOS-x64: PASS > Running open/test/hotspot/jtreg/vmTestbase/vm/mlvm on multiple platforms: in progress ... @hseigel Harold, please review when you have a chance. ------------- PR: https://git.openjdk.java.net/jdk/pull/5570 From stuefe at openjdk.java.net Sat Sep 18 05:36:28 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Sat, 18 Sep 2021 05:36:28 GMT Subject: RFR: JDK-8273783: Simplify Metaspace arena guard handling [v3] In-Reply-To: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> References: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> Message-ID: <1-ZK_6AeHRPRDulufbCH6M8ggts3k4kEu4te18suRCE=.c43dcec2-fbc2-4b62-982b-841df699f1ac@github.com> > Hi, > > may I please have reviews for this patch. > > This simplifies metaspace arena guard handling and reduces the complexity guard mode brings to metaspace and its tests. It makes future modifications easier (esp. wrt Lilliput). > > ---- > > Metaspace has a guard mode which I added as part of JEP 387. It means that metaspace allocations are bracketed by canaries which, if broken, indicate a buffer overrun in metaspace. It can be switched on and off using -XX:+MetaspaceGuardAllocations, is by default off, and a debug-only feature. > > I was always a bit unhappy with the implementation though since it seemed too complex and one needed a bit of lateral thinking when looking at arenas. This is because guard prefixes change block size, cause problems with deallocations, require thinking about user pointer alignment etc. > > When investigating how to compress compressed class pointers beyond 32-bit for Lilliput, this became a nuisance and I'd like to simplify this. > > The new mechanism uses the fact that Metaspace is an arena allocator and we therefore know that (almost) all subsequent allocations are adjacent to each other in memory. Therefore, instead of adding guards as prefixes/suffixes with each allocation, we can just allocate the guard block as a separate block after each user allocation, as if the guard were just another user allocation. > > The result is exactly the same as before: all real allocations are separated in memory by a guard. But to most of the metaspace, these guard blocks are just normal allocations. A lot of special handling can be removed. And we don't have to disable deallocation handling in guard mode. > > The guard blocks are chained together via a simple pointer list and verifying them just means walking that list and examining the eyecatcher. Note that the guard has two eyecatchers, bracketing the next pointer between them - that way we don't have to do a sanity check on the pointer since an overwriter would likely have overwritten one of the eyecatchers before corrupting the pointer. > > Small caveats: > - the first block in a chunk has no leading fence > - the last block in a chunk *may* have no trailing fence > - the guard now costs 24 bytes, up from 16 before. > > Note that all these caveats could be easily solved with a bit more intricate bit fiddling. However, I opted for simplicity here. Guard mode is only activated on demand, if one suspects a problem, and I think it works good enough this way. > > Tests: > - Nightlies at SAP > - manual tests on x64 and x86 with and without guards > - manual gtests > - manual metaspace jtreg tests > > Thanks, Thomas Thomas Stuefe 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 three additional commits since the last revision: - Merge - Reduce diff and improve comments - JDK-8273783-Simplify-metaspace-arena-guard-handling ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5518/files - new: https://git.openjdk.java.net/jdk/pull/5518/files/8738a84c..61d6efb6 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5518&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5518&range=01-02 Stats: 1588 lines in 55 files changed: 1062 ins; 402 del; 124 mod Patch: https://git.openjdk.java.net/jdk/pull/5518.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5518/head:pull/5518 PR: https://git.openjdk.java.net/jdk/pull/5518 From yyang at openjdk.java.net Sat Sep 18 07:52:29 2021 From: yyang at openjdk.java.net (Yi Yang) Date: Sat, 18 Sep 2021 07:52:29 GMT Subject: RFR: 8272114: Unused _last_state in osThread_windows Message-ID: Unused _last_state in osThread_windows? its getter and setter can be removed as well. ------------- Commit messages: - remove Changes: https://git.openjdk.java.net/jdk/pull/5572/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5572&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8272114 Stats: 7 lines in 1 file changed: 0 ins; 7 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5572.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5572/head:pull/5572 PR: https://git.openjdk.java.net/jdk/pull/5572 From stuefe at openjdk.java.net Sat Sep 18 08:14:00 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Sat, 18 Sep 2021 08:14:00 GMT Subject: RFR: JDK-8273958: gtest/MetaspaceGtests executes unnecessary tests in debug builds Message-ID: <-oos37ohbNlDIKtW9pSVsySIt_XMAIsz9oKOeRWHSps=.4dc6b68f-c1f1-4f51-83cf-fe40dcd26a7b@github.com> May I please have reviews for this trivial fix. We miss two "debug==false" requires rules on tests meant for non-debug only. Taking them out reduces test runtime on debug by ~20 seconds. I also shifted some of the existing requires tags down to cluster them together in one place, for better clarity. ------------- Commit messages: - JDK-8273958-gtest-MetaspaceGtests-executes-unnecessary-tests-in-debug-builds Changes: https://git.openjdk.java.net/jdk/pull/5571/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5571&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273958 Stats: 10 lines in 1 file changed: 6 ins; 4 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5571.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5571/head:pull/5571 PR: https://git.openjdk.java.net/jdk/pull/5571 From jiefu at openjdk.java.net Sat Sep 18 08:27:45 2021 From: jiefu at openjdk.java.net (Jie Fu) Date: Sat, 18 Sep 2021 08:27:45 GMT Subject: RFR: JDK-8273958: gtest/MetaspaceGtests executes unnecessary tests in debug builds In-Reply-To: <-oos37ohbNlDIKtW9pSVsySIt_XMAIsz9oKOeRWHSps=.4dc6b68f-c1f1-4f51-83cf-fe40dcd26a7b@github.com> References: <-oos37ohbNlDIKtW9pSVsySIt_XMAIsz9oKOeRWHSps=.4dc6b68f-c1f1-4f51-83cf-fe40dcd26a7b@github.com> Message-ID: On Sat, 18 Sep 2021 06:36:50 GMT, Thomas Stuefe wrote: > May I please have reviews for this trivial fix. > > We miss two "debug==false" requires rules on tests meant for non-debug only. Taking them out reduces test runtime on debug by ~20 seconds. > > I also shifted some of the existing requires tags down to cluster them together in one place, for better clarity. Looks good and trivial. ------------- Marked as reviewed by jiefu (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5571 From stuefe at openjdk.java.net Sat Sep 18 08:32:48 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Sat, 18 Sep 2021 08:32:48 GMT Subject: RFR: JDK-8273958: gtest/MetaspaceGtests executes unnecessary tests in debug builds In-Reply-To: References: <-oos37ohbNlDIKtW9pSVsySIt_XMAIsz9oKOeRWHSps=.4dc6b68f-c1f1-4f51-83cf-fe40dcd26a7b@github.com> Message-ID: <7e1KrHiJ8ag15dU1rEMrXCOE4zYY4QGChANpXVOo8rg=.2320fb82-64d3-4b93-9679-7bae374a959d@github.com> On Sat, 18 Sep 2021 08:24:30 GMT, Jie Fu wrote: > Looks good and trivial. Thank you! ------------- PR: https://git.openjdk.java.net/jdk/pull/5571 From stuefe at openjdk.java.net Sat Sep 18 08:32:48 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Sat, 18 Sep 2021 08:32:48 GMT Subject: Integrated: JDK-8273958: gtest/MetaspaceGtests executes unnecessary tests in debug builds In-Reply-To: <-oos37ohbNlDIKtW9pSVsySIt_XMAIsz9oKOeRWHSps=.4dc6b68f-c1f1-4f51-83cf-fe40dcd26a7b@github.com> References: <-oos37ohbNlDIKtW9pSVsySIt_XMAIsz9oKOeRWHSps=.4dc6b68f-c1f1-4f51-83cf-fe40dcd26a7b@github.com> Message-ID: On Sat, 18 Sep 2021 06:36:50 GMT, Thomas Stuefe wrote: > May I please have reviews for this trivial fix. > > We miss two "debug==false" requires rules on tests meant for non-debug only. Taking them out reduces test runtime on debug by ~20 seconds. > > I also shifted some of the existing requires tags down to cluster them together in one place, for better clarity. This pull request has now been integrated. Changeset: bb9d1427 Author: Thomas Stuefe URL: https://git.openjdk.java.net/jdk/commit/bb9d142759ece7665329b124a8ea0b16049b024a Stats: 10 lines in 1 file changed: 6 ins; 4 del; 0 mod 8273958: gtest/MetaspaceGtests executes unnecessary tests in debug builds Reviewed-by: jiefu ------------- PR: https://git.openjdk.java.net/jdk/pull/5571 From stuefe at openjdk.java.net Sat Sep 18 08:44:13 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Sat, 18 Sep 2021 08:44:13 GMT Subject: RFR: JDK-8273959: Some metaspace diagnostic switches should be develop Message-ID: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> May I have reviews please for this fix. The switches `MetaspaceHandleDeallocations` and `MetaspaceGuardAllocations` control debug-only features and consequently should be develop instead. Unnecessary usage of -XX:+UnlockDiagnosticVMOptions is removed (in two cases unrelated to the changed switches). ------------- Commit messages: - JDK-8273959-Some-metaspace-diagnostic-switches-should-be-develop Changes: https://git.openjdk.java.net/jdk/pull/5573/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5573&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273959 Stats: 5 lines in 2 files changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/5573.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5573/head:pull/5573 PR: https://git.openjdk.java.net/jdk/pull/5573 From stuefe at openjdk.java.net Sat Sep 18 08:48:42 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Sat, 18 Sep 2021 08:48:42 GMT Subject: RFR: 8272114: Unused _last_state in osThread_windows In-Reply-To: References: Message-ID: On Sat, 18 Sep 2021 07:44:11 GMT, Yi Yang wrote: > Trivial change to remove unused _last_state in osThread_windows? its getter and setter can be removed as well. Good and trivial. Tried to find out the history, but AFAICS its been in there since the beginning of OpenJDK. ------------- Marked as reviewed by stuefe (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5572 From jiefu at openjdk.java.net Sat Sep 18 08:50:43 2021 From: jiefu at openjdk.java.net (Jie Fu) Date: Sat, 18 Sep 2021 08:50:43 GMT Subject: RFR: JDK-8273959: Some metaspace diagnostic switches should be develop In-Reply-To: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> References: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> Message-ID: <31rCelPaJPHnibirbJHQscZbEwtQktB0VYPO_lo1IiM=.44d38c25-6547-4d6b-8535-495edd191a81@github.com> On Sat, 18 Sep 2021 08:37:38 GMT, Thomas Stuefe wrote: > May I have reviews please for this fix. > > The switches `MetaspaceHandleDeallocations` and `MetaspaceGuardAllocations` control debug-only features and consequently should be develop instead. > > Unnecessary usage of -XX:+UnlockDiagnosticVMOptions is removed (in two cases unrelated to the changed switches). Do we need a CSR for this change? ------------- PR: https://git.openjdk.java.net/jdk/pull/5573 From stuefe at openjdk.java.net Sat Sep 18 08:55:49 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Sat, 18 Sep 2021 08:55:49 GMT Subject: RFR: JDK-8273959: Some metaspace diagnostic switches should be develop In-Reply-To: <31rCelPaJPHnibirbJHQscZbEwtQktB0VYPO_lo1IiM=.44d38c25-6547-4d6b-8535-495edd191a81@github.com> References: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> <31rCelPaJPHnibirbJHQscZbEwtQktB0VYPO_lo1IiM=.44d38c25-6547-4d6b-8535-495edd191a81@github.com> Message-ID: On Sat, 18 Sep 2021 08:48:01 GMT, Jie Fu wrote: > Do we need a CSR for this change? God no :) These were diagnostic switches only used in tests (and I believe, only used by me). ------------- PR: https://git.openjdk.java.net/jdk/pull/5573 From yyang at openjdk.java.net Sat Sep 18 12:23:42 2021 From: yyang at openjdk.java.net (Yi Yang) Date: Sat, 18 Sep 2021 12:23:42 GMT Subject: RFR: 8272114: Unused _last_state in osThread_windows In-Reply-To: References: Message-ID: On Sat, 18 Sep 2021 07:44:11 GMT, Yi Yang wrote: > Trivial change to remove unused _last_state in osThread_windows? its getter and setter can be removed as well. Yes, it predates the history of OPENjdk. ------------- PR: https://git.openjdk.java.net/jdk/pull/5572 From dholmes at openjdk.java.net Sat Sep 18 23:51:48 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sat, 18 Sep 2021 23:51:48 GMT Subject: RFR: 8272114: Unused _last_state in osThread_windows In-Reply-To: References: Message-ID: <5tmX6mRF0l2phVmRfapG4wTT-FYSg6_byumxryFs4C8=.e6976acb-43f7-4f06-bb1b-139346a97f90@github.com> On Sat, 18 Sep 2021 07:44:11 GMT, Yi Yang wrote: > Trivial change to remove unused _last_state in osThread_windows? its getter and setter can be removed as well. Well spotted! :) Added in November 2000 as a temporary fix as per the comment. But too much effort to try and figure out when it became dead code. Cheers, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5572 From dholmes at openjdk.java.net Sun Sep 19 23:11:09 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sun, 19 Sep 2021 23:11:09 GMT Subject: RFR: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: On Fri, 17 Sep 2021 14:45:09 GMT, Matthias Baesken wrote: >> We have identical have_special_privileges() for Linux/AIX/BSD so the function is a good candidate to be moved to os_posix. >> >> Thanks, Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Simplification proposed by Thomas Stuefe As an equivalent refactoring this is fine. We could also do the initialization is os::init() but it makes little, if any difference. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5540 From dholmes at openjdk.java.net Sun Sep 19 23:31:59 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sun, 19 Sep 2021 23:31:59 GMT Subject: RFR: JDK-8273959: Some metaspace diagnostic switches should be develop In-Reply-To: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> References: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> Message-ID: On Sat, 18 Sep 2021 08:37:38 GMT, Thomas Stuefe wrote: > May I have reviews please for this fix. > > The switches `MetaspaceHandleDeallocations` and `MetaspaceGuardAllocations` control debug-only features and consequently should be develop instead. > > Unnecessary usage of -XX:+UnlockDiagnosticVMOptions is removed (in two cases unrelated to the changed switches). LGTM! Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5573 From dholmes at openjdk.java.net Sun Sep 19 23:35:53 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sun, 19 Sep 2021 23:35:53 GMT Subject: RFR: JDK-8273959: Some metaspace diagnostic switches should be develop In-Reply-To: <31rCelPaJPHnibirbJHQscZbEwtQktB0VYPO_lo1IiM=.44d38c25-6547-4d6b-8535-495edd191a81@github.com> References: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> <31rCelPaJPHnibirbJHQscZbEwtQktB0VYPO_lo1IiM=.44d38c25-6547-4d6b-8535-495edd191a81@github.com> Message-ID: <_viq4vQTxU-5b_gDFMSiD2XLE37q3PcHZXlE8aOTNdU=.14efbfe5-ad36-423f-a4e8-b731fd0943c7@github.com> On Sat, 18 Sep 2021 08:48:01 GMT, Jie Fu wrote: >> May I have reviews please for this fix. >> >> The switches `MetaspaceHandleDeallocations` and `MetaspaceGuardAllocations` control debug-only features and consequently should be develop instead. >> >> Unnecessary usage of -XX:+UnlockDiagnosticVMOptions is removed (in two cases unrelated to the changed switches). > > Do we need a CSR for this change? @DamonFool for reference: https://wiki.openjdk.java.net/display/HotSpot/Hotspot+Command-line+Flags%3A+Kinds%2C+Lifecycle+and+the+CSR+Process ------------- PR: https://git.openjdk.java.net/jdk/pull/5573 From dholmes at openjdk.java.net Sun Sep 19 23:41:52 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sun, 19 Sep 2021 23:41:52 GMT Subject: RFR: JDK-8267163: Rename anonymous loader tests to hidden loader tests In-Reply-To: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> References: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> Message-ID: On Sat, 18 Sep 2021 00:16:08 GMT, Mikhailo Seledtsov wrote: > Please review this simple change that renames vm/mlvm tests and test package name from anonymous to hidden. > Testing: > Ran open/test/hotspot/jtreg/vmTestbase/vm/mlvm on MacOS-x64: PASS > Running open/test/hotspot/jtreg/vmTestbase/vm/mlvm on multiple platforms: in progress ... Hi Misha, This renaming seems fine. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5570 From jiefu at openjdk.java.net Sun Sep 19 23:42:49 2021 From: jiefu at openjdk.java.net (Jie Fu) Date: Sun, 19 Sep 2021 23:42:49 GMT Subject: RFR: JDK-8273959: Some metaspace diagnostic switches should be develop In-Reply-To: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> References: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> Message-ID: On Sat, 18 Sep 2021 08:37:38 GMT, Thomas Stuefe wrote: > May I have reviews please for this fix. > > The switches `MetaspaceHandleDeallocations` and `MetaspaceGuardAllocations` control debug-only features and consequently should be develop instead. > > Unnecessary usage of -XX:+UnlockDiagnosticVMOptions is removed (in two cases unrelated to the changed switches). LGTM ------------- Marked as reviewed by jiefu (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5573 From jiefu at openjdk.java.net Sun Sep 19 23:42:49 2021 From: jiefu at openjdk.java.net (Jie Fu) Date: Sun, 19 Sep 2021 23:42:49 GMT Subject: RFR: JDK-8273959: Some metaspace diagnostic switches should be develop In-Reply-To: <31rCelPaJPHnibirbJHQscZbEwtQktB0VYPO_lo1IiM=.44d38c25-6547-4d6b-8535-495edd191a81@github.com> References: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> <31rCelPaJPHnibirbJHQscZbEwtQktB0VYPO_lo1IiM=.44d38c25-6547-4d6b-8535-495edd191a81@github.com> Message-ID: On Sat, 18 Sep 2021 08:48:01 GMT, Jie Fu wrote: >> May I have reviews please for this fix. >> >> The switches `MetaspaceHandleDeallocations` and `MetaspaceGuardAllocations` control debug-only features and consequently should be develop instead. >> >> Unnecessary usage of -XX:+UnlockDiagnosticVMOptions is removed (in two cases unrelated to the changed switches). > > Do we need a CSR for this change? > @DamonFool for reference: https://wiki.openjdk.java.net/display/HotSpot/Hotspot+Command-line+Flags%3A+Kinds%2C+Lifecycle+and+the+CSR+Process Got it. Thanks @dholmes-ora . ------------- PR: https://git.openjdk.java.net/jdk/pull/5573 From david.holmes at oracle.com Mon Sep 20 05:31:31 2021 From: david.holmes at oracle.com (David Holmes) Date: Mon, 20 Sep 2021 15:31:31 +1000 Subject: RFR: JDK-8273783: Simplify Metaspace arena guard handling In-Reply-To: References: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> Message-ID: On 17/09/2021 11:54 am, David Holmes wrote: > On Wed, 15 Sep 2021 06:10:36 GMT, Thomas Stuefe wrote: > >> Hi, >> >> may I please have reviews for this patch. >> >> This simplifies metaspace arena guard handling and reduces the complexity guard mode brings to metaspace and its tests. It makes future modifications easier (esp. wrt Lilliput). >> > > I can't really review this, but I'm running it through our internal tier 1-3 testing. That testing passed - one unrelated crash. David > David > > ------------- > > PR: https://git.openjdk.java.net/jdk/pull/5518 > From stuefe at openjdk.java.net Mon Sep 20 05:46:54 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Mon, 20 Sep 2021 05:46:54 GMT Subject: RFR: JDK-8273783: Simplify Metaspace arena guard handling [v3] In-Reply-To: <1-ZK_6AeHRPRDulufbCH6M8ggts3k4kEu4te18suRCE=.c43dcec2-fbc2-4b62-982b-841df699f1ac@github.com> References: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> <1-ZK_6AeHRPRDulufbCH6M8ggts3k4kEu4te18suRCE=.c43dcec2-fbc2-4b62-982b-841df699f1ac@github.com> Message-ID: On Sat, 18 Sep 2021 05:36:28 GMT, Thomas Stuefe wrote: >> Hi, >> >> may I please have reviews for this patch. >> >> This simplifies metaspace arena guard handling and reduces the complexity guard mode brings to metaspace and its tests. It makes future modifications easier (esp. wrt Lilliput). >> >> ---- >> >> Metaspace has a guard mode which I added as part of JEP 387. It means that metaspace allocations are bracketed by canaries which, if broken, indicate a buffer overrun in metaspace. It can be switched on and off using -XX:+MetaspaceGuardAllocations, is by default off, and a debug-only feature. >> >> I was always a bit unhappy with the implementation though since it seemed too complex and one needed a bit of lateral thinking when looking at arenas. This is because guard prefixes change block size, cause problems with deallocations, require thinking about user pointer alignment etc. >> >> When investigating how to compress compressed class pointers beyond 32-bit for Lilliput, working around all that special handling became too complicated and therefore I'd like a simpler solution. >> >> The new mechanism uses the fact that Metaspace is an arena allocator and we therefore know that (almost) all subsequent allocations are adjacent to each other in memory. Therefore, instead of adding guards as prefixes/suffixes with each allocation, we can just allocate the guard block as a separate block after each user allocation, as if the guard were just another user allocation. >> >> The result is exactly the same as before: all real allocations are separated in memory by a guard. But to most of the metaspace, these guard blocks are just normal allocations. A lot of special handling can be removed. And we don't have to disable deallocation handling in guard mode. >> >> The guard blocks are chained together via a simple pointer list and verifying them just means walking that list and examining the eyecatcher. Note that the guard has two eyecatchers, bracketing the next pointer between them - that way we don't have to do a sanity check on the pointer since an overwriter would likely have overwritten one of the eyecatchers before corrupting the pointer. >> >> Small caveats: >> - the first block in a chunk has no leading fence >> - the last block in a chunk *may* have no trailing fence >> - the guard now costs 24 bytes, up from 16 before. >> >> Note that all these caveats could be easily solved with a bit more intricate bit fiddling. However, I opted for simplicity here. Guard mode is only activated on demand, if one suspects a problem, and I think it works good enough this way. >> >> Tests: >> - Nightlies at SAP >> - manual tests on x64 and x86 with and without guards >> - manual gtests >> - manual metaspace jtreg tests >> >> Thanks, Thomas > > Thomas Stuefe 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 three additional commits since the last revision: > > - Merge > - Reduce diff and improve comments > - JDK-8273783-Simplify-metaspace-arena-guard-handling > _Mailing list message from [David Holmes](mailto:david.holmes at oracle.com) on [hotspot-runtime-dev](mailto:hotspot-runtime-dev at mail.openjdk.java.net):_ > > On 17/09/2021 11:54 am, David Holmes wrote: > > > On Wed, 15 Sep 2021 06:10:36 GMT, Thomas Stuefe wrote: > > > Hi, > > > may I please have reviews for this patch. > > > This simplifies metaspace arena guard handling and reduces the complexity guard mode brings to metaspace and its tests. It makes future modifications easier (esp. wrt Lilliput). > > > > > > I can't really review this, but I'm running it through our internal tier 1-3 testing. > > That testing passed - one unrelated crash. > > David Thank you David! ------------- PR: https://git.openjdk.java.net/jdk/pull/5518 From stuefe at openjdk.java.net Mon Sep 20 05:47:47 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Mon, 20 Sep 2021 05:47:47 GMT Subject: RFR: JDK-8273959: Some metaspace diagnostic switches should be develop In-Reply-To: References: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> <31rCelPaJPHnibirbJHQscZbEwtQktB0VYPO_lo1IiM=.44d38c25-6547-4d6b-8535-495edd191a81@github.com> Message-ID: <4Mi7hRJqh9S1mkxpoD0nVfwdmdIl_gHl05BMTLDumy0=.414cfe7f-dfd5-4e5e-81a4-ec07e9f84e9b@github.com> On Sun, 19 Sep 2021 23:39:31 GMT, Jie Fu wrote: >> Do we need a CSR for this change? > >> @DamonFool for reference: https://wiki.openjdk.java.net/display/HotSpot/Hotspot+Command-line+Flags%3A+Kinds%2C+Lifecycle+and+the+CSR+Process > > Got it. > Thanks @dholmes-ora . Thank you @DamonFool and @dholmes-ora ! ------------- PR: https://git.openjdk.java.net/jdk/pull/5573 From mbaesken at openjdk.java.net Mon Sep 20 08:33:56 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Mon, 20 Sep 2021 08:33:56 GMT Subject: Integrated: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms In-Reply-To: References: Message-ID: On Thu, 16 Sep 2021 07:20:39 GMT, Matthias Baesken wrote: > We have identical have_special_privileges() for Linux/AIX/BSD so the function is a good candidate to be moved to os_posix. > > Thanks, Matthias This pull request has now been integrated. Changeset: dc7f452a Author: Matthias Baesken URL: https://git.openjdk.java.net/jdk/commit/dc7f452acbe3afa5aa6e31d316bd5e669c86d6f6 Stats: 45 lines in 4 files changed: 6 ins; 39 del; 0 mod 8273815: move have_special_privileges to os_posix for POSIX platforms Reviewed-by: mdoerr, stuefe, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5540 From stuefe at openjdk.java.net Mon Sep 20 08:49:54 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Mon, 20 Sep 2021 08:49:54 GMT Subject: Integrated: JDK-8273959: Some metaspace diagnostic switches should be develop In-Reply-To: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> References: <2uhO8ByuRBRfNyvhqVmKaEwDnz7j4q4kwBmIyf3fNYc=.8ecd09a9-d505-4bc3-8593-836e1bdf5504@github.com> Message-ID: On Sat, 18 Sep 2021 08:37:38 GMT, Thomas Stuefe wrote: > May I have reviews please for this fix. > > The switches `MetaspaceHandleDeallocations` and `MetaspaceGuardAllocations` control debug-only features and consequently should be develop instead. > > Unnecessary usage of -XX:+UnlockDiagnosticVMOptions is removed (in two cases unrelated to the changed switches). This pull request has now been integrated. Changeset: d2388b7a Author: Thomas Stuefe URL: https://git.openjdk.java.net/jdk/commit/d2388b7a0f4bfb55ea0d5648175e3253f30a4302 Stats: 5 lines in 2 files changed: 0 ins; 0 del; 5 mod 8273959: Some metaspace diagnostic switches should be develop Reviewed-by: dholmes, jiefu ------------- PR: https://git.openjdk.java.net/jdk/pull/5573 From hseigel at openjdk.java.net Mon Sep 20 12:49:55 2021 From: hseigel at openjdk.java.net (Harold Seigel) Date: Mon, 20 Sep 2021 12:49:55 GMT Subject: RFR: JDK-8267163: Rename anonymous loader tests to hidden loader tests In-Reply-To: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> References: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> Message-ID: <8beyLqeoJtvlEd0nqumHG4EEHlRvDc1w6DmcKA7L3xo=.f4e13bd3-35c9-45ad-a96c-04f825b4d9c0@github.com> On Sat, 18 Sep 2021 00:16:08 GMT, Mikhailo Seledtsov wrote: > Please review this simple change that renames vm/mlvm tests and test package name from anonymous to hidden. > Testing: > Ran open/test/hotspot/jtreg/vmTestbase/vm/mlvm on MacOS-x64: PASS > Running open/test/hotspot/jtreg/vmTestbase/vm/mlvm on multiple platforms: in progress ... The changes look good. Thanks for doing this. Harold ------------- Marked as reviewed by hseigel (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5570 From mbaesken at openjdk.java.net Mon Sep 20 13:49:37 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Mon, 20 Sep 2021 13:49:37 GMT Subject: RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms Message-ID: There are a couple of time related functions in os_ for Linux, BSD+Mac and AIX that are pretty similar (or identical) across the platforms and can be centralized in os_posix . While doing so, I noticed that os::supports_vtime() returns always true , on Posix and also on Windows, so we might remove it completely if this prefered ? Best regards , Matthias ------------- Commit messages: - JDK-8273979 Changes: https://git.openjdk.java.net/jdk/pull/5582/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5582&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273979 Stats: 255 lines in 4 files changed: 65 ins; 187 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/5582.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5582/head:pull/5582 PR: https://git.openjdk.java.net/jdk/pull/5582 From minqi at openjdk.java.net Mon Sep 20 16:08:20 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Mon, 20 Sep 2021 16:08:20 GMT Subject: RFR: 8273152: Store base archive path in CDSFileMapHeaderBase Message-ID: Store base archive path offset in CDSFileMapHeaderBase (which should be invariant in evolving versions) so we can read the base archive name reliably from dynamic archive even with variant header sizes over versions. tests: tier1-4 Thanks Yumin ------------- Commit messages: - 8273152: Store base archive path in CDSFileMapHeaderBase Changes: https://git.openjdk.java.net/jdk/pull/5584/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5584&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273152 Stats: 48 lines in 7 files changed: 27 ins; 4 del; 17 mod Patch: https://git.openjdk.java.net/jdk/pull/5584.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5584/head:pull/5584 PR: https://git.openjdk.java.net/jdk/pull/5584 From ccheung at openjdk.java.net Mon Sep 20 16:56:56 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Mon, 20 Sep 2021 16:56:56 GMT Subject: RFR: 8273505: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java#default-cl crashed with SIGSEGV in MetaspaceShared::link_shared_classes In-Reply-To: References: Message-ID: On Fri, 17 Sep 2021 18:50:49 GMT, Ioi Lam wrote: >> Please review this small patch for keeping the class loader, which is the holder of the `ClassLoaderData`, alive during class linking within `MetaspaceShared::link_shared_classes()`. Prior to this fix, the `ClassLoaderData::inc_keep_alive()` was used in an attempt to keep the `ClassLoaderData` alive but that was for hidden classes only. >> >> Testing: tiers 1 - 4. > > LGTM Thanks @iklam, @yminqi for the review. ------------- PR: https://git.openjdk.java.net/jdk/pull/5566 From ccheung at openjdk.java.net Mon Sep 20 16:59:59 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Mon, 20 Sep 2021 16:59:59 GMT Subject: Integrated: 8273505: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java#default-cl crashed with SIGSEGV in MetaspaceShared::link_shared_classes In-Reply-To: References: Message-ID: On Fri, 17 Sep 2021 17:56:44 GMT, Calvin Cheung wrote: > Please review this small patch for keeping the class loader, which is the holder of the `ClassLoaderData`, alive during class linking within `MetaspaceShared::link_shared_classes()`. Prior to this fix, the `ClassLoaderData::inc_keep_alive()` was used in an attempt to keep the `ClassLoaderData` alive but that was for hidden classes only. > > Testing: tiers 1 - 4. This pull request has now been integrated. Changeset: a67f0f9d Author: Calvin Cheung URL: https://git.openjdk.java.net/jdk/commit/a67f0f9dc04200c22db05e277346f24d31306b53 Stats: 15 lines in 2 files changed: 5 ins; 7 del; 3 mod 8273505: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java#default-cl crashed with SIGSEGV in MetaspaceShared::link_shared_classes Reviewed-by: iklam, minqi ------------- PR: https://git.openjdk.java.net/jdk/pull/5566 From iklam at openjdk.java.net Mon Sep 20 17:25:54 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Mon, 20 Sep 2021 17:25:54 GMT Subject: RFR: 8273152: Store base archive path in CDSFileMapHeaderBase In-Reply-To: References: Message-ID: On Mon, 20 Sep 2021 15:58:54 GMT, Yumin Qi wrote: > Store base archive path offset in CDSFileMapHeaderBase (which should be invariant in evolving versions) so we can read the base archive name reliably from dynamic archive even with variant header sizes over versions. > > tests: tier1-4 > > Thanks > Yumin Changes requested by iklam (Reviewer). src/hotspot/share/include/cds.h line 67: > 65: int _crc; // header crc checksum > 66: int _version; // must be CURRENT_CDS_ARCHIVE_VERSION > 67: int _base_archive_path_offset; // This field is present with (_version >= 12). It's declaration `CURRENT_CDS_ARCHIVE_VERSION` in this file should also be changed to 12. Typo: `It's declaration` -> `Its declaration` For safety, I think we need an extra field, and also `change _base_archive_path_offse` to unsigned: int _version; + unsigned int _header_size; // total size of the header, in bytes ! unsigned int _base_archive_path_offset; ``` We need new test cases for safety checks: 1. _header_size is larger than the size of the archive file. 2. _base_archive_path_offset points is not zero for static archive. 3. For dynamic archive: _base_archive_path_offset points beyond _header_size 4. For dynamic archive: `(((char*)this) + _base_archive_path_offset)` does not point to a zero-terminated string. I.e., there is no zero byte between `(((char*)this) + _base_archive_path_offset)` and the end of the header. Also, we should add something like this in the very beginning of the structure. E.g., we don't want someone to add a field in the middle of them. // The declaration of the following 5 fields must never be changed // in any future versions of HotSpot ------------- PR: https://git.openjdk.java.net/jdk/pull/5584 From mseledtsov at openjdk.java.net Mon Sep 20 17:38:22 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Mon, 20 Sep 2021 17:38:22 GMT Subject: RFR: JDK-8267163: Rename anonymous loader tests to hidden loader tests [v2] In-Reply-To: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> References: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> Message-ID: > Please review this simple change that renames vm/mlvm tests and test package name from anonymous to hidden. > Testing: > Ran open/test/hotspot/jtreg/vmTestbase/vm/mlvm on MacOS-x64: PASS > Running open/test/hotspot/jtreg/vmTestbase/vm/mlvm on multiple platforms: in progress ... Mikhailo Seledtsov has updated the pull request incrementally with one additional commit since the last revision: Updated problem list for Xcomp ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5570/files - new: https://git.openjdk.java.net/jdk/pull/5570/files/959604ef..de437bc2 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5570&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5570&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5570.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5570/head:pull/5570 PR: https://git.openjdk.java.net/jdk/pull/5570 From rschmelter at openjdk.java.net Mon Sep 20 17:50:33 2021 From: rschmelter at openjdk.java.net (Ralf Schmelter) Date: Mon, 20 Sep 2021 17:50:33 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v37] In-Reply-To: References: Message-ID: On Thu, 16 Sep 2021 09:35:20 GMT, Lin Zang wrote: >> 8252842: Extend jmap to support parallel heap dump > > Lin Zang has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. Looks good to me. ------------- Marked as reviewed by rschmelter (Committer). PR: https://git.openjdk.java.net/jdk/pull/2261 From mseledtsov at openjdk.java.net Mon Sep 20 19:07:54 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Mon, 20 Sep 2021 19:07:54 GMT Subject: RFR: JDK-8267163: Rename anonymous loader tests to hidden loader tests [v2] In-Reply-To: References: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> Message-ID: On Mon, 20 Sep 2021 17:38:22 GMT, Mikhailo Seledtsov wrote: >> Please review this simple change that renames vm/mlvm tests and test package name from anonymous to hidden. >> Testing: >> Ran open/test/hotspot/jtreg/vmTestbase/vm/mlvm on MacOS-x64: PASS >> Running open/test/hotspot/jtreg/vmTestbase/vm/mlvm on multiple platforms: in progress ... > > Mikhailo Seledtsov has updated the pull request incrementally with one additional commit since the last revision: > > Updated problem list for Xcomp I discovered that I had to update ProblemList-Xcomp, it is a trivial renaming for problem listed test. David, Harold, thank you for review. All testing passed. ------------- PR: https://git.openjdk.java.net/jdk/pull/5570 From mseledtsov at openjdk.java.net Mon Sep 20 19:07:56 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Mon, 20 Sep 2021 19:07:56 GMT Subject: Integrated: JDK-8267163: Rename anonymous loader tests to hidden loader tests In-Reply-To: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> References: <7OyLeC0tOsfe8jfrUZTAScfgb06RIBgda9VE2mG1JZ4=.4efcda8d-c8b6-4b91-8942-a70f72789ebb@github.com> Message-ID: On Sat, 18 Sep 2021 00:16:08 GMT, Mikhailo Seledtsov wrote: > Please review this simple change that renames vm/mlvm tests and test package name from anonymous to hidden. > Testing: > Ran open/test/hotspot/jtreg/vmTestbase/vm/mlvm on MacOS-x64: PASS > Running open/test/hotspot/jtreg/vmTestbase/vm/mlvm on multiple platforms: in progress ... This pull request has now been integrated. Changeset: 5c21c004 Author: Mikhailo Seledtsov URL: https://git.openjdk.java.net/jdk/commit/5c21c0044104b52fcaf3f3a830ea6e219d504ada Stats: 1269 lines in 22 files changed: 631 ins; 631 del; 7 mod 8267163: Rename anonymous loader tests to hidden loader tests Reviewed-by: dholmes, hseigel ------------- PR: https://git.openjdk.java.net/jdk/pull/5570 From coleenp at openjdk.java.net Mon Sep 20 22:07:53 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Mon, 20 Sep 2021 22:07:53 GMT Subject: RFR: JDK-8273783: Simplify Metaspace arena guard handling [v3] In-Reply-To: <1-ZK_6AeHRPRDulufbCH6M8ggts3k4kEu4te18suRCE=.c43dcec2-fbc2-4b62-982b-841df699f1ac@github.com> References: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> <1-ZK_6AeHRPRDulufbCH6M8ggts3k4kEu4te18suRCE=.c43dcec2-fbc2-4b62-982b-841df699f1ac@github.com> Message-ID: <_Vx6Nsv48PuAsla06UDQvuA3AopQ_o4T4nDQoIhXkq0=.c29e56bc-98fa-4fff-a66a-c19d6e14d7ab@github.com> On Sat, 18 Sep 2021 05:36:28 GMT, Thomas Stuefe wrote: >> Hi, >> >> may I please have reviews for this patch. >> >> This simplifies metaspace arena guard handling and reduces the complexity guard mode brings to metaspace and its tests. It makes future modifications easier (esp. wrt Lilliput). >> >> ---- >> >> Metaspace has a guard mode which I added as part of JEP 387. It means that metaspace allocations are bracketed by canaries which, if broken, indicate a buffer overrun in metaspace. It can be switched on and off using -XX:+MetaspaceGuardAllocations, is by default off, and a debug-only feature. >> >> I was always a bit unhappy with the implementation though since it seemed too complex and one needed a bit of lateral thinking when looking at arenas. This is because guard prefixes change block size, cause problems with deallocations, require thinking about user pointer alignment etc. >> >> When investigating how to compress compressed class pointers beyond 32-bit for Lilliput, working around all that special handling became too complicated and therefore I'd like a simpler solution. >> >> The new mechanism uses the fact that Metaspace is an arena allocator and we therefore know that (almost) all subsequent allocations are adjacent to each other in memory. Therefore, instead of adding guards as prefixes/suffixes with each allocation, we can just allocate the guard block as a separate block after each user allocation, as if the guard were just another user allocation. >> >> The result is exactly the same as before: all real allocations are separated in memory by a guard. But to most of the metaspace, these guard blocks are just normal allocations. A lot of special handling can be removed. And we don't have to disable deallocation handling in guard mode. >> >> The guard blocks are chained together via a simple pointer list and verifying them just means walking that list and examining the eyecatcher. Note that the guard has two eyecatchers, bracketing the next pointer between them - that way we don't have to do a sanity check on the pointer since an overwriter would likely have overwritten one of the eyecatchers before corrupting the pointer. >> >> Small caveats: >> - the first block in a chunk has no leading fence >> - the last block in a chunk *may* have no trailing fence >> - the guard now costs 24 bytes, up from 16 before. >> >> Note that all these caveats could be easily solved with a bit more intricate bit fiddling. However, I opted for simplicity here. Guard mode is only activated on demand, if one suspects a problem, and I think it works good enough this way. >> >> Tests: >> - Nightlies at SAP >> - manual tests on x64 and x86 with and without guards >> - manual gtests >> - manual metaspace jtreg tests >> >> Thanks, Thomas > > Thomas Stuefe 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 three additional commits since the last revision: > > - Merge > - Reduce diff and improve comments > - JDK-8273783-Simplify-metaspace-arena-guard-handling This looks good, and much simpler! ------------- Marked as reviewed by coleenp (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5518 From lzang at openjdk.java.net Tue Sep 21 02:10:57 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Tue, 21 Sep 2021 02:10:57 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: On Wed, 8 Sep 2021 05:02:18 GMT, Ralf Schmelter wrote: >> Lin Zang has updated the pull request incrementally with one additional commit since the last revision: >> >> fix build error > > I will start reviewing this today. Thanks @schmelter-sap and @plummercj for your help review and approve this PR! Since this is a non-trivial change, I would like to wait for 2 days before integrate it in case more comments from others. ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From stuefe at openjdk.java.net Tue Sep 21 04:39:50 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Tue, 21 Sep 2021 04:39:50 GMT Subject: RFR: JDK-8273783: Simplify Metaspace arena guard handling [v3] In-Reply-To: <_Vx6Nsv48PuAsla06UDQvuA3AopQ_o4T4nDQoIhXkq0=.c29e56bc-98fa-4fff-a66a-c19d6e14d7ab@github.com> References: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> <1-ZK_6AeHRPRDulufbCH6M8ggts3k4kEu4te18suRCE=.c43dcec2-fbc2-4b62-982b-841df699f1ac@github.com> <_Vx6Nsv48PuAsla06UDQvuA3AopQ_o4T4nDQoIhXkq0=.c29e56bc-98fa-4fff-a66a-c19d6e14d7ab@github.com> Message-ID: On Mon, 20 Sep 2021 22:04:44 GMT, Coleen Phillimore wrote: > This looks good, and much simpler! Thank you Coleen! ------------- PR: https://git.openjdk.java.net/jdk/pull/5518 From dholmes at openjdk.java.net Tue Sep 21 06:18:56 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Tue, 21 Sep 2021 06:18:56 GMT Subject: RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms In-Reply-To: References: Message-ID: On Mon, 20 Sep 2021 13:16:42 GMT, Matthias Baesken wrote: > There are a couple of time related functions in os_ for Linux, BSD+Mac and AIX that are pretty similar (or identical) across the platforms and can be centralized in os_posix . > While doing so, I noticed that os::supports_vtime() returns always true , on Posix and also on Windows, so we might remove it completely if this prefered ? > > Best regards , Matthias Hi Matthias, Generally this refactoring looks good, though I have a request to restore some of the code - see comments below. Also could you clarify where functions were only "pretty similar" rather than identical as we don't want to introduce subtle incompatibilities. I think supports_vtime() could probably be removed in a separate RFE. Thanks, David src/hotspot/os/aix/os_aix.cpp line 997: > 995: } > 996: > 997: void os::javaTimeNanos_info(jvmtiTimerInfo *info_ptr) { Please restore this. As has been discussed in previous refactorings in this code if there is a platform specific definition of javaTimeNanos then we should keep the platform specific definition of javaTimeNanos_info, even if it happens to be the same as on other platforms. Otherwise if the javaTimeNanos code were changed one would not realise they also may have to change javaTimenanos_info. src/hotspot/os/bsd/os_bsd.cpp line 808: > 806: } > 807: > 808: void os::javaTimeNanos_info(jvmtiTimerInfo *info_ptr) { Please restore as per previous comment. src/hotspot/os/posix/os_posix.cpp line 98: > 96: #else > 97: static int clock_tics_per_sec = 100; > 98: #endif Can't we just defer the conditional initialization to the init() function where we already have to conditionally initialise. ------------- Changes requested by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5582 From lucy at openjdk.java.net Tue Sep 21 06:24:05 2021 From: lucy at openjdk.java.net (Lutz Schmidt) Date: Tue, 21 Sep 2021 06:24:05 GMT Subject: RFR: JDK-8273783: Simplify Metaspace arena guard handling [v3] In-Reply-To: <1-ZK_6AeHRPRDulufbCH6M8ggts3k4kEu4te18suRCE=.c43dcec2-fbc2-4b62-982b-841df699f1ac@github.com> References: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> <1-ZK_6AeHRPRDulufbCH6M8ggts3k4kEu4te18suRCE=.c43dcec2-fbc2-4b62-982b-841df699f1ac@github.com> Message-ID: On Sat, 18 Sep 2021 05:36:28 GMT, Thomas Stuefe wrote: >> Hi, >> >> may I please have reviews for this patch. >> >> This simplifies metaspace arena guard handling and reduces the complexity guard mode brings to metaspace and its tests. It makes future modifications easier (esp. wrt Lilliput). >> >> ---- >> >> Metaspace has a guard mode which I added as part of JEP 387. It means that metaspace allocations are bracketed by canaries which, if broken, indicate a buffer overrun in metaspace. It can be switched on and off using -XX:+MetaspaceGuardAllocations, is by default off, and a debug-only feature. >> >> I was always a bit unhappy with the implementation though since it seemed too complex and one needed a bit of lateral thinking when looking at arenas. This is because guard prefixes change block size, cause problems with deallocations, require thinking about user pointer alignment etc. >> >> When investigating how to compress compressed class pointers beyond 32-bit for Lilliput, working around all that special handling became too complicated and therefore I'd like a simpler solution. >> >> The new mechanism uses the fact that Metaspace is an arena allocator and we therefore know that (almost) all subsequent allocations are adjacent to each other in memory. Therefore, instead of adding guards as prefixes/suffixes with each allocation, we can just allocate the guard block as a separate block after each user allocation, as if the guard were just another user allocation. >> >> The result is exactly the same as before: all real allocations are separated in memory by a guard. But to most of the metaspace, these guard blocks are just normal allocations. A lot of special handling can be removed. And we don't have to disable deallocation handling in guard mode. >> >> The guard blocks are chained together via a simple pointer list and verifying them just means walking that list and examining the eyecatcher. Note that the guard has two eyecatchers, bracketing the next pointer between them - that way we don't have to do a sanity check on the pointer since an overwriter would likely have overwritten one of the eyecatchers before corrupting the pointer. >> >> Small caveats: >> - the first block in a chunk has no leading fence >> - the last block in a chunk *may* have no trailing fence >> - the guard now costs 24 bytes, up from 16 before. >> >> Note that all these caveats could be easily solved with a bit more intricate bit fiddling. However, I opted for simplicity here. Guard mode is only activated on demand, if one suspects a problem, and I think it works good enough this way. >> >> Tests: >> - Nightlies at SAP >> - manual tests on x64 and x86 with and without guards >> - manual gtests >> - manual metaspace jtreg tests >> >> Thanks, Thomas > > Thomas Stuefe 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 three additional commits since the last revision: > > - Merge > - Reduce diff and improve comments > - JDK-8273783-Simplify-metaspace-arena-guard-handling LGTM. Much simpler code now. I like the KISS principle (keep it simple and (you select the last word). ------------- Marked as reviewed by lucy (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5518 From stuefe at openjdk.java.net Tue Sep 21 06:26:49 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Tue, 21 Sep 2021 06:26:49 GMT Subject: RFR: JDK-8273783: Simplify Metaspace arena guard handling [v3] In-Reply-To: References: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> <1-ZK_6AeHRPRDulufbCH6M8ggts3k4kEu4te18suRCE=.c43dcec2-fbc2-4b62-982b-841df699f1ac@github.com> Message-ID: On Tue, 21 Sep 2021 06:20:50 GMT, Lutz Schmidt wrote: > LGTM. > Much simpler code now. I like the KISS principle (keep it simple and (you select the last word). :-) Yep, me too. Thanks! ------------- PR: https://git.openjdk.java.net/jdk/pull/5518 From stuefe at openjdk.java.net Tue Sep 21 06:30:48 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Tue, 21 Sep 2021 06:30:48 GMT Subject: Integrated: JDK-8273783: Simplify Metaspace arena guard handling In-Reply-To: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> References: <87_ZxIQa2HZUghdV4zjBxb7zAXuA-89ru6wig2ht0bw=.dc4078de-e03a-4980-9e1c-055687a37841@github.com> Message-ID: On Wed, 15 Sep 2021 06:10:36 GMT, Thomas Stuefe wrote: > Hi, > > may I please have reviews for this patch. > > This simplifies metaspace arena guard handling and reduces the complexity guard mode brings to metaspace and its tests. It makes future modifications easier (esp. wrt Lilliput). > > ---- > > Metaspace has a guard mode which I added as part of JEP 387. It means that metaspace allocations are bracketed by canaries which, if broken, indicate a buffer overrun in metaspace. It can be switched on and off using -XX:+MetaspaceGuardAllocations, is by default off, and a debug-only feature. > > I was always a bit unhappy with the implementation though since it seemed too complex and one needed a bit of lateral thinking when looking at arenas. This is because guard prefixes change block size, cause problems with deallocations, require thinking about user pointer alignment etc. > > When investigating how to compress compressed class pointers beyond 32-bit for Lilliput, working around all that special handling became too complicated and therefore I'd like a simpler solution. > > The new mechanism uses the fact that Metaspace is an arena allocator and we therefore know that (almost) all subsequent allocations are adjacent to each other in memory. Therefore, instead of adding guards as prefixes/suffixes with each allocation, we can just allocate the guard block as a separate block after each user allocation, as if the guard were just another user allocation. > > The result is exactly the same as before: all real allocations are separated in memory by a guard. But to most of the metaspace, these guard blocks are just normal allocations. A lot of special handling can be removed. And we don't have to disable deallocation handling in guard mode. > > The guard blocks are chained together via a simple pointer list and verifying them just means walking that list and examining the eyecatcher. Note that the guard has two eyecatchers, bracketing the next pointer between them - that way we don't have to do a sanity check on the pointer since an overwriter would likely have overwritten one of the eyecatchers before corrupting the pointer. > > Small caveats: > - the first block in a chunk has no leading fence > - the last block in a chunk *may* have no trailing fence > - the guard now costs 24 bytes, up from 16 before. > > Note that all these caveats could be easily solved with a bit more intricate bit fiddling. However, I opted for simplicity here. Guard mode is only activated on demand, if one suspects a problem, and I think it works good enough this way. > > Tests: > - Nightlies at SAP > - manual tests on x64 and x86 with and without guards > - manual gtests > - manual metaspace jtreg tests > > Thanks, Thomas This pull request has now been integrated. Changeset: 6642d2eb Author: Thomas Stuefe URL: https://git.openjdk.java.net/jdk/commit/6642d2eb8b129a2291191647197c5b3333a32989 Stats: 245 lines in 9 files changed: 66 ins; 166 del; 13 mod 8273783: Simplify Metaspace arena guard handling Reviewed-by: coleenp, lucy ------------- PR: https://git.openjdk.java.net/jdk/pull/5518 From mbaesken at openjdk.java.net Tue Sep 21 07:01:20 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Tue, 21 Sep 2021 07:01:20 GMT Subject: RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: > There are a couple of time related functions in os_ for Linux, BSD+Mac and AIX that are pretty similar (or identical) across the platforms and can be centralized in os_posix . > While doing so, I noticed that os::supports_vtime() returns always true , on Posix and also on Windows, so we might remove it completely if this prefered ? > > Best regards , Matthias Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Restored javaTimeNanos_info in os-files, adjusted clock_tics_per_sec init ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5582/files - new: https://git.openjdk.java.net/jdk/pull/5582/files/fb75bd14..91bd15ae Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5582&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5582&range=00-01 Stats: 25 lines in 3 files changed: 18 ins; 6 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5582.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5582/head:pull/5582 PR: https://git.openjdk.java.net/jdk/pull/5582 From dholmes at openjdk.java.net Tue Sep 21 07:17:49 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Tue, 21 Sep 2021 07:17:49 GMT Subject: RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: On Tue, 21 Sep 2021 07:01:20 GMT, Matthias Baesken wrote: >> There are a couple of time related functions in os_ for Linux, BSD+Mac and AIX that are pretty similar (or identical) across the platforms and can be centralized in os_posix . >> While doing so, I noticed that os::supports_vtime() returns always true , on Posix and also on Windows, so we might remove it completely if this prefered ? >> >> Best regards , Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Restored javaTimeNanos_info in os-files, adjusted clock_tics_per_sec init Thanks Matthias - updates look good. David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5582 From mbaesken at openjdk.java.net Tue Sep 21 07:46:52 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Tue, 21 Sep 2021 07:46:52 GMT Subject: RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: <0cE3Bo5G0LXQua_U0NaEZP3MTZScuXnaL3kCAB03DzI=.dd762acb-e9c5-4fb5-94c4-0b36c55c6f3a@github.com> On Tue, 21 Sep 2021 07:01:20 GMT, Matthias Baesken wrote: >> There are a couple of time related functions in os_ for Linux, BSD+Mac and AIX that are pretty similar (or identical) across the platforms and can be centralized in os_posix . >> While doing so, I noticed that os::supports_vtime() returns always true , on Posix and also on Windows, so we might remove it completely if this prefered ? >> >> Best regards , Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Restored javaTimeNanos_info in os-files, adjusted clock_tics_per_sec init Hi David, I brought back os::javaTimeNanos_info following your suggestion and adjusted the initialization of 'clock_tics_per_sec ' in os_posix. >Also could you clarify where functions were only "pretty similar" rather than identical as we don't want to introduce subtle incompatibilities Sure, went through them and this is what I found os::elapsedTime() identical except comment os::elapsed_counter() identical os::elapsed_frequency() identical os::supports_vtime() identical os::getTimesSecs identical os::local_time_string identical os::localtime_pd identical >I think supports_vtime() could probably be removed in a separate RFE. OK, I opened https://bugs.openjdk.java.net/browse/JDK-8274051 . ------------- PR: https://git.openjdk.java.net/jdk/pull/5582 From rehn at openjdk.java.net Tue Sep 21 15:47:50 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Tue, 21 Sep 2021 15:47:50 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock Message-ID: We should not do any processing in SM::should_process(). The query is used to determine if we need to process safepoint/handshakes and with this change StackWaterMark. When locking a Mutex which may be acquired in such processing, we must release that Mutex before we can start processing, otherwise we can deadlock. This change adds a method to determine if StackWaterMarkSet::on_safepoint() will do any processing. In that case there are poll is armed, we do not allow suspend handshakes and there is no safepoint and no non-suspend handshakes, we still return true if StackWaterMarkSet needs processing. Thus the code querying should release any such Mutex and call process SM::process_if_requested(). The cross_modify_fence() do not have any such state, so we still need to emit that before returning false if poll is armed. Passes t1-t4 and local stressing. ------------- Commit messages: - Removed string dedup test from problem list - Check SWS for processing Changes: https://git.openjdk.java.net/jdk/pull/5613/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5613&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273695 Stats: 48 lines in 5 files changed: 26 ins; 21 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5613.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5613/head:pull/5613 PR: https://git.openjdk.java.net/jdk/pull/5613 From dcubed at openjdk.java.net Tue Sep 21 16:07:36 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Tue, 21 Sep 2021 16:07:36 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: References: Message-ID: <03Fvclcroars49mbVw2oyWttblbyG3VeL68wAlkSdDU=.6f624429-5ae8-4574-bfc6-f14b4b70717f@github.com> On Tue, 21 Sep 2021 13:17:43 GMT, Robbin Ehn wrote: > We should not do any processing in SM::should_process(). > The query is used to determine if we need to process safepoint/handshakes and with this change StackWaterMark. > When locking a Mutex which may be acquired in such processing, we must release that Mutex before we can start processing, otherwise we can deadlock. > > This change adds a method to determine if StackWaterMarkSet::on_safepoint() will do any processing. > In that case there are poll is armed, we do not allow suspend handshakes and there is no safepoint and no non-suspend handshakes, we still return true if StackWaterMarkSet needs processing. > Thus the code querying should release any such Mutex and call process SM::process_if_requested(). > > The cross_modify_fence() do not have any such state, so we still need to emit that before returning false if poll is armed. > > Passes t1-t4 and local stressing. @robehn - There are a couple of other bugs that are considered duplicates of this bug. Some of those track failures in Tier8 so it would be a good idea to do testing up through Tier8. ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From dcubed at openjdk.java.net Tue Sep 21 16:28:34 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Tue, 21 Sep 2021 16:28:34 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: References: Message-ID: On Tue, 21 Sep 2021 13:17:43 GMT, Robbin Ehn wrote: > We should not do any processing in SM::should_process(). > The query is used to determine if we need to process safepoint/handshakes and with this change StackWaterMark. > When locking a Mutex which may be acquired in such processing, we must release that Mutex before we can start processing, otherwise we can deadlock. > > This change adds a method to determine if StackWaterMarkSet::on_safepoint() will do any processing. > In that case there are poll is armed, we do not allow suspend handshakes and there is no safepoint and no non-suspend handshakes, we still return true if StackWaterMarkSet needs processing. > Thus the code querying should release any such Mutex and call process SM::process_if_requested(). > > The cross_modify_fence() do not have any such state, so we still need to emit that before returning false if poll is armed. > > Passes t1-t4 and local stressing. Thumbs up. Most of my comments are nits. I have one question about a possible missing update_poll_values(thread) call before cross_modify_fence(). src/hotspot/share/runtime/safepointMechanism.inline.hpp line 75: > 73: if (global_poll() || // Safepoint > 74: thread->handshake_state()->has_a_non_suspend_operation() || // Non-suspend handshake > 75: !StackWatermarkSet::processing_started(thread)) { // StackWater processing is not started Perhaps: s/StackWater/StackWatermark/ src/hotspot/share/runtime/safepointMechanism.inline.hpp line 81: > 79: // 1: A suspend handshake targets the JavaThread. > 80: // 2: A safepoint takes place. > 81: // 3: The JavaThread wakes-up from blocked and do not allow suspend. typo: s/do not/does not/ src/hotspot/share/runtime/safepointMechanism.inline.hpp line 83: > 81: // 3: The JavaThread wakes-up from blocked and do not allow suspend. > 82: // We are now about to avoid processing and thus no cross modify fence will be executed. > 83: // Therefore we executed it here. typo: s/executed/execute/ src/hotspot/share/runtime/stackWatermarkSet.hpp line 82: > 80: static void start_processing(JavaThread* jt, StackWatermarkKind kind); > 81: > 82: // Returns true if all StackWaters have been started. Perhaps: s/StackWaters/StackWatermarks/ ------------- Marked as reviewed by dcubed (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5613 From dcubed at openjdk.java.net Tue Sep 21 16:28:35 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Tue, 21 Sep 2021 16:28:35 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: References: Message-ID: On Tue, 21 Sep 2021 16:15:58 GMT, Daniel D. Daugherty wrote: >> We should not do any processing in SM::should_process(). >> The query is used to determine if we need to process safepoint/handshakes and with this change StackWaterMark. >> When locking a Mutex which may be acquired in such processing, we must release that Mutex before we can start processing, otherwise we can deadlock. >> >> This change adds a method to determine if StackWaterMarkSet::on_safepoint() will do any processing. >> In that case there are poll is armed, we do not allow suspend handshakes and there is no safepoint and no non-suspend handshakes, we still return true if StackWaterMarkSet needs processing. >> Thus the code querying should release any such Mutex and call process SM::process_if_requested(). >> >> The cross_modify_fence() do not have any such state, so we still need to emit that before returning false if poll is armed. >> >> Passes t1-t4 and local stressing. > > src/hotspot/share/runtime/safepointMechanism.inline.hpp line 83: > >> 81: // 3: The JavaThread wakes-up from blocked and do not allow suspend. >> 82: // We are now about to avoid processing and thus no cross modify fence will be executed. >> 83: // Therefore we executed it here. > > typo: s/executed/execute/ Also, do you need a call to `update_poll_values(thread)` here before the `cross_modify_fence()` call? ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From rehn at openjdk.java.net Tue Sep 21 19:49:14 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Tue, 21 Sep 2021 19:49:14 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: References: Message-ID: On Tue, 21 Sep 2021 16:15:07 GMT, Daniel D. Daugherty wrote: >> We should not do any processing in SM::should_process(). >> The query is used to determine if we need to process safepoint/handshakes and with this change StackWaterMark. >> When locking a Mutex which may be acquired in such processing, we must release that Mutex before we can start processing, otherwise we can deadlock. >> >> This change adds a method to determine if StackWaterMarkSet::on_safepoint() will do any processing. >> In that case there are poll is armed, we do not allow suspend handshakes and there is no safepoint and no non-suspend handshakes, we still return true if StackWaterMarkSet needs processing. >> Thus the code querying should release any such Mutex and call process SM::process_if_requested(). >> >> The cross_modify_fence() do not have any such state, so we still need to emit that before returning false if poll is armed. >> >> Passes t1-t4 and local stressing. > > src/hotspot/share/runtime/safepointMechanism.inline.hpp line 81: > >> 79: // 1: A suspend handshake targets the JavaThread. >> 80: // 2: A safepoint takes place. >> 81: // 3: The JavaThread wakes-up from blocked and do not allow suspend. > > typo: s/do not/does not/ Fixed ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From rehn at openjdk.java.net Tue Sep 21 19:49:18 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Tue, 21 Sep 2021 19:49:18 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: References: Message-ID: On Tue, 21 Sep 2021 16:21:20 GMT, Daniel D. Daugherty wrote: >> src/hotspot/share/runtime/safepointMechanism.inline.hpp line 83: >> >>> 81: // 3: The JavaThread wakes-up from blocked and do not allow suspend. >>> 82: // We are now about to avoid processing and thus no cross modify fence will be executed. >>> 83: // Therefore we executed it here. >> >> typo: s/executed/execute/ > > Also, do you need a call to `update_poll_values(thread)` here > before the `cross_modify_fence()` call? Fixed. No, we do not need to update it. But maybe we want to, to avoid hitting poll-sites. The reason not to do it is that it is preferable to have the plain query should_process() not having side-effects. I need to think about that, thanks for bringing that up. ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From dcubed at openjdk.java.net Tue Sep 21 19:55:45 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Tue, 21 Sep 2021 19:55:45 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: References: Message-ID: <8PDKme6-tXXJCJlz17hBTWtjYq7hCmdst8A3ba4sTws=.65a5b555-4664-4226-951e-b6efbcd60992@github.com> On Tue, 21 Sep 2021 19:38:32 GMT, Robbin Ehn wrote: >> Also, do you need a call to `update_poll_values(thread)` here >> before the `cross_modify_fence()` call? > > Fixed. > > No, we do not need to update it. > But maybe we want to, to avoid hitting poll-sites. > The reason not to do it is that it is preferable to have the plain query should_process() not having side-effects. > > I need to think about that, thanks for bringing that up. Hmmm... good point about `should_process()` not having side effects. ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From rehn at openjdk.java.net Tue Sep 21 20:07:57 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Tue, 21 Sep 2021 20:07:57 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: <8PDKme6-tXXJCJlz17hBTWtjYq7hCmdst8A3ba4sTws=.65a5b555-4664-4226-951e-b6efbcd60992@github.com> References: <8PDKme6-tXXJCJlz17hBTWtjYq7hCmdst8A3ba4sTws=.65a5b555-4664-4226-951e-b6efbcd60992@github.com> Message-ID: <71vqqoh1qLZkZXCAiRr_qOvxLzPWbaKAVsuS1gzOfu4=.a0716640-8052-47cb-8e11-cd056abce9e0@github.com> On Tue, 21 Sep 2021 19:52:43 GMT, Daniel D. Daugherty wrote: >> Fixed. >> >> No, we do not need to update it. >> But maybe we want to, to avoid hitting poll-sites. >> The reason not to do it is that it is preferable to have the plain query should_process() not having side-effects. >> >> I need to think about that, thanks for bringing that up. > > Hmmm... good point about `should_process()` not having side effects. This case could notice the update: bool q1 = should_process(jt, true); bool q_that_updates_poll_value = should_process(jt, false); bool q2 = should_process(jt, true); So q2 can be false while q1 is true. I do not think this is a problem, but worth considering the implications. I think we should update the poll value even if I do not like it. (running some tests) ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From dcubed at openjdk.java.net Tue Sep 21 22:29:59 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Tue, 21 Sep 2021 22:29:59 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: <71vqqoh1qLZkZXCAiRr_qOvxLzPWbaKAVsuS1gzOfu4=.a0716640-8052-47cb-8e11-cd056abce9e0@github.com> References: <8PDKme6-tXXJCJlz17hBTWtjYq7hCmdst8A3ba4sTws=.65a5b555-4664-4226-951e-b6efbcd60992@github.com> <71vqqoh1qLZkZXCAiRr_qOvxLzPWbaKAVsuS1gzOfu4=.a0716640-8052-47cb-8e11-cd056abce9e0@github.com> Message-ID: On Tue, 21 Sep 2021 20:04:03 GMT, Robbin Ehn wrote: >> Hmmm... good point about `should_process()` not having side effects. > > This case could notice the update: > bool q1 = should_process(jt, true); > bool q_that_updates_poll_value = should_process(jt, false); > bool q2 = should_process(jt, true); > > So q2 can be false while q1 is true. I do not think this is a problem, but worth considering the implications. > > I think we should update the poll value even if I do not like it. (running some tests) If you decide to add the call to `update_poll_values(thread)`, then please add a comment with a short explanation about the reason for this "side effect". ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From dholmes at openjdk.java.net Wed Sep 22 01:38:01 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 22 Sep 2021 01:38:01 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: References: Message-ID: On Tue, 21 Sep 2021 13:17:43 GMT, Robbin Ehn wrote: > We should not do any processing in SM::should_process(). > The query is used to determine if we need to process safepoint/handshakes and with this change StackWaterMark. > When locking a Mutex which may be acquired in such processing, we must release that Mutex before we can start processing, otherwise we can deadlock. > > This change adds a method to determine if StackWaterMarkSet::on_safepoint() will do any processing. > In that case there are poll is armed, we do not allow suspend handshakes and there is no safepoint and no non-suspend handshakes, we still return true if StackWaterMarkSet needs processing. > Thus the code querying should release any such Mutex and call process SM::process_if_requested(). > > The cross_modify_fence() do not have any such state, so we still need to emit that before returning false if poll is armed. > > Passes t1-t4 and local stressing. Hi Robbin, Not knowing anything about stackwatermarks and their use I can't really review this in any detail. Avoiding the call to `StackWatermarkSet::on_safepoint` so that `should_process` is just a query does seem like a reasonable thing to do to avoid the problem. That said I'm more generally concerned that something hooked into the lowest-levels of the safepoint/handshake code can itself have a dependency on execution of a safepoint operation! Cheers, David ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From dholmes at openjdk.java.net Wed Sep 22 01:38:02 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 22 Sep 2021 01:38:02 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: References: Message-ID: <3Y9Q3p2i8EYpayg4HU2SUe79UIy7LvGObWn8FRGGWss=.10d724c5-ffcd-4666-aaca-3b918ba67419@github.com> On Tue, 21 Sep 2021 19:26:05 GMT, Robbin Ehn wrote: >> src/hotspot/share/runtime/safepointMechanism.inline.hpp line 81: >> >>> 79: // 1: A suspend handshake targets the JavaThread. >>> 80: // 2: A safepoint takes place. >>> 81: // 3: The JavaThread wakes-up from blocked and do not allow suspend. >> >> typo: s/do not/does not/ > > Fixed I don't see the fix? ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From yyang at openjdk.java.net Wed Sep 22 02:23:59 2021 From: yyang at openjdk.java.net (Yi Yang) Date: Wed, 22 Sep 2021 02:23:59 GMT Subject: RFR: 8272114: Unused _last_state in osThread_windows In-Reply-To: References: Message-ID: <4I4zYJxRFIfOJjlwMgz5OIMATAO6lI9D3HdkU_MRUfc=.819b7312-536b-4b91-b882-990c7eb366ed@github.com> On Sat, 18 Sep 2021 08:45:39 GMT, Thomas Stuefe wrote: >> Trivial change to remove unused _last_state in osThread_windows? its getter and setter can be removed as well. > > Good and trivial. Tried to find out the history, but AFAICS its been in there since the beginning of OpenJDK. Thanks @tstuefe and @dholmes-ora for reviews! ------------- PR: https://git.openjdk.java.net/jdk/pull/5572 From yyang at openjdk.java.net Wed Sep 22 02:24:00 2021 From: yyang at openjdk.java.net (Yi Yang) Date: Wed, 22 Sep 2021 02:24:00 GMT Subject: Integrated: 8272114: Unused _last_state in osThread_windows In-Reply-To: References: Message-ID: On Sat, 18 Sep 2021 07:44:11 GMT, Yi Yang wrote: > Trivial change to remove unused _last_state in osThread_windows? its getter and setter can be removed as well. This pull request has now been integrated. Changeset: 11cddd32 Author: Yi Yang URL: https://git.openjdk.java.net/jdk/commit/11cddd3261e2bfaa4f2b9142ce9e275bbc48c72e Stats: 7 lines in 1 file changed: 0 ins; 7 del; 0 mod 8272114: Unused _last_state in osThread_windows Reviewed-by: stuefe, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5572 From dcubed at openjdk.java.net Wed Sep 22 02:46:12 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 22 Sep 2021 02:46:12 GMT Subject: RFR: 8274114: ProblemList serviceability/sa/TestJhsdbJstackMixed.java on linux-aarch64 in -Xcomp mode Message-ID: A trivial fix to ProblemList serviceability/sa/TestJhsdbJstackMixed.java on linux-aarch64 in -Xcomp mode. ------------- Commit messages: - 8274114: ProblemList serviceability/sa/TestJhsdbJstackMixed.java on linux-aarch64 in -Xcomp mode Changes: https://git.openjdk.java.net/jdk/pull/5624/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5624&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274114 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5624.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5624/head:pull/5624 PR: https://git.openjdk.java.net/jdk/pull/5624 From cjplummer at openjdk.java.net Wed Sep 22 02:52:08 2021 From: cjplummer at openjdk.java.net (Chris Plummer) Date: Wed, 22 Sep 2021 02:52:08 GMT Subject: RFR: 8274114: ProblemList serviceability/sa/TestJhsdbJstackMixed.java on linux-aarch64 in -Xcomp mode In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 02:33:41 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList serviceability/sa/TestJhsdbJstackMixed.java on linux-aarch64 in -Xcomp mode. Approved and trivial. ------------- Marked as reviewed by cjplummer (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5624 From dcubed at openjdk.java.net Wed Sep 22 02:52:08 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 22 Sep 2021 02:52:08 GMT Subject: RFR: 8274114: ProblemList serviceability/sa/TestJhsdbJstackMixed.java on linux-aarch64 in -Xcomp mode In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 02:47:47 GMT, Chris Plummer wrote: >> A trivial fix to ProblemList serviceability/sa/TestJhsdbJstackMixed.java on linux-aarch64 in -Xcomp mode. > > Approved and trivial. @plummercj - Thanks for the fast review! ------------- PR: https://git.openjdk.java.net/jdk/pull/5624 From dcubed at openjdk.java.net Wed Sep 22 02:55:57 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 22 Sep 2021 02:55:57 GMT Subject: Integrated: 8274114: ProblemList serviceability/sa/TestJhsdbJstackMixed.java on linux-aarch64 in -Xcomp mode In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 02:33:41 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList serviceability/sa/TestJhsdbJstackMixed.java on linux-aarch64 in -Xcomp mode. This pull request has now been integrated. Changeset: eeaf43b2 Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk/commit/eeaf43b229941f49326ed6d0f37e77f6f0ce5409 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod 8274114: ProblemList serviceability/sa/TestJhsdbJstackMixed.java on linux-aarch64 in -Xcomp mode Reviewed-by: cjplummer ------------- PR: https://git.openjdk.java.net/jdk/pull/5624 From minqi at openjdk.java.net Wed Sep 22 03:51:19 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Wed, 22 Sep 2021 03:51:19 GMT Subject: RFR: 8273152: Store base archive path in CDSFileMapHeaderBase [v2] In-Reply-To: References: Message-ID: <3pwPp_YRC6toOK8w9TQXAGcAEFMxkahlf4Xa24itDRM=.5f53fae0-9bab-4a5a-9583-976a385a5dd1@github.com> > Store base archive path offset in CDSFileMapHeaderBase (which should be invariant in evolving versions) so we can read the base archive name reliably from dynamic archive even with variant header sizes over versions. > > tests: tier1-4 > > Thanks > Yumin Yumin Qi has updated the pull request incrementally with two additional commits since the last revision: - Fixed typo - Moved _header_size from FileMapHeader to CDSFileMapHeaderBase and added tests ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5584/files - new: https://git.openjdk.java.net/jdk/pull/5584/files/2877aa61..d82587fb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5584&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5584&range=00-01 Stats: 145 lines in 8 files changed: 106 ins; 3 del; 36 mod Patch: https://git.openjdk.java.net/jdk/pull/5584.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5584/head:pull/5584 PR: https://git.openjdk.java.net/jdk/pull/5584 From dcubed at openjdk.java.net Wed Sep 22 03:56:25 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 22 Sep 2021 03:56:25 GMT Subject: RFR: 8271514: support JFR use of new ThreadsList::Iterator [v4] In-Reply-To: <8othaRlEaoN9b-F6Jh9Q6nFLjS92sn0Tt4DQurkYbtE=.23d8f574-9fbc-45c2-b216-c96592b97d5a@github.com> References: <8othaRlEaoN9b-F6Jh9Q6nFLjS92sn0Tt4DQurkYbtE=.23d8f574-9fbc-45c2-b216-c96592b97d5a@github.com> Message-ID: > A trivial fix to support JFR use of new ThreadsList::Iterator. > > This fix was tested with Mach5 Tier[1-3]. Daniel D. Daugherty has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: - Merge branch 'master' into JDK-8271514 - Merge branch 'master' into JDK-8271514 - Merge branch 'pull/4948' into JDK-8271514 - Merge branch 'master' into JDK-8271513 - Merge branch 'pull/4948' into JDK-8271514 - Merge branch 'pull/4671' into JDK-8271513 - kbarrett CR - simplify 'ThreadsList::Iterator::operator!=(Iterator i)' - 8271514: support JFR use of new ThreadsList::Iterator - 8271513: support JavaThreadIteratorWithHandle replacement by new ThreadsList::Iterator - 8193559.kbarrett.part1 - Kim's proposed rewrite using newer C++ features. - ... and 3 more: https://git.openjdk.java.net/jdk/compare/cbe57e86...76d44dcb ------------- Changes: https://git.openjdk.java.net/jdk/pull/4949/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4949&range=03 Stats: 39 lines in 2 files changed: 20 ins; 11 del; 8 mod Patch: https://git.openjdk.java.net/jdk/pull/4949.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4949/head:pull/4949 PR: https://git.openjdk.java.net/jdk/pull/4949 From dcubed at openjdk.java.net Wed Sep 22 03:57:21 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 22 Sep 2021 03:57:21 GMT Subject: RFR: 8249004: Reduce ThreadListHandle overhead in relation to direct handshakes [v4] In-Reply-To: <891nGxHdujE6CWxkCW8v9qnKIGBHXPeOxjyIznPorOU=.8e159ff3-d3e3-4706-9c1b-18c675855825@github.com> References: <891nGxHdujE6CWxkCW8v9qnKIGBHXPeOxjyIznPorOU=.8e159ff3-d3e3-4706-9c1b-18c675855825@github.com> Message-ID: > A trivial fix to reduce ThreadListHandle overhead in relation to handshakes. > > This refactoring was tested with Mach5 Tier[1-3]. Daniel D. Daugherty 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 revision: - Merge branch 'master' into JDK-8249004 - Merge branch 'master' into JDK-8249004 - Merge branch 'master' into JDK-8249004 - Merge branch 'master' into JDK-8249004 - 8249004: Reduce ThreadListHandle overhead in relation to direct handshakes ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4677/files - new: https://git.openjdk.java.net/jdk/pull/4677/files/507bcbc1..093ad308 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4677&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4677&range=02-03 Stats: 45360 lines in 1767 files changed: 28469 ins; 9160 del; 7731 mod Patch: https://git.openjdk.java.net/jdk/pull/4677.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4677/head:pull/4677 PR: https://git.openjdk.java.net/jdk/pull/4677 From iklam at openjdk.java.net Wed Sep 22 06:03:23 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 22 Sep 2021 06:03:23 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM Message-ID: Problem: In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM. Fix: Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded. ------------- Commit messages: - 8274033: Some tier-4 CDS EpsilonGC tests throw OOM Changes: https://git.openjdk.java.net/jdk/pull/5626/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5626&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274033 Stats: 20 lines in 3 files changed: 20 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5626.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5626/head:pull/5626 PR: https://git.openjdk.java.net/jdk/pull/5626 From dholmes at openjdk.java.net Wed Sep 22 06:12:57 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 22 Sep 2021 06:12:57 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 05:44:44 GMT, Ioi Lam wrote: > Problem: > > In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM. > > Fix: > > Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded. Hi Ioi, The changes to the test files seem unrelated to the current issue. ?? The group change seems okay but please add a comment. Thanks, David test/hotspot/jtreg/TEST.groups line 402: > 400: runtime/cds/appcds/sharedStrings/SharedStringsBasic.java > 401: > 402: hotspot_cds_epsilongc = \ I don't know why we don't comment groups in this file but please add a comment here that these are low-memory using tests that won't fail (with a reasonable heap size) when run with a fake GC. ------------- Changes requested by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5626 From iklam at openjdk.java.net Wed Sep 22 06:21:24 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 22 Sep 2021 06:21:24 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v2] In-Reply-To: References: Message-ID: > Problem: > > In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM. > > Fix: > > Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded. Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: @dholmes-ora comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5626/files - new: https://git.openjdk.java.net/jdk/pull/5626/files/267ea334..7976fb03 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5626&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5626&range=00-01 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5626.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5626/head:pull/5626 PR: https://git.openjdk.java.net/jdk/pull/5626 From iklam at openjdk.java.net Wed Sep 22 06:21:25 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 22 Sep 2021 06:21:25 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v2] In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 06:10:18 GMT, David Holmes wrote: > The changes to the test files seem unrelated to the current issue. ?? The fix in DynamicArchiveTestBase.java is needed because we were not passing `-XX:+UseEpsilonGC` to dynamicArchive/HelloDynamic.java (even when this file is in the `hotspot_cds_epsilongc` group). > test/hotspot/jtreg/TEST.groups line 402: > >> 400: runtime/cds/appcds/sharedStrings/SharedStringsBasic.java >> 401: >> 402: hotspot_cds_epsilongc = \ > > I don't know why we don't comment groups in this file but please add a comment here that these are low-memory using tests that won't fail (with a reasonable heap size) when run with a fake GC. I added a comment. ------------- PR: https://git.openjdk.java.net/jdk/pull/5626 From dholmes at openjdk.java.net Wed Sep 22 06:40:02 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 22 Sep 2021 06:40:02 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v2] In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 06:21:24 GMT, Ioi Lam wrote: >> Problem: >> >> In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM. >> >> Fix: >> >> Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded. > > Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: > > @dholmes-ora comments test/hotspot/jtreg/TEST.groups line 402: > 400: runtime/cds/appcds/sharedStrings/SharedStringsBasic.java > 401: > 402: # No need to run ever test with EpsilonGC. A small subset will provide enough s/ever/every/ ------------- PR: https://git.openjdk.java.net/jdk/pull/5626 From dholmes at openjdk.java.net Wed Sep 22 06:47:58 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 22 Sep 2021 06:47:58 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v2] In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 06:21:24 GMT, Ioi Lam wrote: >> Problem: >> >> In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM. >> >> Fix: >> >> Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded. > > Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: > > @dholmes-ora comments The fix to DynamicArchiveTestBase.java still seems like an independent fix to a test not directly related to the subject of this issue. If we aren't passing `-XX:+UseEpsilonGC` then presumably we are not passing `-XX:UseXGC` for any X? test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java line 593: > 591: > 592: > 593: public static String[] concat(ArrayList prefix, String... extra) { So you start with an `ArrayList` then convert that to a `String[]` which you pass to a function that then creates a new `ArrayList`, adds all the Strings to it and then converts it to a String[] again! can't help but think there has to be a simpler way to combine an ArrayList with a String[] ?? ------------- PR: https://git.openjdk.java.net/jdk/pull/5626 From lucy at openjdk.java.net Wed Sep 22 07:59:04 2021 From: lucy at openjdk.java.net (Lutz Schmidt) Date: Wed, 22 Sep 2021 07:59:04 GMT Subject: RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: On Tue, 21 Sep 2021 07:01:20 GMT, Matthias Baesken wrote: >> There are a couple of time related functions in os_ for Linux, BSD+Mac and AIX that are pretty similar (or identical) across the platforms and can be centralized in os_posix . >> While doing so, I noticed that os::supports_vtime() returns always true , on Posix and also on Windows, so we might remove it completely if this prefered ? >> >> Best regards , Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Restored javaTimeNanos_info in os-files, adjusted clock_tics_per_sec init Changes requested by lucy (Reviewer). src/hotspot/os/linux/os_linux.cpp line 175: > 173: > 174: static int clock_tics_per_sec = 100; > 175: In os_linux.cpp, clock_tics_per_sec is used for elapsed time calculations as well as for cpu time calculations. In addition, clock_tics_per_sec is set (reinitialised) in os::init(). Are we sure that _SC_CLK_TCK evaluates to 100? If no, do we then potentially calculate wrong elapsed times after moving the code to os_posix? ------------- PR: https://git.openjdk.java.net/jdk/pull/5582 From lucy at openjdk.java.net Wed Sep 22 08:16:55 2021 From: lucy at openjdk.java.net (Lutz Schmidt) Date: Wed, 22 Sep 2021 08:16:55 GMT Subject: RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: On Tue, 21 Sep 2021 07:01:20 GMT, Matthias Baesken wrote: >> There are a couple of time related functions in os_ for Linux, BSD+Mac and AIX that are pretty similar (or identical) across the platforms and can be centralized in os_posix . >> While doing so, I noticed that os::supports_vtime() returns always true , on Posix and also on Windows, so we might remove it completely if this prefered ? >> >> Best regards , Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Restored javaTimeNanos_info in os-files, adjusted clock_tics_per_sec init My previous comment about clock_ticks_per_sec is obsolete. Just saw the initialisation in os::Posix::init(void) now is the same as in os::init(). The static init value is in effect only for the short time until os::init() is invoked. Looks good to me. ------------- Marked as reviewed by lucy (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5582 From mbaesken at openjdk.java.net Wed Sep 22 08:21:11 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Wed, 22 Sep 2021 08:21:11 GMT Subject: RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: <7VYDUetZ8y2DQZ4fBwWUp7apKoWM31kyW9aHsGW_5W4=.b12b7ce0-8c14-4f59-a417-8c3d4da81a11@github.com> On Wed, 22 Sep 2021 08:13:57 GMT, Lutz Schmidt wrote: > My previous comment about clock_ticks_per_sec is obsolete. Just saw the initialisation in os::Posix::init(void) now is the same as in os::init(). The static init value is in effect only for the short time until os::init() is invoked. > Looks good to me. Hi Lutz, thanks for the review . In case of worries about the short time frame between posix and linux init functions, we could introduce 'os::clock_ticks_per_sec()' and move this to os_linux, os_aix os_bsd etc. to have the initialization at one single point. Not sure if this is worth the effort? Best regards, Matthias ------------- PR: https://git.openjdk.java.net/jdk/pull/5582 From lucy at openjdk.java.net Wed Sep 22 08:24:58 2021 From: lucy at openjdk.java.net (Lutz Schmidt) Date: Wed, 22 Sep 2021 08:24:58 GMT Subject: RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms [v2] In-Reply-To: References: Message-ID: <0-kp3LDOoWu1AMXmSv7XgxklQEY4-1rpi2vfXkSJwtE=.fe2899dd-410b-4982-bb4b-af455af5f539@github.com> On Tue, 21 Sep 2021 07:01:20 GMT, Matthias Baesken wrote: >> There are a couple of time related functions in os_ for Linux, BSD+Mac and AIX that are pretty similar (or identical) across the platforms and can be centralized in os_posix . >> While doing so, I noticed that os::supports_vtime() returns always true , on Posix and also on Windows, so we might remove it completely if this prefered ? >> >> Best regards , Matthias > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Restored javaTimeNanos_info in os-files, adjusted clock_tics_per_sec init I would not add this complexity. Just leave it as it is. ------------- PR: https://git.openjdk.java.net/jdk/pull/5582 From rehn at openjdk.java.net Wed Sep 22 11:50:46 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Wed, 22 Sep 2021 11:50:46 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock [v2] In-Reply-To: References: Message-ID: > We should not do any processing in SM::should_process(). > The query is used to determine if we need to process safepoint/handshakes and with this change StackWaterMark. > When locking a Mutex which may be acquired in such processing, we must release that Mutex before we can start processing, otherwise we can deadlock. > > This change adds a method to determine if StackWaterMarkSet::on_safepoint() will do any processing. > In that case there are poll is armed, we do not allow suspend handshakes and there is no safepoint and no non-suspend handshakes, we still return true if StackWaterMarkSet needs processing. > Thus the code querying should release any such Mutex and call process SM::process_if_requested(). > > The cross_modify_fence() do not have any such state, so we still need to emit that before returning false if poll is armed. > > Passes t1-t4 and local stressing. Robbin Ehn 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 revision: - Merge branch 'master' into 8273695-swm-should-proc - Added update poll values and fixed PR comments - Removed string dedup test from problem list - Check SWS for processing ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5613/files - new: https://git.openjdk.java.net/jdk/pull/5613/files/3021d91e..536bb9e8 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5613&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5613&range=00-01 Stats: 8665 lines in 332 files changed: 5982 ins; 999 del; 1684 mod Patch: https://git.openjdk.java.net/jdk/pull/5613.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5613/head:pull/5613 PR: https://git.openjdk.java.net/jdk/pull/5613 From rehn at openjdk.java.net Wed Sep 22 11:50:48 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Wed, 22 Sep 2021 11:50:48 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: <03Fvclcroars49mbVw2oyWttblbyG3VeL68wAlkSdDU=.6f624429-5ae8-4574-bfc6-f14b4b70717f@github.com> References: <03Fvclcroars49mbVw2oyWttblbyG3VeL68wAlkSdDU=.6f624429-5ae8-4574-bfc6-f14b4b70717f@github.com> Message-ID: On Tue, 21 Sep 2021 16:04:19 GMT, Daniel D. Daugherty wrote: > @robehn - There are a couple of other bugs that are considered duplicates > of this bug. Some of those track failures in Tier7 and Tier8 so it would be a > good idea to do testing up through Tier8. I started more testing. ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From ccheung at openjdk.java.net Wed Sep 22 15:06:25 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Wed, 22 Sep 2021 15:06:25 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v2] In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 06:21:24 GMT, Ioi Lam wrote: >> Problem: >> >> In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM. >> >> Fix: >> >> Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded. > > Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: > > @dholmes-ora comments LGTM ------------- Marked as reviewed by ccheung (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5626 From minqi at openjdk.java.net Wed Sep 22 15:50:59 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Wed, 22 Sep 2021 15:50:59 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v2] In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 06:42:04 GMT, David Holmes wrote: >> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: >> >> @dholmes-ora comments > > test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java line 593: > >> 591: >> 592: >> 593: public static String[] concat(ArrayList prefix, String... extra) { > > So you start with an `ArrayList` then convert that to a `String[]` which you pass to a function that then creates a new `ArrayList`, adds all the Strings to it and then converts it to a String[] again! can't help but think there has to be a simpler way to combine an ArrayList with a String[] ?? Could use the prefix, add extra to the list then prefix.toArray to avoid such conversion between ArrayList and array. ------------- PR: https://git.openjdk.java.net/jdk/pull/5626 From dcubed at openjdk.java.net Wed Sep 22 16:49:59 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 22 Sep 2021 16:49:59 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock [v2] In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 11:50:46 GMT, Robbin Ehn wrote: >> We should not do any processing in SM::should_process(). >> The query is used to determine if we need to process safepoint/handshakes and with this change StackWaterMark. >> When locking a Mutex which may be acquired in such processing, we must release that Mutex before we can start processing, otherwise we can deadlock. >> >> This change adds a method to determine if StackWaterMarkSet::on_safepoint() will do any processing. >> In that case there are poll is armed, we do not allow suspend handshakes and there is no safepoint and no non-suspend handshakes, we still return true if StackWaterMarkSet needs processing. >> Thus the code querying should release any such Mutex and call process SM::process_if_requested(). >> >> The cross_modify_fence() do not have any such state, so we still need to emit that before returning false if poll is armed. >> >> Passes t1-t4 and local stressing. > > Robbin Ehn 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 revision: > > - Merge branch 'master' into 8273695-swm-should-proc > - Added update poll values and fixed PR comments > - Removed string dedup test from problem list > - Check SWS for processing Thumbs up. Minor typographical nits. src/hotspot/share/runtime/safepointMechanism.inline.hpp line 79: > 77: } > 78: > 79: // It have boiled down to two possibilities. Please change to: // It has boiled down to two possibilities: src/hotspot/share/runtime/safepointMechanism.inline.hpp line 82: > 80: // 1: We have nothing to process, this just a disarm poll. > 81: // 2: We have a suspend handshake, which cannot be processed. > 82: // We update the poll value in case of a disarm, to reduce false positive. Typo: s/positive/positives/ ------------- Marked as reviewed by dcubed (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5613 From iklam at openjdk.java.net Wed Sep 22 17:04:21 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 22 Sep 2021 17:04:21 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v3] In-Reply-To: References: Message-ID: > Problem: > > In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM. > > Fix: > > Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded. Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: fixed typo; removed fix for handling of CDSUtils::getRuntimePrefix() to be done in a separate bug ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5626/files - new: https://git.openjdk.java.net/jdk/pull/5626/files/7976fb03..806ae762 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5626&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5626&range=01-02 Stats: 10 lines in 3 files changed: 0 ins; 9 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5626.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5626/head:pull/5626 PR: https://git.openjdk.java.net/jdk/pull/5626 From minqi at openjdk.java.net Wed Sep 22 18:12:56 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Wed, 22 Sep 2021 18:12:56 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v3] In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 17:04:21 GMT, Ioi Lam wrote: >> Problem: >> >> In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM. >> >> Fix: >> >> Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded. > > Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: > > fixed typo; removed fix for handling of CDSUtils::getRuntimePrefix() to be done in a separate bug LGTM. ------------- Marked as reviewed by minqi (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5626 From coleenp at openjdk.java.net Wed Sep 22 18:25:02 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Wed, 22 Sep 2021 18:25:02 GMT Subject: RFR: 8249004: Reduce ThreadListHandle overhead in relation to direct handshakes [v4] In-Reply-To: References: <891nGxHdujE6CWxkCW8v9qnKIGBHXPeOxjyIznPorOU=.8e159ff3-d3e3-4706-9c1b-18c675855825@github.com> Message-ID: On Wed, 22 Sep 2021 03:57:21 GMT, Daniel D. Daugherty wrote: >> A trivial fix to reduce ThreadListHandle overhead in relation to handshakes. >> >> This refactoring was tested with Mach5 Tier[1-3]. > > Daniel D. Daugherty 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 revision: > > - Merge branch 'master' into JDK-8249004 > - Merge branch 'master' into JDK-8249004 > - Merge branch 'master' into JDK-8249004 > - Merge branch 'master' into JDK-8249004 > - 8249004: Reduce ThreadListHandle overhead in relation to direct handshakes This looks good. ------------- Marked as reviewed by coleenp (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/4677 From ccheung at openjdk.java.net Wed Sep 22 18:27:56 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Wed, 22 Sep 2021 18:27:56 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v3] In-Reply-To: References: Message-ID: <39bmYnUwFQH_ydvvSIpUNiSu6n-jJPqoVoncAS6u_Zg=.de54f435-398b-47a8-99af-b559772785d1@github.com> On Wed, 22 Sep 2021 17:04:21 GMT, Ioi Lam wrote: >> Problem: >> >> In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM. >> >> Fix: >> >> Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded. > > Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: > > fixed typo; removed fix for handling of CDSUtils::getRuntimePrefix() to be done in a separate bug Marked as reviewed by ccheung (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5626 From dcubed at openjdk.java.net Wed Sep 22 19:08:03 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 22 Sep 2021 19:08:03 GMT Subject: RFR: 8249004: Reduce ThreadListHandle overhead in relation to direct handshakes [v4] In-Reply-To: References: <891nGxHdujE6CWxkCW8v9qnKIGBHXPeOxjyIznPorOU=.8e159ff3-d3e3-4706-9c1b-18c675855825@github.com> Message-ID: On Wed, 22 Sep 2021 18:21:51 GMT, Coleen Phillimore wrote: >> Daniel D. Daugherty 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 revision: >> >> - Merge branch 'master' into JDK-8249004 >> - Merge branch 'master' into JDK-8249004 >> - Merge branch 'master' into JDK-8249004 >> - Merge branch 'master' into JDK-8249004 >> - 8249004: Reduce ThreadListHandle overhead in relation to direct handshakes > > This looks good. @coleenp - Thanks, but... I'm redoing this fix in a different way to address @dholmes-ora comment from above: > I just updated the bug report. This really isn't addressing the reasons the RFE was filed. ------------- PR: https://git.openjdk.java.net/jdk/pull/4677 From iklam at openjdk.java.net Wed Sep 22 19:44:59 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 22 Sep 2021 19:44:59 GMT Subject: RFR: 8273152: Store base archive path in CDSFileMapHeaderBase [v2] In-Reply-To: <3pwPp_YRC6toOK8w9TQXAGcAEFMxkahlf4Xa24itDRM=.5f53fae0-9bab-4a5a-9583-976a385a5dd1@github.com> References: <3pwPp_YRC6toOK8w9TQXAGcAEFMxkahlf4Xa24itDRM=.5f53fae0-9bab-4a5a-9583-976a385a5dd1@github.com> Message-ID: On Wed, 22 Sep 2021 03:51:19 GMT, Yumin Qi wrote: >> Store base archive path offset in CDSFileMapHeaderBase (which should be invariant in evolving versions) so we can read the base archive name reliably from dynamic archive even with variant header sizes over versions. >> >> tests: tier1-4 >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with two additional commits since the last revision: > > - Fixed typo > - Moved _header_size from FileMapHeader to CDSFileMapHeaderBase and added tests src/hotspot/share/cds/filemap.cpp line 1159: > 1157: } > 1158: } > 1159: The check from 1144-1158 should be done inside `FileMapInfo::check_archive()`. This function (`FileMapInfo::init_from_file`) is called *after* we have successfully loaded the header of an archive created by the current JDK. However, -- with JDK-8261455, we will need to read the headers of an archive created by a different JDK version, so we need to do the check at the very beginning, when we are examining the magic value, etc. Also, the base archive's name should be considered as part of the header, so `header()->header_size()` should include the size of the base archive's name as well. Otherwise, we won't be able to read the entire header, including the base archive name, of an archive created by a different JDK version. The check for header()->base_archive_path_offset() needs to be expanded: - it must be smaller than header()->header_size() - it must point to a valid 0-terminated string -- the string cannot run past the end of the header. ------------- PR: https://git.openjdk.java.net/jdk/pull/5584 From iklam at openjdk.java.net Wed Sep 22 19:53:53 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Wed, 22 Sep 2021 19:53:53 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v2] In-Reply-To: References: Message-ID: <6Ts-QnFRA7eKYYBJglO78JUbkGJzVgxZhiflfPnVsZw=.fab766b6-9511-48de-ae10-d23522081c8c@github.com> On Wed, 22 Sep 2021 15:47:29 GMT, Yumin Qi wrote: >> test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java line 593: >> >>> 591: >>> 592: >>> 593: public static String[] concat(ArrayList prefix, String... extra) { >> >> So you start with an `ArrayList` then convert that to a `String[]` which you pass to a function that then creates a new `ArrayList`, adds all the Strings to it and then converts it to a String[] again! can't help but think there has to be a simpler way to combine an ArrayList with a String[] ?? > > Could use the prefix, add extra to the list then prefix.toArray to avoid such conversion between ArrayList and array. I've removed this code from the current PR. I found other cases where the "runtime prefix" was not passed to child processes. I'll do a more general fix in https://bugs.openjdk.java.net/browse/JDK-8274166 ------------- PR: https://git.openjdk.java.net/jdk/pull/5626 From sspitsyn at openjdk.java.net Wed Sep 22 19:58:03 2021 From: sspitsyn at openjdk.java.net (Serguei Spitsyn) Date: Wed, 22 Sep 2021 19:58:03 GMT Subject: RFR: 8249004: Reduce ThreadListHandle overhead in relation to direct handshakes [v4] In-Reply-To: References: <891nGxHdujE6CWxkCW8v9qnKIGBHXPeOxjyIznPorOU=.8e159ff3-d3e3-4706-9c1b-18c675855825@github.com> Message-ID: On Wed, 22 Sep 2021 03:57:21 GMT, Daniel D. Daugherty wrote: >> A trivial fix to reduce ThreadListHandle overhead in relation to handshakes. >> >> This refactoring was tested with Mach5 Tier[1-3]. > > Daniel D. Daugherty 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 revision: > > - Merge branch 'master' into JDK-8249004 > - Merge branch 'master' into JDK-8249004 > - Merge branch 'master' into JDK-8249004 > - Merge branch 'master' into JDK-8249004 > - 8249004: Reduce ThreadListHandle overhead in relation to direct handshakes Hi Dan, It looks good. Thanks, Serguei ------------- Marked as reviewed by sspitsyn (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/4677 From dholmes at openjdk.java.net Wed Sep 22 22:48:53 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 22 Sep 2021 22:48:53 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v3] In-Reply-To: References: Message-ID: <1o8dgAwb_BQb0SjNySWlIWIbXcXjrrD2EoQSu2VrUDc=.92a7527b-c120-45e3-bd49-7f425b7ba521@github.com> On Wed, 22 Sep 2021 17:04:21 GMT, Ioi Lam wrote: >> Problem: >> >> In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM. >> >> Fix: >> >> Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded. > > Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: > > fixed typo; removed fix for handling of CDSUtils::getRuntimePrefix() to be done in a separate bug Marked as reviewed by dholmes (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5626 From minqi at openjdk.java.net Wed Sep 22 23:28:00 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Wed, 22 Sep 2021 23:28:00 GMT Subject: RFR: 8273152: Store base archive path in CDSFileMapHeaderBase [v2] In-Reply-To: References: <3pwPp_YRC6toOK8w9TQXAGcAEFMxkahlf4Xa24itDRM=.5f53fae0-9bab-4a5a-9583-976a385a5dd1@github.com> Message-ID: On Wed, 22 Sep 2021 19:42:08 GMT, Ioi Lam wrote: >> Yumin Qi has updated the pull request incrementally with two additional commits since the last revision: >> >> - Fixed typo >> - Moved _header_size from FileMapHeader to CDSFileMapHeaderBase and added tests > > src/hotspot/share/cds/filemap.cpp line 1159: > >> 1157: } >> 1158: } >> 1159: > > The check from 1144-1158 should be done inside `FileMapInfo::check_archive()`. This function (`FileMapInfo::init_from_file`) is called *after* we have successfully loaded the header of an archive created by the current JDK. However, -- with JDK-8261455, we will need to read the headers of an archive created by a different JDK version, so we need to do the check at the very beginning, when we are examining the magic value, etc. > > Also, the base archive's name should be considered as part of the header, so `header()->header_size()` should include the size of the base archive's name as well. Otherwise, we won't be able to read the entire header, including the base archive name, of an archive created by a different JDK version. > > The check for header()->base_archive_path_offset() needs to be expanded: > - it must be smaller than header()->header_size() > - it must point to a valid 0-terminated string -- the string cannot run past the end of the header. The base archive name size should be included in CDSFileMapHeaderBase, not the base archive name itself. If the name as a part of header size, it will complicate the code. We want to read the base archive name from the archive file, this should be done by only reading CDSFileMapHeaderBase from the archive file to get enough information. ------------- PR: https://git.openjdk.java.net/jdk/pull/5584 From minqi at openjdk.java.net Thu Sep 23 01:00:21 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Thu, 23 Sep 2021 01:00:21 GMT Subject: RFR: 8271303: jcmd VM.cds {static, dynamic}_dump should print more info Message-ID: Hi, please review the change for printing more info in jcmd terminal when dump shared archives. The ultimate shared archive file name is formed in java function (CDS.dumpSharedArchive) so to get the final archive name, the signature of CDS.dumpSharedArchive changed to return the archive name. At the end of dumping, return the archive name back to the caller so we can print out it in jcmd terminal. Tests: ter1-4 manually checked the output of jcmd execution. Thanks Yumin ------------- Commit messages: - 8271303: jcmd VM.cds {static, dynamic}_dump should print more info Changes: https://git.openjdk.java.net/jdk/pull/5643/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5643&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8271303 Stats: 15 lines in 3 files changed: 9 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/5643.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5643/head:pull/5643 PR: https://git.openjdk.java.net/jdk/pull/5643 From iklam at openjdk.java.net Thu Sep 23 03:52:55 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 23 Sep 2021 03:52:55 GMT Subject: RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v3] In-Reply-To: <39bmYnUwFQH_ydvvSIpUNiSu6n-jJPqoVoncAS6u_Zg=.de54f435-398b-47a8-99af-b559772785d1@github.com> References: <39bmYnUwFQH_ydvvSIpUNiSu6n-jJPqoVoncAS6u_Zg=.de54f435-398b-47a8-99af-b559772785d1@github.com> Message-ID: On Wed, 22 Sep 2021 18:24:24 GMT, Calvin Cheung wrote: >> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: >> >> fixed typo; removed fix for handling of CDSUtils::getRuntimePrefix() to be done in a separate bug > > Marked as reviewed by ccheung (Reviewer). Thanks @calvinccheung @dholmes-ora @yminqi for the review. ------------- PR: https://git.openjdk.java.net/jdk/pull/5626 From iklam at openjdk.java.net Thu Sep 23 03:52:55 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 23 Sep 2021 03:52:55 GMT Subject: Integrated: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM In-Reply-To: References: Message-ID: On Wed, 22 Sep 2021 05:44:44 GMT, Ioi Lam wrote: > Problem: > > In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM. > > Fix: > > Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded. This pull request has now been integrated. Changeset: 0fbbe4c9 Author: Ioi Lam URL: https://git.openjdk.java.net/jdk/commit/0fbbe4c9a779c24d5502648c866b7f1e1e50acc0 Stats: 13 lines in 1 file changed: 13 ins; 0 del; 0 mod 8274033: Some tier-4 CDS EpsilonGC tests throw OOM Reviewed-by: dholmes, ccheung, minqi ------------- PR: https://git.openjdk.java.net/jdk/pull/5626 From mbaesken at openjdk.java.net Thu Sep 23 05:37:53 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 23 Sep 2021 05:37:53 GMT Subject: Integrated: JDK-8273979: move some os time related functions to os_posix for POSIX platforms In-Reply-To: References: Message-ID: On Mon, 20 Sep 2021 13:16:42 GMT, Matthias Baesken wrote: > There are a couple of time related functions in os_ for Linux, BSD+Mac and AIX that are pretty similar (or identical) across the platforms and can be centralized in os_posix . > While doing so, I noticed that os::supports_vtime() returns always true , on Posix and also on Windows, so we might remove it completely if this prefered ? > > Best regards , Matthias This pull request has now been integrated. Changeset: 1c6fa113 Author: Matthias Baesken URL: https://git.openjdk.java.net/jdk/commit/1c6fa113bd06585945e077f0d2004a291c27946d Stats: 238 lines in 4 files changed: 63 ins; 173 del; 2 mod 8273979: move some os time related functions to os_posix for POSIX platforms Reviewed-by: dholmes, lucy ------------- PR: https://git.openjdk.java.net/jdk/pull/5582 From stuefe at openjdk.java.net Thu Sep 23 06:22:10 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Thu, 23 Sep 2021 06:22:10 GMT Subject: RFR: JDK-8273881: Metaspace: test repeated deallocations Message-ID: Hi, this adds a gtest which tests that repeatedly allocate and deallocate from an arena with the same size will not increase the footprint beyond the first allocation (the block should be registered with freeblock management and re-used each time). Tests: - manual tests on Ubuntu x64 and x86, with and without guards, and metaspace jtreg tests - GHAs Thanks, Thomas ------------- Commit messages: - JDK-8273881-metaspace-test-repeated-deallocs Changes: https://git.openjdk.java.net/jdk/pull/5546/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5546&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273881 Stats: 47 lines in 1 file changed: 47 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5546.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5546/head:pull/5546 PR: https://git.openjdk.java.net/jdk/pull/5546 From lzang at openjdk.java.net Thu Sep 23 07:04:00 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Thu, 23 Sep 2021 07:04:00 GMT Subject: Integrated: 8252842: Extend jmap to support parallel heap dump In-Reply-To: References: Message-ID: On Wed, 27 Jan 2021 12:49:29 GMT, Lin Zang wrote: > 8252842: Extend jmap to support parallel heap dump This pull request has now been integrated. Changeset: a74c099d Author: Lin Zang URL: https://git.openjdk.java.net/jdk/commit/a74c099d67272b2ef542405d30db62a82cbbebc6 Stats: 832 lines in 6 files changed: 637 ins; 42 del; 153 mod 8252842: Extend jmap to support parallel heap dump Reviewed-by: rschmelter, cjplummer ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From dholmes at openjdk.java.net Thu Sep 23 13:12:02 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 23 Sep 2021 13:12:02 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: References: Message-ID: <__674R8RO_mstjDHM_dNfkhdanXIBOuQPjnKnFO0ov0=.5c93c48e-26ce-4392-bea4-86ce45d41881@github.com> On Tue, 21 Sep 2021 02:07:39 GMT, Lin Zang wrote: >> I will start reviewing this today. > > Thanks @schmelter-sap and @plummercj for your help review and approve this PR! > Since this is a non-trivial change, I would like to wait for 2 days before integrate it in case more comments from others. @linzang this change is causing test crashes on Windows with ZGC and EpsilonGC - please see JDK-8274196 ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From lzang at openjdk.java.net Thu Sep 23 13:25:04 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Thu, 23 Sep 2021 13:25:04 GMT Subject: RFR: 8252842: Extend jmap to support parallel heap dump [v32] In-Reply-To: <__674R8RO_mstjDHM_dNfkhdanXIBOuQPjnKnFO0ov0=.5c93c48e-26ce-4392-bea4-86ce45d41881@github.com> References: <__674R8RO_mstjDHM_dNfkhdanXIBOuQPjnKnFO0ov0=.5c93c48e-26ce-4392-bea4-86ce45d41881@github.com> Message-ID: On Thu, 23 Sep 2021 13:07:46 GMT, David Holmes wrote: >> Thanks @schmelter-sap and @plummercj for your help review and approve this PR! >> Since this is a non-trivial change, I would like to wait for 2 days before integrate it in case more comments from others. > > @linzang this change is causing test crashes on Windows with ZGC and EpsilonGC - please see JDK-8274196 Thanks David @dholmes-ora, I will take look at the issue. BRs, Lin ------------- PR: https://git.openjdk.java.net/jdk/pull/2261 From minqi at openjdk.java.net Thu Sep 23 16:29:22 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Thu, 23 Sep 2021 16:29:22 GMT Subject: RFR: 8273152: Store base archive path in CDSFileMapHeaderBase [v3] In-Reply-To: References: Message-ID: > Store base archive path offset in CDSFileMapHeaderBase (which should be invariant in evolving versions) so we can read the base archive name reliably from dynamic archive even with variant header sizes over versions. > > tests: tier1-4 > > Thanks > Yumin Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: Moved _base_archive_name_size to CDSFileMapHeaderBase and made checking consistency in function check_archive ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5584/files - new: https://git.openjdk.java.net/jdk/pull/5584/files/d82587fb..e515c31b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5584&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5584&range=01-02 Stats: 73 lines in 6 files changed: 43 ins; 20 del; 10 mod Patch: https://git.openjdk.java.net/jdk/pull/5584.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5584/head:pull/5584 PR: https://git.openjdk.java.net/jdk/pull/5584 From darcy at openjdk.java.net Thu Sep 23 17:09:10 2021 From: darcy at openjdk.java.net (Joe Darcy) Date: Thu, 23 Sep 2021 17:09:10 GMT Subject: RFR: 8274216: ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all In-Reply-To: References: Message-ID: On Thu, 23 Sep 2021 16:45:30 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all. Marked as reviewed by darcy (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5657 From dcubed at openjdk.java.net Thu Sep 23 17:09:10 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Thu, 23 Sep 2021 17:09:10 GMT Subject: RFR: 8274216: ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all Message-ID: A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all. ------------- Commit messages: - 8274216: ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all Changes: https://git.openjdk.java.net/jdk/pull/5657/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5657&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274216 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5657.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5657/head:pull/5657 PR: https://git.openjdk.java.net/jdk/pull/5657 From dcubed at openjdk.java.net Thu Sep 23 17:09:10 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Thu, 23 Sep 2021 17:09:10 GMT Subject: RFR: 8274216: ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all In-Reply-To: References: Message-ID: On Thu, 23 Sep 2021 16:58:58 GMT, Joe Darcy wrote: >> A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all. > > Marked as reviewed by darcy (Reviewer). @jddarcy - Thanks for the fast review! ------------- PR: https://git.openjdk.java.net/jdk/pull/5657 From tschatzl at openjdk.java.net Thu Sep 23 17:09:10 2021 From: tschatzl at openjdk.java.net (Thomas Schatzl) Date: Thu, 23 Sep 2021 17:09:10 GMT Subject: RFR: 8274216: ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all In-Reply-To: References: Message-ID: <98hC7JdW0nSdZJrViN7XTJxJc4bpSuLtBpUPC0I1UHk=.3ba05130-cf03-47b7-a5ec-9d5be694181c@github.com> On Thu, 23 Sep 2021 16:45:30 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all. Marked as reviewed by tschatzl (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5657 From dcubed at openjdk.java.net Thu Sep 23 17:09:11 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Thu, 23 Sep 2021 17:09:11 GMT Subject: RFR: 8274216: ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all In-Reply-To: <98hC7JdW0nSdZJrViN7XTJxJc4bpSuLtBpUPC0I1UHk=.3ba05130-cf03-47b7-a5ec-9d5be694181c@github.com> References: <98hC7JdW0nSdZJrViN7XTJxJc4bpSuLtBpUPC0I1UHk=.3ba05130-cf03-47b7-a5ec-9d5be694181c@github.com> Message-ID: On Thu, 23 Sep 2021 17:01:14 GMT, Thomas Schatzl wrote: >> A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all. > > Marked as reviewed by tschatzl (Reviewer). @tschatzl - Thanks for the fast review! ------------- PR: https://git.openjdk.java.net/jdk/pull/5657 From dcubed at openjdk.java.net Thu Sep 23 17:17:53 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Thu, 23 Sep 2021 17:17:53 GMT Subject: Integrated: 8274216: ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all In-Reply-To: References: Message-ID: On Thu, 23 Sep 2021 16:45:30 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all. This pull request has now been integrated. Changeset: 0aa63fec Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk/commit/0aa63feca8704c8958530ef9e3df128570c50e12 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod 8274216: ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all Reviewed-by: darcy, tschatzl ------------- PR: https://git.openjdk.java.net/jdk/pull/5657 From coleenp at openjdk.java.net Thu Sep 23 22:38:52 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Thu, 23 Sep 2021 22:38:52 GMT Subject: RFR: 8266936: Add a finalization JFR event [v11] In-Reply-To: <3hNX4mQ98TyLNDmCXO4hDz8EMDoQ4ukr1Y1bvX1k8kk=.cc67221c-258a-4cac-a368-09d5fe44f245@github.com> References: <3hNX4mQ98TyLNDmCXO4hDz8EMDoQ4ukr1Y1bvX1k8kk=.cc67221c-258a-4cac-a368-09d5fe44f245@github.com> Message-ID: On Mon, 13 Sep 2021 17:12:49 GMT, Markus Gr?nlund wrote: >> Greetings, >> >> Object.finalize() was deprecated in JDK9. There is an ongoing effort to replace and mitigate Object.finalize() uses in the JDK libraries; please see https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. >> >> We also like to assist users in replacing and mitigating uses in non-JDK code. >> >> Hence, this changeset adds a periodic JFR event to help identify which classes are overriding Object.finalize(). >> >> Thanks >> Markus > > Markus Gr?nlund has updated the pull request incrementally with two additional commits since the last revision: > > - remove rehashing and rely on default grow_hint for table resize > - mtStatistics src/hotspot/share/jfr/periodic/jfrFinalizerStatisticsEvent.cpp line 26: > 24: > 25: #include "precompiled.hpp" > 26: #if INCLUDE_MANAGEMENT With precompiled headers turned off, this gets a compilation error: error: "INCLUDE_MANAGEMENT" is not defined, evaluates to 0 [-Werror=undef] ------------- PR: https://git.openjdk.java.net/jdk/pull/4731 From coleenp at openjdk.java.net Fri Sep 24 01:34:06 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 24 Sep 2021 01:34:06 GMT Subject: RFR: 8274245: sun/tools/jmap/BasicJMapTest.java Mutex rank failures Message-ID: This test fails due to Mutex rank assertions that I just added. The new mutexes in the heapDumper needs to be ranked 'nosafepoint' and 'nosafepoint-1' since they don't cause safepoint checks. This code also holds two no-safepoint checking locks and waits on the second. This doesn't break rank ordering but does run afoul of an old assert that we had in the code, that is no longer has meaning. The test still fails because of other bugs like JDK-8274196 but it doesn't get the mutex rank assertions anymore. Testing with tier 5 and 6, where the failure was observed, in progress. ------------- Commit messages: - 8274245: sun/tools/jmap/BasicJMapTest.java Mutex rank failures Changes: https://git.openjdk.java.net/jdk/pull/5669/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5669&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274245 Stats: 9 lines in 3 files changed: 0 ins; 3 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/5669.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5669/head:pull/5669 PR: https://git.openjdk.java.net/jdk/pull/5669 From coleenp at openjdk.java.net Fri Sep 24 01:38:21 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 24 Sep 2021 01:38:21 GMT Subject: RFR: 8274245: sun/tools/jmap/BasicJMapTest.java Mutex rank failures [v2] In-Reply-To: References: Message-ID: > This test fails due to Mutex rank assertions that I just added. The new mutexes in the heapDumper needs to be ranked 'nosafepoint' and 'nosafepoint-1' since they don't cause safepoint checks. > This code also holds two no-safepoint checking locks and waits on the second. This doesn't break rank ordering but does run afoul of an old assert that we had in the code, that is no longer has meaning. > > The test still fails because of other bugs like JDK-8274196 but it doesn't get the mutex rank assertions anymore. > > Testing with tier 5 and 6, where the failure was observed, in progress. Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision: Remove tests for special wait assert. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5669/files - new: https://git.openjdk.java.net/jdk/pull/5669/files/5ccfa31d..45b4776c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5669&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5669&range=00-01 Stats: 48 lines in 1 file changed: 0 ins; 48 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5669.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5669/head:pull/5669 PR: https://git.openjdk.java.net/jdk/pull/5669 From dholmes at openjdk.java.net Fri Sep 24 01:53:51 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Fri, 24 Sep 2021 01:53:51 GMT Subject: RFR: 8274245: sun/tools/jmap/BasicJMapTest.java Mutex rank failures [v2] In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 01:38:21 GMT, Coleen Phillimore wrote: >> This test fails due to Mutex rank assertions that I just added. The new mutexes in the heapDumper needs to be ranked 'nosafepoint' and 'nosafepoint-1' since they don't cause safepoint checks. >> This code also holds two no-safepoint checking locks and waits on the second. This doesn't break rank ordering but does run afoul of an old assert that we had in the code, that is no longer has meaning. >> >> The test still fails because of other bugs like JDK-8274196 but it doesn't get the mutex rank assertions anymore. >> >> Testing with tier 5 and 6, where the failure was observed, in progress. > > Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision: > > Remove tests for special wait assert. I think the assert still has merit but only for a JavaThread, as it means we are doing a wait on a monitor with no safepoint checking and that could potentially delay a safepoint arbitrarily. But obviously it is fine for NJTs to coordinate with each other (wait & notify) using a nosafepoint Monitor. David ------------- PR: https://git.openjdk.java.net/jdk/pull/5669 From dholmes at openjdk.java.net Fri Sep 24 02:01:05 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Fri, 24 Sep 2021 02:01:05 GMT Subject: RFR: 8274245: sun/tools/jmap/BasicJMapTest.java Mutex rank failures [v2] In-Reply-To: References: Message-ID: <8J55rDNKCP9se7vag8jbubGzscgpKujJ7TMllVS5NQw=.7d185651-9c61-4f01-8c59-f45246fbce19@github.com> On Fri, 24 Sep 2021 01:38:21 GMT, Coleen Phillimore wrote: >> This test fails due to Mutex rank assertions that I just added. The new mutexes in the heapDumper needs to be ranked 'nosafepoint' and 'nosafepoint-1' since they don't cause safepoint checks. >> This code also holds two no-safepoint checking locks and waits on the second. This doesn't break rank ordering but does run afoul of an old assert that we had in the code, that is no longer has meaning. >> >> The test still fails because of other bugs like JDK-8274196 but it doesn't get the mutex rank assertions anymore. >> >> Testing with tier 5 and 6, where the failure was observed, in progress. > > Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision: > > Remove tests for special wait assert. Sorry I misread that assertion. It is not clear why we would care about holding other nosafepoint locks when doing a wait(). We would only ever care about holding safepoint-ing locks when doing a wait() on a nosafepoint lock, and that is not allowed anyway. David ------------- PR: https://git.openjdk.java.net/jdk/pull/5669 From dholmes at openjdk.java.net Fri Sep 24 02:42:55 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Fri, 24 Sep 2021 02:42:55 GMT Subject: RFR: 8274245: sun/tools/jmap/BasicJMapTest.java Mutex rank failures [v2] In-Reply-To: References: Message-ID: <1NR9KEVkB1IU0pN5cB0qcva-x4PxSDCsajcWwTHo9pw=.6b2846e7-abd4-4a75-ab86-5b3ee569c6c3@github.com> On Fri, 24 Sep 2021 01:38:21 GMT, Coleen Phillimore wrote: >> This test fails due to Mutex rank assertions that I just added. The new mutexes in the heapDumper needs to be ranked 'nosafepoint' and 'nosafepoint-1' since they don't cause safepoint checks. >> This code also holds two no-safepoint checking locks and waits on the second. This doesn't break rank ordering but does run afoul of an old assert that we had in the code, that is no longer has meaning. >> >> The test still fails because of other bugs like JDK-8274196 but it doesn't get the mutex rank assertions anymore. >> >> Testing with tier 5 and 6, where the failure was observed, in progress. > > Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision: > > Remove tests for special wait assert. Hi Coleen, These assertions have lost their context over time as the mutex susbsystem has been changed. This one used to check for rank "special and that (once upon a time) was defined as: // A special lock: Is a lock where you are guaranteed not to block while you are // holding it, i.e., no vm operation can happen, taking other locks, etc. Hence the check that you don't wait() while holding one. But "special" is no more and the check makes no sense for general nosafepoint mutex/monitors. So I think your changes are fine. Thanks, David ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5669 From iklam at openjdk.java.net Fri Sep 24 06:54:00 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Fri, 24 Sep 2021 06:54:00 GMT Subject: RFR: 8271303: jcmd VM.cds {static, dynamic}_dump should print more info In-Reply-To: References: Message-ID: <4dzTHvj7lAfklryZiiUF209oZfqwYhCAmLE3ZZRapJw=.e7e2dc67-dae0-416d-a614-566bd3513bcb@github.com> On Thu, 23 Sep 2021 00:52:40 GMT, Yumin Qi wrote: > Hi, please review the change for printing more info in jcmd terminal when dump shared archives. The ultimate shared archive file name is formed in java function (CDS.dumpSharedArchive) so to get the final archive name, the signature of CDS.dumpSharedArchive changed to return the archive name. At the end of dumping, return the archive name back to the caller so we can print out it in jcmd terminal. > > Tests: ter1-4 > manually checked the output of jcmd execution. > > Thanks > Yumin Changes requested by iklam (Reviewer). src/java.base/share/classes/jdk/internal/misc/CDS.java line 337: > 335: } > 336: // Everyting goes well, print out the file name. > 337: String archiveFilePath = cwd + File.separator + archiveFileName; `archiveFileName` may already be a absolute path (e.g., "/tmp/foo.jar"), so this will print out something like /app/cwd//tmp/foo.jar, which will be incorrect. It should be changed to String archiveFilePath = new File(archiveFileName).getAbsolutePath(); src/java.base/share/classes/jdk/internal/misc/CDS.java line 338: > 336: // Everyting goes well, print out the file name. > 337: String archiveFilePath = cwd + File.separator + archiveFileName; > 338: System.out.println("The process was attached by jcmd and do a " + (isStatic ? "static" : "dynamic") + " dump to file " + archiveFilePath); Grammar: System.out.println("The process was attached by jcmd and dumped a " + (isStatic ? "static" : "dynamic") + " archive " + archiveFilePath); ------------- PR: https://git.openjdk.java.net/jdk/pull/5643 From jespersm at openjdk.java.net Fri Sep 24 08:59:03 2021 From: jespersm at openjdk.java.net (Jesper Steen =?UTF-8?B?TcO4bGxlcg==?=) Date: Fri, 24 Sep 2021 08:59:03 GMT Subject: RFR: 8274265: Suspicious string concatenation in test code Message-ID: This patch fixes the mishap, and lets JDK compile under XCode 13 / LLVM 13. ------------- Commit messages: - 8274265: Suspicious string concatenation in test code Changes: https://git.openjdk.java.net/jdk/pull/5675/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5675&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274265 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5675.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5675/head:pull/5675 PR: https://git.openjdk.java.net/jdk/pull/5675 From mgronlun at openjdk.java.net Fri Sep 24 09:27:05 2021 From: mgronlun at openjdk.java.net (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Fri, 24 Sep 2021 09:27:05 GMT Subject: RFR: 8266936: Add a finalization JFR event [v11] In-Reply-To: References: <3hNX4mQ98TyLNDmCXO4hDz8EMDoQ4ukr1Y1bvX1k8kk=.cc67221c-258a-4cac-a368-09d5fe44f245@github.com> Message-ID: On Thu, 23 Sep 2021 22:35:26 GMT, Coleen Phillimore wrote: >> Markus Gr?nlund has updated the pull request incrementally with two additional commits since the last revision: >> >> - remove rehashing and rely on default grow_hint for table resize >> - mtStatistics > > src/hotspot/share/jfr/periodic/jfrFinalizerStatisticsEvent.cpp line 26: > >> 24: >> 25: #include "precompiled.hpp" >> 26: #if INCLUDE_MANAGEMENT > > With precompiled headers turned off, this gets a compilation error: > error: "INCLUDE_MANAGEMENT" is not > defined, evaluates to 0 [-Werror=undef] Thanks, I missed submitting a few no-precompiled header builds. Fixed now. ------------- PR: https://git.openjdk.java.net/jdk/pull/4731 From mgronlun at openjdk.java.net Fri Sep 24 09:27:02 2021 From: mgronlun at openjdk.java.net (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Fri, 24 Sep 2021 09:27:02 GMT Subject: RFR: 8266936: Add a finalization JFR event [v12] In-Reply-To: References: Message-ID: <7qUo6JdWeitC5Tw90sAEdokNLL1B0cp7nU8pBRLFoOc=.9d912b5c-41f6-42cd-a393-85f46daad623@github.com> > Greetings, > > Object.finalize() was deprecated in JDK9. There is an ongoing effort to replace and mitigate Object.finalize() uses in the JDK libraries; please see https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. > > We also like to assist users in replacing and mitigating uses in non-JDK code. > > Hence, this changeset adds a periodic JFR event to help identify which classes are overriding Object.finalize(). > > Thanks > Markus Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: no precompiled headers and mtServiceability nmt classification ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4731/files - new: https://git.openjdk.java.net/jdk/pull/4731/files/62592daf..5759c605 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4731&range=11 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4731&range=10-11 Stats: 9 lines in 4 files changed: 4 ins; 2 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/4731.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4731/head:pull/4731 PR: https://git.openjdk.java.net/jdk/pull/4731 From coleenp at openjdk.java.net Fri Sep 24 12:22:01 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 24 Sep 2021 12:22:01 GMT Subject: RFR: 8274245: sun/tools/jmap/BasicJMapTest.java Mutex rank failures [v2] In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 01:38:21 GMT, Coleen Phillimore wrote: >> This test fails due to Mutex rank assertions that I just added. The new mutexes in the heapDumper needs to be ranked 'nosafepoint' and 'nosafepoint-1' since they don't cause safepoint checks. >> This code also holds two no-safepoint checking locks and waits on the second. This doesn't break rank ordering but does run afoul of an old assert that we had in the code, that is no longer has meaning. >> >> The test still fails because of other bugs like JDK-8274196 but it doesn't get the mutex rank assertions anymore. >> >> Testing with tier 5 and 6, where the failure was observed, in progress. > > Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision: > > Remove tests for special wait assert. @linzang has a different fix for this mutex ranking problem (make them check for safepoints, which is preferred anyway) and I'll file a different PR for the wait < nosafepoint rank problem. ------------- PR: https://git.openjdk.java.net/jdk/pull/5669 From coleenp at openjdk.java.net Fri Sep 24 12:22:02 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 24 Sep 2021 12:22:02 GMT Subject: Withdrawn: 8274245: sun/tools/jmap/BasicJMapTest.java Mutex rank failures In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 01:25:24 GMT, Coleen Phillimore wrote: > This test fails due to Mutex rank assertions that I just added. The new mutexes in the heapDumper needs to be ranked 'nosafepoint' and 'nosafepoint-1' since they don't cause safepoint checks. > This code also holds two no-safepoint checking locks and waits on the second. This doesn't break rank ordering but does run afoul of an old assert that we had in the code, that is no longer has meaning. > > The test still fails because of other bugs like JDK-8274196 but it doesn't get the mutex rank assertions anymore. > > Testing with tier 5 and 6, where the failure was observed, in progress. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5669 From mbaesken at openjdk.java.net Fri Sep 24 12:53:15 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 24 Sep 2021 12:53:15 GMT Subject: RFR: JDK-8274283: string-concatenation build warning as error with clang 13 on macOS aarch64 Message-ID: Please review this small fix fixing builds using clang 13. We run into this error when compiling with clang version 13.0.0 (clang-1300.0.29.3) : ------------- Commit messages: - JDK-8274283 Changes: https://git.openjdk.java.net/jdk/pull/5680/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5680&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274283 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5680.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5680/head:pull/5680 PR: https://git.openjdk.java.net/jdk/pull/5680 From lzang at openjdk.java.net Fri Sep 24 13:28:02 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Fri, 24 Sep 2021 13:28:02 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 Message-ID: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. ------------- Commit messages: - 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 Changes: https://git.openjdk.java.net/jdk/pull/5681/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5681&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274196 Stats: 48 lines in 2 files changed: 22 ins; 23 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/5681.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5681/head:pull/5681 PR: https://git.openjdk.java.net/jdk/pull/5681 From coleenp at openjdk.java.net Fri Sep 24 13:40:54 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 24 Sep 2021 13:40:54 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 In-Reply-To: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Fri, 24 Sep 2021 13:13:39 GMT, Lin Zang wrote: > The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. > > The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. > > The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. src/hotspot/share/services/heapDumper.cpp line 751: > 749: static void before_work() { > 750: assert(_lock == NULL, "ParDumpWriter lock must be initialized only once"); > 751: _lock = new (std::nothrow) PaddedMonitor(Mutex::leaf, "ParallelHProfWriter_lock", Mutex::_safepoint_check_always); If you change these locks to _safepoint_check_always, you have to acquire them without the Mutex::_no_safepoint_check flags so I don't know why you don't get that assert. ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From lzang at openjdk.java.net Fri Sep 24 13:48:55 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Fri, 24 Sep 2021 13:48:55 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Fri, 24 Sep 2021 13:37:44 GMT, Coleen Phillimore wrote: >> The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. >> >> The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. >> >> The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. > > src/hotspot/share/services/heapDumper.cpp line 751: > >> 749: static void before_work() { >> 750: assert(_lock == NULL, "ParDumpWriter lock must be initialized only once"); >> 751: _lock = new (std::nothrow) PaddedMonitor(Mutex::leaf, "ParallelHProfWriter_lock", Mutex::_safepoint_check_always); > > If you change these locks to _safepoint_check_always, you have to acquire them without the Mutex::_no_safepoint_check flags so I don't know why you don't get that assert. I think it may be because this is actually not a JavaThread. So the assert in `Mutex::check_no_safepoint_state` would pass. Moreover, I have tried to use `PaddedMonitor(Mutex::nosafepoint, "ParallelHProfWriter_lock", Mutex::_safepoint_check_never);` here, but the slowdebug would report errors as you mentioned in JDK-8274245. ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From lzang at openjdk.java.net Fri Sep 24 14:08:51 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Fri, 24 Sep 2021 14:08:51 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Fri, 24 Sep 2021 13:46:13 GMT, Lin Zang wrote: >> src/hotspot/share/services/heapDumper.cpp line 751: >> >>> 749: static void before_work() { >>> 750: assert(_lock == NULL, "ParDumpWriter lock must be initialized only once"); >>> 751: _lock = new (std::nothrow) PaddedMonitor(Mutex::leaf, "ParallelHProfWriter_lock", Mutex::_safepoint_check_always); >> >> If you change these locks to _safepoint_check_always, you have to acquire them without the Mutex::_no_safepoint_check flags so I don't know why you don't get that assert. > > I think it may be because this is actually not a JavaThread. So the assert in `Mutex::check_no_safepoint_state` would pass. > Moreover, I have tried to use `PaddedMonitor(Mutex::nosafepoint, "ParallelHProfWriter_lock", Mutex::_safepoint_check_never);` here, but the slowdebug would report errors as you mentioned in JDK-8274245. I agree the flag here and at the place of lock acquiring seems problematic. I will try to see whether I can use `Mutex::_safepoint_check_never` here and get rid of the assert. ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From coleenp at openjdk.java.net Fri Sep 24 15:05:27 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 24 Sep 2021 15:05:27 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Fri, 24 Sep 2021 14:05:48 GMT, Lin Zang wrote: >> I think it may be because this is actually not a JavaThread. So the assert in `Mutex::check_no_safepoint_state` would pass. >> Moreover, I have tried to use `PaddedMonitor(Mutex::nosafepoint, "ParallelHProfWriter_lock", Mutex::_safepoint_check_never);` here, but the slowdebug would report errors as you mentioned in JDK-8274245. > > I agree the flag here and at the place of lock acquiring seems problematic. I will try to see whether I can use `Mutex::_safepoint_check_never` here and get rid of the assert. yes void Mutex::check_no_safepoint_state(Thread* thread) { check_block_state(thread); assert(!thread->is_active_Java_thread() || _safepoint_check_required != _safepoint_check_always, "This lock should always have a safepoint check for Java threads: %s", name()); } yes, we exclude the check for a non-java thread, which I thought was an odd exclusion last time I looked. I pass the tests in sun/tools/jmap/BasicJMapTest.java so maybe leave it for now? ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From lzang at openjdk.java.net Fri Sep 24 15:09:05 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Fri, 24 Sep 2021 15:09:05 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Fri, 24 Sep 2021 15:01:26 GMT, Coleen Phillimore wrote: >> I agree the flag here and at the place of lock acquiring seems problematic. I will try to see whether I can use `Mutex::_safepoint_check_never` here and get rid of the assert. > > yes > void Mutex::check_no_safepoint_state(Thread* thread) { > check_block_state(thread); > assert(!thread->is_active_Java_thread() || _safepoint_check_required != _safepoint_check_always, > "This lock should always have a safepoint check for Java threads: %s", > name()); > } > > yes, we exclude the check for a non-java thread, which I thought was an odd exclusion last time I looked. I pass the tests in sun/tools/jmap/BasicJMapTest.java so maybe leave it for now? I agree, maybe a new issue could be created for tracking this. ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From coleenp at openjdk.java.net Fri Sep 24 15:29:22 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 24 Sep 2021 15:29:22 GMT Subject: RFR: 8274282: Remove special wait assert Message-ID: This change removes the assert and tests for Mutex::wait() only allowed with greater than nosafepoint ranked held locks. Tested with tier1-3. ------------- Commit messages: - Remove tests for special wait assert. - 8274245: sun/tools/jmap/BasicJMapTest.java Mutex rank failures Changes: https://git.openjdk.java.net/jdk/pull/5684/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5684&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274282 Stats: 57 lines in 4 files changed: 0 ins; 51 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/5684.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5684/head:pull/5684 PR: https://git.openjdk.java.net/jdk/pull/5684 From dcubed at openjdk.java.net Fri Sep 24 15:48:05 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Fri, 24 Sep 2021 15:48:05 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 In-Reply-To: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Fri, 24 Sep 2021 13:13:39 GMT, Lin Zang wrote: > The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. > > The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. > > The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. @linzang and @coleenp - I've ProblemListed the test via: JDK-8274294 ProblemList sun/tools/jmap/BasicJMapTest.java to give you folks time to sort thru the details. ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From dcubed at openjdk.java.net Fri Sep 24 15:50:15 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Fri, 24 Sep 2021 15:50:15 GMT Subject: Integrated: 8274294: ProblemList sun/tools/jmap/BasicJMapTest.java Message-ID: A trivial fix to ProblemList sun/tools/jmap/BasicJMapTest.java. ------------- Commit messages: - 8274294: ProblemList sun/tools/jmap/BasicJMapTest.java Changes: https://git.openjdk.java.net/jdk/pull/5685/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5685&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274294 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5685.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5685/head:pull/5685 PR: https://git.openjdk.java.net/jdk/pull/5685 From rriggs at openjdk.java.net Fri Sep 24 15:50:15 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 24 Sep 2021 15:50:15 GMT Subject: Integrated: 8274294: ProblemList sun/tools/jmap/BasicJMapTest.java In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 15:34:18 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList sun/tools/jmap/BasicJMapTest.java. Marked as reviewed by rriggs (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5685 From dcubed at openjdk.java.net Fri Sep 24 15:50:16 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Fri, 24 Sep 2021 15:50:16 GMT Subject: Integrated: 8274294: ProblemList sun/tools/jmap/BasicJMapTest.java In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 15:34:18 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList sun/tools/jmap/BasicJMapTest.java. This pull request has now been integrated. Changeset: 0c050be6 Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk/commit/0c050be64b7db297126c4dca6c7ebfc9f386b9db Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod 8274294: ProblemList sun/tools/jmap/BasicJMapTest.java Reviewed-by: rriggs ------------- PR: https://git.openjdk.java.net/jdk/pull/5685 From dcubed at openjdk.java.net Fri Sep 24 15:50:15 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Fri, 24 Sep 2021 15:50:15 GMT Subject: Integrated: 8274294: ProblemList sun/tools/jmap/BasicJMapTest.java In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 15:37:13 GMT, Roger Riggs wrote: >> A trivial fix to ProblemList sun/tools/jmap/BasicJMapTest.java. > > Marked as reviewed by rriggs (Reviewer). @RogerRiggs - Thanks for the fast review! ------------- PR: https://git.openjdk.java.net/jdk/pull/5685 From github.com+7837910+xpbob at openjdk.java.net Fri Sep 24 16:27:13 2021 From: github.com+7837910+xpbob at openjdk.java.net (xpbob) Date: Fri, 24 Sep 2021 16:27:13 GMT Subject: RFR: 8274293: Build failure with Xcode 13.0 due to vfork is deprecated Message-ID: remove vfork() on Darwin ------------- Commit messages: - 8274293: Build failure with Xcode 13.0 due to vfork is deprecated Changes: https://git.openjdk.java.net/jdk/pull/5686/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5686&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274293 Stats: 10 lines in 2 files changed: 8 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5686.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5686/head:pull/5686 PR: https://git.openjdk.java.net/jdk/pull/5686 From rehn at openjdk.java.net Fri Sep 24 16:48:38 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Fri, 24 Sep 2021 16:48:38 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock [v3] In-Reply-To: References: Message-ID: > We should not do any processing in SM::should_process(). > The query is used to determine if we need to process safepoint/handshakes and with this change StackWaterMark. > When locking a Mutex which may be acquired in such processing, we must release that Mutex before we can start processing, otherwise we can deadlock. > > This change adds a method to determine if StackWaterMarkSet::on_safepoint() will do any processing. > In that case there are poll is armed, we do not allow suspend handshakes and there is no safepoint and no non-suspend handshakes, we still return true if StackWaterMarkSet needs processing. > Thus the code querying should release any such Mutex and call process SM::process_if_requested(). > > The cross_modify_fence() do not have any such state, so we still need to emit that before returning false if poll is armed. > > Passes t1-t4 and local stressing. Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision: Fixed spelling ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5613/files - new: https://git.openjdk.java.net/jdk/pull/5613/files/536bb9e8..e5b52cda Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5613&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5613&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5613.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5613/head:pull/5613 PR: https://git.openjdk.java.net/jdk/pull/5613 From rehn at openjdk.java.net Fri Sep 24 16:48:46 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Fri, 24 Sep 2021 16:48:46 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock [v2] In-Reply-To: References: Message-ID: <-0Rw_7QVOEjUK41NQEyAYOZxyltUhxQcT0-GPzI9gQ8=.6e4e6947-165b-4e0a-82d1-bf9b76f7fab3@github.com> On Wed, 22 Sep 2021 16:44:53 GMT, Daniel D. Daugherty wrote: >> Robbin Ehn 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 revision: >> >> - Merge branch 'master' into 8273695-swm-should-proc >> - Added update poll values and fixed PR comments >> - Removed string dedup test from problem list >> - Check SWS for processing > > src/hotspot/share/runtime/safepointMechanism.inline.hpp line 79: > >> 77: } >> 78: >> 79: // It have boiled down to two possibilities. > > Please change to: > // It has boiled down to two possibilities: Fixed > src/hotspot/share/runtime/safepointMechanism.inline.hpp line 82: > >> 80: // 1: We have nothing to process, this just a disarm poll. >> 81: // 2: We have a suspend handshake, which cannot be processed. >> 82: // We update the poll value in case of a disarm, to reduce false positive. > > Typo: s/positive/positives/ Fixed ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From coleenp at openjdk.java.net Fri Sep 24 16:57:55 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 24 Sep 2021 16:57:55 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Fri, 24 Sep 2021 15:05:33 GMT, Lin Zang wrote: >> yes >> void Mutex::check_no_safepoint_state(Thread* thread) { >> check_block_state(thread); >> assert(!thread->is_active_Java_thread() || _safepoint_check_required != _safepoint_check_always, >> "This lock should always have a safepoint check for Java threads: %s", >> name()); >> } >> >> yes, we exclude the check for a non-java thread, which I thought was an odd exclusion last time I looked. I pass the tests in sun/tools/jmap/BasicJMapTest.java so maybe leave it for now? > > I agree, maybe a new issue could be created for tracking this. ?? ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From coleenp at openjdk.java.net Fri Sep 24 16:59:18 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 24 Sep 2021 16:59:18 GMT Subject: RFR: 8274282: Clarify special wait assert [v2] In-Reply-To: References: Message-ID: > This change removes the assert and tests for Mutex::wait() only allowed with greater than nosafepoint ranked held locks. > Tested with tier1-3. Coleen Phillimore has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: Fix wait checking code. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5684/files - new: https://git.openjdk.java.net/jdk/pull/5684/files/45b4776c..d5189887 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5684&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5684&range=00-01 Stats: 70 lines in 4 files changed: 64 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/5684.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5684/head:pull/5684 PR: https://git.openjdk.java.net/jdk/pull/5684 From coleenp at openjdk.java.net Fri Sep 24 16:59:19 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 24 Sep 2021 16:59:19 GMT Subject: RFR: 8274282: Clarify special wait assert In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 15:02:59 GMT, Coleen Phillimore wrote: > This change removes the assert and tests for Mutex::wait() only allowed with greater than nosafepoint ranked held locks. > Tested with tier1-3. I apologize I did a forced update. @pchilano helped me work out why this assert exists in the code @dholmes-ora also worked it out but I didn't get it yesterday. The reason for not waiting while holding a non-safepoint checking lock is that the wait could delay safepoints for a blocked thread, when the thread is a JavaThread. This is because holding the nosafepoint lock has a NoSafepointVerifier, so we won't set the state to blocked while waiting on the lower ranked lock. I fixed the code to do this assert for JavaThread and assert for NonJavaThread if the lock held is below tty, since that could block a lot of NJT operations. Also updated one of the tests to call with NJT. This should help the heap dumping code if it reverts to non-safepoint checking locking. And also helps solve this mystery of what this code was for. ------------- PR: https://git.openjdk.java.net/jdk/pull/5684 From rehn at openjdk.java.net Fri Sep 24 17:00:00 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Fri, 24 Sep 2021 17:00:00 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock In-Reply-To: References: <03Fvclcroars49mbVw2oyWttblbyG3VeL68wAlkSdDU=.6f624429-5ae8-4574-bfc6-f14b4b70717f@github.com> Message-ID: On Wed, 22 Sep 2021 11:46:32 GMT, Robbin Ehn wrote: > > @robehn - There are a couple of other bugs that are considered duplicates > > of this bug. Some of those track failures in Tier7 and Tier8 so it would be a > > good idea to do testing up through Tier8. > > I started more testing. After some investigations it passes t6-t8 (unrelated failures). @dcubed-ojdk thanks @dholmes-ora noted ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From minqi at openjdk.java.net Fri Sep 24 17:01:26 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Fri, 24 Sep 2021 17:01:26 GMT Subject: RFR: 8271303: jcmd VM.cds {static, dynamic}_dump should print more info [v2] In-Reply-To: References: Message-ID: > Hi, please review the change for printing more info in jcmd terminal when dump shared archives. The ultimate shared archive file name is formed in java function (CDS.dumpSharedArchive) so to get the final archive name, the signature of CDS.dumpSharedArchive changed to return the archive name. At the end of dumping, return the archive name back to the caller so we can print out it in jcmd terminal. > > Tests: ter1-4 > manually checked the output of jcmd execution. > > Thanks > Yumin Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: Fixed absolute path issue ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5643/files - new: https://git.openjdk.java.net/jdk/pull/5643/files/e0310efc..fd8efd5d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5643&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5643&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5643.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5643/head:pull/5643 PR: https://git.openjdk.java.net/jdk/pull/5643 From alanb at openjdk.java.net Fri Sep 24 17:04:49 2021 From: alanb at openjdk.java.net (Alan Bateman) Date: Fri, 24 Sep 2021 17:04:49 GMT Subject: RFR: 8274293: Build failure with Xcode 13.0 due to vfork is deprecated In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 16:18:57 GMT, xpbob wrote: > remove vfork() on Darwin src/java.base/unix/native/libjava/ProcessImpl_md.c line 447: > 445: #endif > 446: > 447: /* vfork(2) is deprecated on Solaris and Darwin */ Drive by comment is that we can probably drop "Solaris" from the comment. ------------- PR: https://git.openjdk.java.net/jdk/pull/5686 From minqi at openjdk.java.net Fri Sep 24 18:17:56 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Fri, 24 Sep 2021 18:17:56 GMT Subject: RFR: 8271303: jcmd VM.cds {static, dynamic}_dump should print more info [v2] In-Reply-To: <4dzTHvj7lAfklryZiiUF209oZfqwYhCAmLE3ZZRapJw=.e7e2dc67-dae0-416d-a614-566bd3513bcb@github.com> References: <4dzTHvj7lAfklryZiiUF209oZfqwYhCAmLE3ZZRapJw=.e7e2dc67-dae0-416d-a614-566bd3513bcb@github.com> Message-ID: On Fri, 24 Sep 2021 06:47:31 GMT, Ioi Lam wrote: >> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixed absolute path issue > > src/java.base/share/classes/jdk/internal/misc/CDS.java line 337: > >> 335: } >> 336: // Everyting goes well, print out the file name. >> 337: String archiveFilePath = cwd + File.separator + archiveFileName; > > `archiveFileName` may already be a absolute path (e.g., "/tmp/foo.jar"), so this will print out something like /app/cwd//tmp/foo.jar, which will be incorrect. It should be changed to > > > String archiveFilePath = new File(archiveFileName).getAbsolutePath(); Yes, it could be a absolute path already. ------------- PR: https://git.openjdk.java.net/jdk/pull/5643 From coleenp at openjdk.java.net Fri Sep 24 18:20:58 2021 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Fri, 24 Sep 2021 18:20:58 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 In-Reply-To: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: <-XuEnMJmy8mKo98VCPio-GN-BzYzNUaAeMj0cT2ivEo=.65cd9c5b-4953-4eb3-8976-c3d53e1478b5@github.com> On Fri, 24 Sep 2021 13:13:39 GMT, Lin Zang wrote: > The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. > > The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. > > The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. The lock stuff looks ok, but please have at least one of the original reviewers review the change. test/hotspot/jtreg/ProblemList-zgc.txt line 49: > 47: > 48: serviceability/dcmd/gc/HeapDumpAllTest.java 8274196 linux-all,windows-all > 49: serviceability/dcmd/gc/HeapDumpTest.java 8274196 linux-all,windows-all Before you push, you'll need to do a merge from mainline and should un-ProblemList sun/tools/jmap/BasicJMapTest.java. ------------- Marked as reviewed by coleenp (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5681 From pchilanomate at openjdk.java.net Fri Sep 24 18:35:59 2021 From: pchilanomate at openjdk.java.net (Patricio Chilano Mateo) Date: Fri, 24 Sep 2021 18:35:59 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock [v3] In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 16:48:38 GMT, Robbin Ehn wrote: >> We should not do any processing in SM::should_process(). >> The query is used to determine if we need to process safepoint/handshakes and with this change StackWaterMark. >> When locking a Mutex which may be acquired in such processing, we must release that Mutex before we can start processing, otherwise we can deadlock. >> >> This change adds a method to determine if StackWaterMarkSet::on_safepoint() will do any processing. >> In that case there are poll is armed, we do not allow suspend handshakes and there is no safepoint and no non-suspend handshakes, we still return true if StackWaterMarkSet needs processing. >> Thus the code querying should release any such Mutex and call process SM::process_if_requested(). >> >> The cross_modify_fence() do not have any such state, so we still need to emit that before returning false if poll is armed. >> >> Passes t1-t4 and local stressing. > > Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision: > > Fixed spelling LGTM! src/hotspot/share/runtime/safepointMechanism.inline.hpp line 90: > 88: // 3: The JavaThread wakes-up from blocked and does not allow suspend. > 89: // We are now about to avoid processing and thus no cross modify fence will be executed. > 90: // Therefore we execute it here. I would just say we still need to execute this fence in case a safepoint happened while being blocked, and not mention step 1 since as commented above there might be nothing to process. ------------- Marked as reviewed by pchilanomate (Committer). PR: https://git.openjdk.java.net/jdk/pull/5613 From mchung at openjdk.java.net Fri Sep 24 22:34:00 2021 From: mchung at openjdk.java.net (Mandy Chung) Date: Fri, 24 Sep 2021 22:34:00 GMT Subject: RFR: 8266936: Add a finalization JFR event [v12] In-Reply-To: <7qUo6JdWeitC5Tw90sAEdokNLL1B0cp7nU8pBRLFoOc=.9d912b5c-41f6-42cd-a393-85f46daad623@github.com> References: <7qUo6JdWeitC5Tw90sAEdokNLL1B0cp7nU8pBRLFoOc=.9d912b5c-41f6-42cd-a393-85f46daad623@github.com> Message-ID: On Fri, 24 Sep 2021 09:27:02 GMT, Markus Gr?nlund wrote: >> Greetings, >> >> Object.finalize() was deprecated in JDK9. There is an ongoing effort to replace and mitigate Object.finalize() uses in the JDK libraries; please see https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. >> >> We also like to assist users in replacing and mitigating uses in non-JDK code. >> >> Hence, this changeset adds a periodic JFR event to help identify which classes are overriding Object.finalize(). >> >> Thanks >> Markus > > Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: > > no precompiled headers and mtServiceability nmt classification Hi Markus, It's a little surprised to see Finalizer.c to depend JMM interface which is used by `java.management` and `jdk.management` modules only. It's more appropriate for it to be a JVM_* entry point for Finalizer to report completion of the finalization instead. I understand that you want to make FinalizerService to be a conditional feature which is a good idea. Such JVM entry can be made as a nop if not INCLUDE_SERVICES. ------------- PR: https://git.openjdk.java.net/jdk/pull/4731 From iklam at openjdk.java.net Sat Sep 25 00:09:01 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Sat, 25 Sep 2021 00:09:01 GMT Subject: RFR: 8271303: jcmd VM.cds {static, dynamic}_dump should print more info [v2] In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 17:01:26 GMT, Yumin Qi wrote: >> Hi, please review the change for printing more info in jcmd terminal when dump shared archives. The ultimate shared archive file name is formed in java function (CDS.dumpSharedArchive) so to get the final archive name, the signature of CDS.dumpSharedArchive changed to return the archive name. At the end of dumping, return the archive name back to the caller so we can print out it in jcmd terminal. >> >> Tests: ter1-4 >> manually checked the output of jcmd execution. >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: > > Fixed absolute path issue LGTM ------------- Marked as reviewed by iklam (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5643 From github.com+7837910+xpbob at openjdk.java.net Sat Sep 25 01:48:29 2021 From: github.com+7837910+xpbob at openjdk.java.net (xpbob) Date: Sat, 25 Sep 2021 01:48:29 GMT Subject: RFR: 8274293: Build failure with Xcode 13.0 due to vfork is deprecated [v2] In-Reply-To: References: Message-ID: <1gNjEaIKRg3DIqtvehDpCbV_rFH3HJSv2Q0_OfAR9Tg=.438ec9fc-9658-4bb5-819f-2a0f771d5466@github.com> > remove vfork() on Darwin xpbob has updated the pull request incrementally with one additional commit since the last revision: Drop drop "Solaris" from the comment ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5686/files - new: https://git.openjdk.java.net/jdk/pull/5686/files/89bb9c31..27d19543 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5686&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5686&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5686.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5686/head:pull/5686 PR: https://git.openjdk.java.net/jdk/pull/5686 From dcubed at openjdk.java.net Sat Sep 25 04:03:14 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 25 Sep 2021 04:03:14 GMT Subject: RFR: 8274312: ProblemList 2 serviceability/dcmd/gc tests with ZGC on macOS-all Message-ID: A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on macOS-all. ------------- Commit messages: - 8274312: ProblemList 2 serviceability/dcmd/gc tests with ZGC on macos-all Changes: https://git.openjdk.java.net/jdk/pull/5691/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5691&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274312 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5691.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5691/head:pull/5691 PR: https://git.openjdk.java.net/jdk/pull/5691 From dcubed at openjdk.java.net Sat Sep 25 05:19:24 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 25 Sep 2021 05:19:24 GMT Subject: RFR: 8274312: ProblemList 2 serviceability/dcmd/gc tests with ZGC on macos-all [v2] In-Reply-To: References: Message-ID: > A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on macOS-all. Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision: 8274313: ProblemList sun/tools/jmap/BasicJMapTest.java subtests ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5691/files - new: https://git.openjdk.java.net/jdk/pull/5691/files/7d5c636a..c53c1cce Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5691&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5691&range=00-01 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5691.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5691/head:pull/5691 PR: https://git.openjdk.java.net/jdk/pull/5691 From stuefe at openjdk.java.net Sat Sep 25 05:26:54 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Sat, 25 Sep 2021 05:26:54 GMT Subject: RFR: 8274312: ProblemList 2 serviceability/dcmd/gc tests with ZGC on macos-all [v2] In-Reply-To: References: Message-ID: <4uvT_9UUZFZHkTaz2NdS1efzmPKXwNe4oK2HXZbQXsE=.abf8fa31-b108-4ee9-bb23-54ab99d45a77@github.com> On Sat, 25 Sep 2021 05:19:24 GMT, Daniel D. Daugherty wrote: >> A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on macOS-all. > > Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision: > > 8274313: ProblemList sun/tools/jmap/BasicJMapTest.java subtests Looks good and trivial. ------------- Marked as reviewed by stuefe (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5691 From sspitsyn at openjdk.java.net Sat Sep 25 05:57:49 2021 From: sspitsyn at openjdk.java.net (Serguei Spitsyn) Date: Sat, 25 Sep 2021 05:57:49 GMT Subject: RFR: 8274312: ProblemList 2 serviceability/dcmd/gc tests with ZGC on macos-all [v2] In-Reply-To: References: Message-ID: On Sat, 25 Sep 2021 05:19:24 GMT, Daniel D. Daugherty wrote: >> A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on macOS-all. > > Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision: > > 8274313: ProblemList sun/tools/jmap/BasicJMapTest.java subtests Looks good. Thanks, Serguei ------------- Marked as reviewed by sspitsyn (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5691 From alanb at openjdk.java.net Sat Sep 25 08:24:56 2021 From: alanb at openjdk.java.net (Alan Bateman) Date: Sat, 25 Sep 2021 08:24:56 GMT Subject: RFR: 8274293: [macos] Build failure with Xcode 13.0 due to vfork is deprecated [v2] In-Reply-To: <1gNjEaIKRg3DIqtvehDpCbV_rFH3HJSv2Q0_OfAR9Tg=.438ec9fc-9658-4bb5-819f-2a0f771d5466@github.com> References: <1gNjEaIKRg3DIqtvehDpCbV_rFH3HJSv2Q0_OfAR9Tg=.438ec9fc-9658-4bb5-819f-2a0f771d5466@github.com> Message-ID: On Sat, 25 Sep 2021 01:48:29 GMT, xpbob wrote: >> remove vfork() on Darwin > > xpbob has updated the pull request incrementally with one additional commit since the last revision: > > Drop drop "Solaris" from the comment I think this looks okay but would be good for @RogerRiggs to also review. ------------- Marked as reviewed by alanb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5686 From stuefe at openjdk.java.net Sat Sep 25 10:14:04 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Sat, 25 Sep 2021 10:14:04 GMT Subject: RFR: 8274293: Build failure on macOS with Xcode 13.0 as vfork is deprecated [v2] In-Reply-To: <1gNjEaIKRg3DIqtvehDpCbV_rFH3HJSv2Q0_OfAR9Tg=.438ec9fc-9658-4bb5-819f-2a0f771d5466@github.com> References: <1gNjEaIKRg3DIqtvehDpCbV_rFH3HJSv2Q0_OfAR9Tg=.438ec9fc-9658-4bb5-819f-2a0f771d5466@github.com> Message-ID: On Sat, 25 Sep 2021 01:48:29 GMT, xpbob wrote: >> remove vfork() on Darwin > > xpbob has updated the pull request incrementally with one additional commit since the last revision: > > Drop drop "Solaris" from the comment The JDK change is fine. AFAICS we have used posix_spawn by default on MacOS since at least 2015, and vfork was not even an option on MacOS. Wrt the hotspot portion, we now fall back to fork. I wonder what the footprint penalty is compared to vfork. `os::fork_and_exec` gets used mainly by error reporting (`-XX:OnError`=xxx), e.g. in OOM situations. We now may run into situations where error analysis tools are unable to spawn if the parent is too big. Maybe we should change `os::fork_and_exec()` to use posix_spawn instead? ------------- PR: https://git.openjdk.java.net/jdk/pull/5686 From dholmes at openjdk.java.net Sat Sep 25 11:20:51 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Sat, 25 Sep 2021 11:20:51 GMT Subject: RFR: 8274312: ProblemList 2 serviceability/dcmd/gc tests with ZGC on macos-all [v2] In-Reply-To: References: Message-ID: On Sat, 25 Sep 2021 05:19:24 GMT, Daniel D. Daugherty wrote: >> A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on macOS-all. > > Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision: > > 8274313: ProblemList sun/tools/jmap/BasicJMapTest.java subtests Marked as reviewed by dholmes (Reviewer). test/jdk/ProblemList.txt line 824: > 822: sun/tools/jmap/BasicJMapTest.java#Parallel 8274245 generic-all > 823: sun/tools/jmap/BasicJMapTest.java#Serial 8274245 generic-all > 824: sun/tools/jmap/BasicJMapTest.java#Z 8274245 generic-all I didn't think it was necessary to enumerate subtests like this? ------------- PR: https://git.openjdk.java.net/jdk/pull/5691 From mgronlun at openjdk.java.net Sat Sep 25 13:34:09 2021 From: mgronlun at openjdk.java.net (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Sat, 25 Sep 2021 13:34:09 GMT Subject: RFR: 8266936: Add a finalization JFR event [v13] In-Reply-To: References: Message-ID: > Greetings, > > Object.finalize() was deprecated in JDK9. There is an ongoing effort to replace and mitigate Object.finalize() uses in the JDK libraries; please see https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. > > We also like to assist users in replacing and mitigating uses in non-JDK code. > > Hence, this changeset adds a periodic JFR event to help identify which classes are overriding Object.finalize(). > > Thanks > Markus Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: jvm.h and JVM_Entry ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4731/files - new: https://git.openjdk.java.net/jdk/pull/4731/files/5759c605..73091f7c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4731&range=12 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4731&range=11-12 Stats: 52 lines in 6 files changed: 20 ins; 29 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/4731.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4731/head:pull/4731 PR: https://git.openjdk.java.net/jdk/pull/4731 From dcubed at openjdk.java.net Sat Sep 25 13:40:56 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 25 Sep 2021 13:40:56 GMT Subject: RFR: 8274312: ProblemList 2 serviceability/dcmd/gc tests with ZGC on macos-all [v2] In-Reply-To: <4uvT_9UUZFZHkTaz2NdS1efzmPKXwNe4oK2HXZbQXsE=.abf8fa31-b108-4ee9-bb23-54ab99d45a77@github.com> References: <4uvT_9UUZFZHkTaz2NdS1efzmPKXwNe4oK2HXZbQXsE=.abf8fa31-b108-4ee9-bb23-54ab99d45a77@github.com> Message-ID: On Sat, 25 Sep 2021 05:24:07 GMT, Thomas Stuefe wrote: >> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision: >> >> 8274313: ProblemList sun/tools/jmap/BasicJMapTest.java subtests > > Looks good and trivial. @tstuefe, @sspitsyn and @dholmes-ora - Thanks for the reviews! ------------- PR: https://git.openjdk.java.net/jdk/pull/5691 From dcubed at openjdk.java.net Sat Sep 25 13:40:57 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 25 Sep 2021 13:40:57 GMT Subject: RFR: 8274312: ProblemList 2 serviceability/dcmd/gc tests with ZGC on macos-all [v2] In-Reply-To: References: Message-ID: <_DJ1gYQeKiDA-PVVnoUukmKaNvVcO2BGAl8el34MDoM=.fd79ea66-f73d-4a56-8515-0e8bccf8eff9@github.com> On Sat, 25 Sep 2021 11:17:23 GMT, David Holmes wrote: >> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision: >> >> 8274313: ProblemList sun/tools/jmap/BasicJMapTest.java subtests > > test/jdk/ProblemList.txt line 824: > >> 822: sun/tools/jmap/BasicJMapTest.java#Parallel 8274245 generic-all >> 823: sun/tools/jmap/BasicJMapTest.java#Serial 8274245 generic-all >> 824: sun/tools/jmap/BasicJMapTest.java#Z 8274245 generic-all > > I didn't think it was necessary to enumerate subtests like this? I didn't think so either, but the original ProblemListing bug: JDK-8274294 ProblemList sun/tools/jmap/BasicJMapTest.java didn't do the job. ------------- PR: https://git.openjdk.java.net/jdk/pull/5691 From dcubed at openjdk.java.net Sat Sep 25 13:40:57 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 25 Sep 2021 13:40:57 GMT Subject: Integrated: 8274312: ProblemList 2 serviceability/dcmd/gc tests with ZGC on macos-all In-Reply-To: References: Message-ID: <8UDLwQt1dYdQQu76Wh7vZfWA5dELWHDYK-NTmHpAN_0=.3431fa8a-f2db-4e31-bacc-e7baa9b7bd55@github.com> On Sat, 25 Sep 2021 03:54:19 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList 2 serviceability/dcmd/gc tests with ZGC on macOS-all. This pull request has now been integrated. Changeset: ab28db14 Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk/commit/ab28db1428e7109934ef1ae17ad574ed8042b9a0 Stats: 6 lines in 2 files changed: 3 ins; 0 del; 3 mod 8274312: ProblemList 2 serviceability/dcmd/gc tests with ZGC on macos-all 8274313: ProblemList sun/tools/jmap/BasicJMapTest.java subtests Reviewed-by: stuefe, sspitsyn, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/5691 From mgronlun at openjdk.java.net Sat Sep 25 13:52:56 2021 From: mgronlun at openjdk.java.net (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Sat, 25 Sep 2021 13:52:56 GMT Subject: RFR: 8266936: Add a finalization JFR event [v12] In-Reply-To: References: <7qUo6JdWeitC5Tw90sAEdokNLL1B0cp7nU8pBRLFoOc=.9d912b5c-41f6-42cd-a393-85f46daad623@github.com> Message-ID: On Fri, 24 Sep 2021 22:31:18 GMT, Mandy Chung wrote: > > > Hi Markus, > > It's a little surprised to see Finalizer.c to depend JMM interface which is used by `java.management` and `jdk.management` modules only. It's more appropriate for it to be a JVM_* entry point for Finalizer to report completion of the finalization instead. I understand that you want to make FinalizerService to be a conditional feature which is a good idea. Such JVM entry can be made as a nop if not INCLUDE_SERVICES. Thanks Mandy, I choose jmm.h over jvm.h because I wanted the FinalizerService to be conditional, like some other services/management implementations in the VM. There is conditional compilation support for the 'management' component of the JVM, i.e. INCLUDE_MANAGMENT. The jvm.h function JVM_GetManagement(JMM_VERSION) returns null if this subsystem is not included in the JVM, making it easier to support this as a conditional feature. In addition, I had hoped to see if I could also expose some of this finalizer statistics information via JMX. I did not get around to that, but a few accessors can now easily be added to jmm.h to get to this information and build on it further, should that be useful. There is also the benefit of not having to perform a VM call every time, which is probably only a small upshot because the code will most often be included. These reasons do not seem strong enough to motivate a move outside of the original classification, so I am ok to put it into jvm.h instead of jmm.h and create a JVM_Entry with a conditionalized body. ------------- PR: https://git.openjdk.java.net/jdk/pull/4731 From mgronlun at openjdk.java.net Sat Sep 25 14:22:28 2021 From: mgronlun at openjdk.java.net (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Sat, 25 Sep 2021 14:22:28 GMT Subject: RFR: 8266936: Add a finalization JFR event [v14] In-Reply-To: References: Message-ID: > Greetings, > > Object.finalize() was deprecated in JDK9. There is an ongoing effort to replace and mitigate Object.finalize() uses in the JDK libraries; please see https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. > > We also like to assist users in replacing and mitigating uses in non-JDK code. > > Hence, this changeset adds a periodic JFR event to help identify which classes are overriding Object.finalize(). > > Thanks > Markus Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: symbols-unix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4731/files - new: https://git.openjdk.java.net/jdk/pull/4731/files/73091f7c..4eaad60d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4731&range=13 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4731&range=12-13 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/4731.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4731/head:pull/4731 PR: https://git.openjdk.java.net/jdk/pull/4731 From stuefe at openjdk.java.net Sat Sep 25 16:05:57 2021 From: stuefe at openjdk.java.net (Thomas Stuefe) Date: Sat, 25 Sep 2021 16:05:57 GMT Subject: RFR: 8274293: Build failure on macOS with Xcode 13.0 as vfork is deprecated [v2] In-Reply-To: <1gNjEaIKRg3DIqtvehDpCbV_rFH3HJSv2Q0_OfAR9Tg=.438ec9fc-9658-4bb5-819f-2a0f771d5466@github.com> References: <1gNjEaIKRg3DIqtvehDpCbV_rFH3HJSv2Q0_OfAR9Tg=.438ec9fc-9658-4bb5-819f-2a0f771d5466@github.com> Message-ID: On Sat, 25 Sep 2021 01:48:29 GMT, xpbob wrote: >> remove vfork() on Darwin > > xpbob has updated the pull request incrementally with one additional commit since the last revision: > > Drop drop "Solaris" from the comment .. I opened https://bugs.openjdk.java.net/browse/JDK-8274320 to track the proposed change of os::fork_and_exec() to posix_spawn. So I am fine with this change. ------------- Marked as reviewed by stuefe (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5686 From rriggs at openjdk.java.net Sun Sep 26 01:20:04 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Sun, 26 Sep 2021 01:20:04 GMT Subject: RFR: 8274293: Build failure on macOS with Xcode 13.0 as vfork is deprecated [v2] In-Reply-To: <1gNjEaIKRg3DIqtvehDpCbV_rFH3HJSv2Q0_OfAR9Tg=.438ec9fc-9658-4bb5-819f-2a0f771d5466@github.com> References: <1gNjEaIKRg3DIqtvehDpCbV_rFH3HJSv2Q0_OfAR9Tg=.438ec9fc-9658-4bb5-819f-2a0f771d5466@github.com> Message-ID: On Sat, 25 Sep 2021 01:48:29 GMT, xpbob wrote: >> remove vfork() on Darwin > > xpbob has updated the pull request incrementally with one additional commit since the last revision: > > Drop drop "Solaris" from the comment Looks good, vfork is not/was not being used on Mac OS. ------------- Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5686 From lzang at openjdk.java.net Sun Sep 26 08:02:33 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Sun, 26 Sep 2021 08:02:33 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v2] In-Reply-To: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: > The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. > > The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. > > The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. Lin Zang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits: - un-ProblemList BasicJMapTest.java - Merge branch 'master' into pd-fix - 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 ------------- Changes: https://git.openjdk.java.net/jdk/pull/5681/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5681&range=01 Stats: 53 lines in 3 files changed: 22 ins; 28 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/5681.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5681/head:pull/5681 PR: https://git.openjdk.java.net/jdk/pull/5681 From dcubed at openjdk.java.net Sun Sep 26 08:59:50 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sun, 26 Sep 2021 08:59:50 GMT Subject: RFR: 8274324: ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64 Message-ID: A trivial fix to ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64. ------------- Commit messages: - 8274324: ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64 Changes: https://git.openjdk.java.net/jdk/pull/5700/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5700&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274324 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5700.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5700/head:pull/5700 PR: https://git.openjdk.java.net/jdk/pull/5700 From kbarrett at openjdk.java.net Sun Sep 26 08:59:50 2021 From: kbarrett at openjdk.java.net (Kim Barrett) Date: Sun, 26 Sep 2021 08:59:50 GMT Subject: RFR: 8274324: ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64 In-Reply-To: References: Message-ID: On Sun, 26 Sep 2021 02:13:36 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64. Looks good. ------------- Marked as reviewed by kbarrett (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5700 From egahlin at openjdk.java.net Sun Sep 26 09:07:09 2021 From: egahlin at openjdk.java.net (Erik Gahlin) Date: Sun, 26 Sep 2021 09:07:09 GMT Subject: RFR: 8274324: ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64 In-Reply-To: References: Message-ID: On Sun, 26 Sep 2021 02:13:36 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64. There is a real fix here, but it needs a reviewer. https://github.com/openjdk/jdk/pull/5703 ------------- PR: https://git.openjdk.java.net/jdk/pull/5700 From dcubed at openjdk.java.net Sun Sep 26 14:05:06 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sun, 26 Sep 2021 14:05:06 GMT Subject: RFR: 8274324: ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64 In-Reply-To: References: Message-ID: On Sun, 26 Sep 2021 04:38:06 GMT, Kim Barrett wrote: >> A trivial fix to ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64. > > Looks good. @kimbarrett - Thanks for the review. The bots are down so I don't think I can "/integrate". Also, it looks like @egahlin has a real fix so this ProblemListing can likely be thrown away. Will investigate further after breakfast... ------------- PR: https://git.openjdk.java.net/jdk/pull/5700 From github.com+7837910+xpbob at openjdk.java.net Sun Sep 26 14:52:01 2021 From: github.com+7837910+xpbob at openjdk.java.net (xpbob) Date: Sun, 26 Sep 2021 14:52:01 GMT Subject: Integrated: 8274293: Build failure on macOS with Xcode 13.0 as vfork is deprecated In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 16:18:57 GMT, xpbob wrote: > remove vfork() on Darwin This pull request has now been integrated. Changeset: 252aaa92 Author: bobpengxie Committer: Jie Fu URL: https://git.openjdk.java.net/jdk/commit/252aaa9249d8979366b37d59487b5b039d923e35 Stats: 10 lines in 2 files changed: 8 ins; 0 del; 2 mod 8274293: Build failure on macOS with Xcode 13.0 as vfork is deprecated Reviewed-by: alanb, stuefe, rriggs ------------- PR: https://git.openjdk.java.net/jdk/pull/5686 From dcubed at openjdk.java.net Sun Sep 26 15:03:01 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sun, 26 Sep 2021 15:03:01 GMT Subject: RFR: 8274324: ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64 In-Reply-To: References: Message-ID: On Sun, 26 Sep 2021 02:13:36 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64. #5703 is reviewed and waiting for the bots to wake up so it can be integrated. I'll close this PR without integrating it. ------------- PR: https://git.openjdk.java.net/jdk/pull/5700 From dcubed at openjdk.java.net Sun Sep 26 15:03:01 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sun, 26 Sep 2021 15:03:01 GMT Subject: Withdrawn: 8274324: ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64 In-Reply-To: References: Message-ID: On Sun, 26 Sep 2021 02:13:36 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList jdk/jfr/api/consumer/TestRecordedFrameType.java on linux-aarch64. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5700 From dholmes at openjdk.java.net Mon Sep 27 03:36:55 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Mon, 27 Sep 2021 03:36:55 GMT Subject: RFR: JDK-8274283: string-concatenation build warning as error with clang 13 on macOS aarch64 In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 12:43:32 GMT, Matthias Baesken wrote: > Please review this small fix fixing builds using clang 13. > We run into this error when compiling with clang version 13.0.0 (clang-1300.0.29.3) : @MBaesken this is a duplicate of https://github.com/openjdk/jdk/pull/5675 but that PR fixes two issues in this area so I would suggest closing this one and going with what @jespersm has done. ------------- PR: https://git.openjdk.java.net/jdk/pull/5680 From mbaesken at openjdk.java.net Mon Sep 27 06:35:08 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Mon, 27 Sep 2021 06:35:08 GMT Subject: RFR: JDK-8274283: string-concatenation build warning as error with clang 13 on macOS aarch64 In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 12:43:32 GMT, Matthias Baesken wrote: > Please review this small fix fixing builds using clang 13. > We run into this error when compiling with clang version 13.0.0 (clang-1300.0.29.3) : fixed by https://bugs.openjdk.java.net/browse/JDK-8274265, so I close this one. ------------- PR: https://git.openjdk.java.net/jdk/pull/5680 From mbaesken at openjdk.java.net Mon Sep 27 06:35:09 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Mon, 27 Sep 2021 06:35:09 GMT Subject: Withdrawn: JDK-8274283: string-concatenation build warning as error with clang 13 on macOS aarch64 In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 12:43:32 GMT, Matthias Baesken wrote: > Please review this small fix fixing builds using clang 13. > We run into this error when compiling with clang version 13.0.0 (clang-1300.0.29.3) : This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5680 From clanger at openjdk.java.net Mon Sep 27 08:19:57 2021 From: clanger at openjdk.java.net (Christoph Langer) Date: Mon, 27 Sep 2021 08:19:57 GMT Subject: RFR: 8274265: Suspicious string concatenation in test code In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 08:49:16 GMT, Jesper Steen M?ller wrote: > This patch fixes the mishap, and lets JDK compile under XCode 13 / LLVM 13. Marked as reviewed by clanger (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5675 From mbaesken at openjdk.java.net Mon Sep 27 08:24:01 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Mon, 27 Sep 2021 08:24:01 GMT Subject: RFR: 8274265: Suspicious string concatenation in test code In-Reply-To: References: Message-ID: <45ILOZGoJhbCjzsaJGZj7ZksObCTXeormFKYAfNTykI=.3d5a3854-4bbd-4479-bab8-470925165e67@github.com> On Fri, 24 Sep 2021 08:49:16 GMT, Jesper Steen M?ller wrote: > This patch fixes the mishap, and lets JDK compile under XCode 13 / LLVM 13. Looks good to me ! Thanks, Matthias ------------- Marked as reviewed by mbaesken (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5675 From pliden at openjdk.java.net Mon Sep 27 09:43:12 2021 From: pliden at openjdk.java.net (Per Liden) Date: Mon, 27 Sep 2021 09:43:12 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v2] In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Sun, 26 Sep 2021 08:02:33 GMT, Lin Zang wrote: >> The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. >> >> The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. >> >> The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. > > Lin Zang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits: > > - un-ProblemList BasicJMapTest.java > - Merge branch 'master' into pd-fix > - 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 > The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. The fix here should not be to change the order of stuff, so that heap iteration happens first, that will just hide the real bug. The real bug is that the `JNIGlobalsDumper::do_oop()` is missing a load barrier. In other words, keep the order and just make sure to add a load barrier, like this: void JNIGlobalsDumper::do_oop(oop* obj_p) { oop o = NativeAccess::oop_load(obj_p); ... ------------- Changes requested by pliden (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5681 From lzang at openjdk.java.net Mon Sep 27 11:28:02 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Mon, 27 Sep 2021 11:28:02 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v2] In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Mon, 27 Sep 2021 09:39:59 GMT, Per Liden wrote: > > The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. > > The fix here should not be to change the order of stuff, so that heap iteration happens first, that will just hide the real bug. The real bug is that the `JNIGlobalsDumper::do_oop()` is missing a load barrier. In other words, keep the order and just make sure to add a load barrier, like this: > > ``` > void JNIGlobalsDumper::do_oop(oop* obj_p) { > oop o = NativeAccess::oop_load(obj_p); > ... > ``` Hi Per @pliden , Thanks a lot? Correct?I am just puzzling why the sequency of root type dump is a must as there is no such request in spec, and your suggestion definitely help to answer that, I took the wrong fix and neglect that there is a read barrier missed. I will make the change. BRs, Lin ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From lzang at openjdk.java.net Mon Sep 27 12:00:56 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Mon, 27 Sep 2021 12:00:56 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v3] In-Reply-To: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: <9lA5QLpliCPex_--98RPabUAEqK0crK8H_Wb_7NJp3Y=.85efd571-79cf-4be7-a1fb-975634ae6000@github.com> > The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. > > The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. > > The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. Lin Zang has updated the pull request incrementally with one additional commit since the last revision: Add missing read barrier ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5681/files - new: https://git.openjdk.java.net/jdk/pull/5681/files/91f1c349..c1658e19 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5681&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5681&range=01-02 Stats: 34 lines in 1 file changed: 16 ins; 16 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5681.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5681/head:pull/5681 PR: https://git.openjdk.java.net/jdk/pull/5681 From lzang at openjdk.java.net Mon Sep 27 12:02:53 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Mon, 27 Sep 2021 12:02:53 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v4] In-Reply-To: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: > The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. > > The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. > > The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. Lin Zang has updated the pull request incrementally with one additional commit since the last revision: remove redundant empty line ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5681/files - new: https://git.openjdk.java.net/jdk/pull/5681/files/c1658e19..f6cb2123 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5681&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5681&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5681.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5681/head:pull/5681 PR: https://git.openjdk.java.net/jdk/pull/5681 From pliden at openjdk.java.net Mon Sep 27 13:10:07 2021 From: pliden at openjdk.java.net (Per Liden) Date: Mon, 27 Sep 2021 13:10:07 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v4] In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Mon, 27 Sep 2021 12:02:53 GMT, Lin Zang wrote: >> The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. >> >> The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. >> >> The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. > > Lin Zang has updated the pull request incrementally with one additional commit since the last revision: > > remove redundant empty line src/hotspot/share/services/heapDumper.cpp line 1601: > 1599: void JNILocalsDumper::do_oop(oop* obj_p) { > 1600: // ignore null handles > 1601: oop o = NativeAccess::oop_load(obj_p); The JNI Local roots do not need a load barrier, only JNI Global roots need that. The JNI Local roots are processed on safepoint entry as part of the "thread head" (via `ZStackWatermark::ZStackWatermark::start_processing_impl()` -> `Thread::oops_do_no_frames()`), so once you are in `VM_HeapDumper::do_thread()` the JNI Local roots have already passed a load barrier. ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From lzang at openjdk.java.net Mon Sep 27 14:28:47 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Mon, 27 Sep 2021 14:28:47 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v4] In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Mon, 27 Sep 2021 13:06:57 GMT, Per Liden wrote: >> Lin Zang has updated the pull request incrementally with one additional commit since the last revision: >> >> remove redundant empty line > > src/hotspot/share/services/heapDumper.cpp line 1601: > >> 1599: void JNILocalsDumper::do_oop(oop* obj_p) { >> 1600: // ignore null handles >> 1601: oop o = NativeAccess::oop_load(obj_p); > > The JNI Local roots do not need a load barrier, only JNI Global roots need that. The JNI Local roots are processed on safepoint entry as part of the "thread head" (via `ZStackWatermark::ZStackWatermark::start_processing_impl()` -> `Thread::oops_do_no_frames()`), so once you are in `VM_HeapDumper::do_thread()` the JNI Local roots have already passed a load barrier. Get it, Thanks! ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From lzang at openjdk.java.net Mon Sep 27 14:28:43 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Mon, 27 Sep 2021 14:28:43 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v5] In-Reply-To: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: > The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. > > The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. > > The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. Lin Zang has updated the pull request incrementally with one additional commit since the last revision: remove load barrier for JNI local roots ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5681/files - new: https://git.openjdk.java.net/jdk/pull/5681/files/f6cb2123..db77cdaa Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5681&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5681&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5681.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5681/head:pull/5681 PR: https://git.openjdk.java.net/jdk/pull/5681 From ccheung at openjdk.java.net Mon Sep 27 18:22:09 2021 From: ccheung at openjdk.java.net (Calvin Cheung) Date: Mon, 27 Sep 2021 18:22:09 GMT Subject: RFR: 8271303: jcmd VM.cds {static, dynamic}_dump should print more info [v2] In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 17:01:26 GMT, Yumin Qi wrote: >> Hi, please review the change for printing more info in jcmd terminal when dump shared archives. The ultimate shared archive file name is formed in java function (CDS.dumpSharedArchive) so to get the final archive name, the signature of CDS.dumpSharedArchive changed to return the archive name. At the end of dumping, return the archive name back to the caller so we can print out it in jcmd terminal. >> >> Tests: ter1-4 >> manually checked the output of jcmd execution. >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: > > Fixed absolute path issue LGTM. ------------- Marked as reviewed by ccheung (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5643 From mchung at openjdk.java.net Mon Sep 27 19:21:05 2021 From: mchung at openjdk.java.net (Mandy Chung) Date: Mon, 27 Sep 2021 19:21:05 GMT Subject: RFR: 8266936: Add a finalization JFR event [v14] In-Reply-To: References: Message-ID: On Sat, 25 Sep 2021 14:22:28 GMT, Markus Gr?nlund wrote: >> Greetings, >> >> Object.finalize() was deprecated in JDK9. There is an ongoing effort to replace and mitigate Object.finalize() uses in the JDK libraries; please see https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. >> >> We also like to assist users in replacing and mitigating uses in non-JDK code. >> >> Hence, this changeset adds a periodic JFR event to help identify which classes are overriding Object.finalize(). >> >> Thanks >> Markus > > Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: > > symbols-unix I reviewed the change in java.base that looks good. ------------- Marked as reviewed by mchung (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/4731 From minqi at openjdk.java.net Mon Sep 27 21:26:09 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Mon, 27 Sep 2021 21:26:09 GMT Subject: RFR: 8271303: jcmd VM.cds {static, dynamic}_dump should print more info [v2] In-Reply-To: References: Message-ID: On Sat, 25 Sep 2021 00:05:40 GMT, Ioi Lam wrote: >> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixed absolute path issue > > LGTM @iklam @calvinccheung Thanks for review! ------------- PR: https://git.openjdk.java.net/jdk/pull/5643 From minqi at openjdk.java.net Mon Sep 27 21:31:21 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Mon, 27 Sep 2021 21:31:21 GMT Subject: Integrated: 8271303: jcmd VM.cds {static, dynamic}_dump should print more info In-Reply-To: References: Message-ID: <6rJIO_15MF6-tsVA8ArHdTNg7diEyT1rV9KP4UzXuk8=.a8b7c7ec-cf30-48d2-8b2d-532dc41e8444@github.com> On Thu, 23 Sep 2021 00:52:40 GMT, Yumin Qi wrote: > Hi, please review the change for printing more info in jcmd terminal when dump shared archives. The ultimate shared archive file name is formed in java function (CDS.dumpSharedArchive) so to get the final archive name, the signature of CDS.dumpSharedArchive changed to return the archive name. At the end of dumping, return the archive name back to the caller so we can print out it in jcmd terminal. > > Tests: ter1-4 > manually checked the output of jcmd execution. > > Thanks > Yumin This pull request has now been integrated. Changeset: c4b52c73 Author: Yumin Qi URL: https://git.openjdk.java.net/jdk/commit/c4b52c7378183ab0fb987cc571c1debea450e125 Stats: 15 lines in 3 files changed: 9 ins; 0 del; 6 mod 8271303: jcmd VM.cds {static, dynamic}_dump should print more info Reviewed-by: iklam, ccheung ------------- PR: https://git.openjdk.java.net/jdk/pull/5643 From iklam at openjdk.java.net Tue Sep 28 06:22:56 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Tue, 28 Sep 2021 06:22:56 GMT Subject: RFR: 8274265: Suspicious string concatenation in test code In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 08:49:16 GMT, Jesper Steen M?ller wrote: > This patch fixes the mishap, and lets JDK compile under XCode 13 / LLVM 13. I've updated the RFE title to be more specific. Please update the PR title to match the RFE before integration. ------------- PR: https://git.openjdk.java.net/jdk/pull/5675 From pliden at openjdk.java.net Tue Sep 28 07:50:06 2021 From: pliden at openjdk.java.net (Per Liden) Date: Tue, 28 Sep 2021 07:50:06 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v5] In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Mon, 27 Sep 2021 14:28:43 GMT, Lin Zang wrote: >> The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. >> >> The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. >> >> The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. > > Lin Zang has updated the pull request incrementally with one additional commit since the last revision: > > remove load barrier for JNI local roots The load barrier part of this now looks good to me. ------------- Marked as reviewed by pliden (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5681 From mbaesken at openjdk.java.net Tue Sep 28 11:20:17 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Tue, 28 Sep 2021 11:20:17 GMT Subject: RFR: JDK-8274434: move os::get_default_process_handle and os::dll_lookup to os_posix for POSIX platforms Message-ID: <4Dt5972d0-anhV1jfU2BCrcaaANGedVnxNkrFjPz34M=.55c5f633-a698-4c33-898c-bacb1127075e@github.com> Hello, please review this small change. The os::get_default_process_handle and os::dll_lookup functions are pretty similar across the POSIX platforms so they can be moved to os_posix.cpp. ------------- Commit messages: - JDK-8274434 Changes: https://git.openjdk.java.net/jdk/pull/5737/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5737&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274434 Stats: 49 lines in 4 files changed: 15 ins; 34 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5737.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5737/head:pull/5737 PR: https://git.openjdk.java.net/jdk/pull/5737 From sgehwolf at openjdk.java.net Tue Sep 28 16:15:28 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Tue, 28 Sep 2021 16:15:28 GMT Subject: RFR: 8273216: JCMD does not work across container boundaries with Podman Message-ID: Please review this test fix so as to make it work with podman too. I've tested this with podman 3.3.1 when running as regular user and when running as root. Also tested it with docker on cgroups v1 with root. I don't know how to do rootless docker testing. Thoughts? ------------- Commit messages: - 8273216: JCMD does not work across container boundaries with Podman Changes: https://git.openjdk.java.net/jdk/pull/5740/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5740&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273216 Stats: 32 lines in 1 file changed: 16 ins; 9 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/5740.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5740/head:pull/5740 PR: https://git.openjdk.java.net/jdk/pull/5740 From pchilanomate at openjdk.java.net Tue Sep 28 17:49:00 2021 From: pchilanomate at openjdk.java.net (Patricio Chilano Mateo) Date: Tue, 28 Sep 2021 17:49:00 GMT Subject: RFR: 8274379: Allow process of unsafe access errors in check_special_condition_for_native_trans Message-ID: Hi, Please review the following patch to allow processing of unsafe access errors in check_special_condition_for_native_trans(). Today we special case unsafe access errors from other async exceptions in that we don't process them when transitioning from native back to Java. Code comments in check_special_condition_for_native_trans() mention that unsafe access errors should not be handled because that may block while creating the exception. But that should not be an issue since we can always make sure we call process_if_requested_with_exit_check() after the call to throw_unsafe_access_internal_error() to process any pending operations not already handled in a ThreadBlockInVM wrapper (today that only means suspend requests and object reallocation operations). By removing this special treatment for unsafe access errors we can also simplify the async exception support API. For instance we can remove _async_exception_condition and simplify some of the supporting methods. I also removed the _thread_in_native case from the switch statement in check_and_handle_async_exceptions() since we never call that method in that state. Testing by running tiers1-6 in mach5. Thanks, Patricio ------------- Commit messages: - v1 Changes: https://git.openjdk.java.net/jdk/pull/5741/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5741&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274379 Stats: 94 lines in 7 files changed: 15 ins; 51 del; 28 mod Patch: https://git.openjdk.java.net/jdk/pull/5741.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5741/head:pull/5741 PR: https://git.openjdk.java.net/jdk/pull/5741 From jespersm at openjdk.java.net Tue Sep 28 18:25:45 2021 From: jespersm at openjdk.java.net (Jesper Steen =?UTF-8?B?TcO4bGxlcg==?=) Date: Tue, 28 Sep 2021 18:25:45 GMT Subject: Integrated: 8274265: Suspicious string concatenation in logTestUtils.inline.hpp In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 08:49:16 GMT, Jesper Steen M?ller wrote: > This patch fixes the mishap, and lets JDK compile under XCode 13 / LLVM 13. This pull request has now been integrated. Changeset: c57a6c62 Author: Jesper Steen M?ller Committer: Christoph Langer URL: https://git.openjdk.java.net/jdk/commit/c57a6c62baecde0bc10bfca89e0616b0c1fbb714 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod 8274265: Suspicious string concatenation in logTestUtils.inline.hpp Reviewed-by: clanger, mbaesken ------------- PR: https://git.openjdk.java.net/jdk/pull/5675 From mseledtsov at openjdk.java.net Tue Sep 28 21:34:37 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Tue, 28 Sep 2021 21:34:37 GMT Subject: RFR: 8273216: JCMD does not work across container boundaries with Podman In-Reply-To: References: Message-ID: On Tue, 28 Sep 2021 16:05:15 GMT, Severin Gehwolf wrote: > Please review this test fix so as to make it work with podman too. I've tested this with podman 3.3.1 when running as regular user and when running as root. Also tested it with docker on cgroups v1 with root. I don't know how to do rootless docker testing. > > Thoughts? Severin, thank you for addressing this issue. Overall the change looks good. I ran your change through Oracle's test system, and the Docker case passes. However, a Podman case fails when running 'jcmd -l' attempting to find the target test child process - could not find it. Please note that we run both Docker and Podman tests in non-root mode (a regular "test user"). Perhaps the test should have conditional guards for it, and throw a jtreg.SkippedException for Podman non-root user with a short message? ---------System.err:(13/757)---------- java.lang.RuntimeException: Could not find specified process at TestJcmd.testJcmdGetPid(TestJcmd.java:103) at TestJcmd.main(TestJcmd.java:72) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312) at java.base/java.lang.Thread.run(Thread.java:833) JavaTest Message: Test threw exception: java.lang.RuntimeException JavaTest Message: shutting down test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Could not find specified process ------------- PR: https://git.openjdk.java.net/jdk/pull/5740 From mseledtsov at openjdk.java.net Tue Sep 28 21:38:30 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Tue, 28 Sep 2021 21:38:30 GMT Subject: RFR: 8273216: JCMD does not work across container boundaries with Podman In-Reply-To: References: Message-ID: On Tue, 28 Sep 2021 16:05:15 GMT, Severin Gehwolf wrote: > Please review this test fix so as to make it work with podman too. I've tested this with podman 3.3.1 when running as regular user and when running as root. Also tested it with docker on cgroups v1 with root. I don't know how to do rootless docker testing. > > Thoughts? Also, I checked a Podman version on our test systems: it is earlier/below 3.3.1. Perhaps the conditional guard in the test should check for that as well, and if version is below 3.3.1, we should check if user is root, and throw SkippedException if not? ------------- PR: https://git.openjdk.java.net/jdk/pull/5740 From lzang at openjdk.java.net Tue Sep 28 22:36:37 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Tue, 28 Sep 2021 22:36:37 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v5] In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Tue, 28 Sep 2021 07:46:27 GMT, Per Liden wrote: >> Lin Zang has updated the pull request incrementally with one additional commit since the last revision: >> >> remove load barrier for JNI local roots > > The load barrier part of this now looks good to me. Thanks @pliden for help review and approve. Dear Chris(@plummercj) and Ralf(@schmelter-sap), may I ask your help to review this fix of JDK-8252842? Thanks! ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From dholmes at openjdk.java.net Wed Sep 29 04:02:35 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 29 Sep 2021 04:02:35 GMT Subject: RFR: JDK-8274434: move os::get_default_process_handle and os::dll_lookup to os_posix for POSIX platforms In-Reply-To: <4Dt5972d0-anhV1jfU2BCrcaaANGedVnxNkrFjPz34M=.55c5f633-a698-4c33-898c-bacb1127075e@github.com> References: <4Dt5972d0-anhV1jfU2BCrcaaANGedVnxNkrFjPz34M=.55c5f633-a698-4c33-898c-bacb1127075e@github.com> Message-ID: On Tue, 28 Sep 2021 11:13:00 GMT, Matthias Baesken wrote: > Hello, please review this small change. > The os::get_default_process_handle and os::dll_lookup functions are pretty similar across the POSIX platforms so they can be moved to os_posix.cpp. Hi Matthias, The refactoring is fine, but I do wonder (future cleanup ok) if we actually need the macOS special case - see comment below. Thanks, David src/hotspot/os/posix/os_posix.cpp line 646: > 644: // MacOS X needs to use RTLD_FIRST instead of RTLD_LAZY > 645: // to avoid finding unexpected symbols on second (or later) > 646: // loads of a library. I find this a puzzling comment. RTLD_FIRST is not used instead of RTLD_LAZY it is used with it. RTLD_FIRST simply limits how dlsym will perform a search using the handle that dlopen returns. Second it is trying to protect against something that will happen on other Posix systems anyway, so can't really be a bug. So I have to question whether we really need to special case this code for macOS? ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5737 From dholmes at openjdk.java.net Wed Sep 29 04:37:35 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 29 Sep 2021 04:37:35 GMT Subject: RFR: 8274282: Clarify special wait assert [v2] In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 16:59:18 GMT, Coleen Phillimore wrote: >> This change removes the assert and tests for Mutex::wait() only allowed with greater than nosafepoint ranked held locks. >> Tested with tier1-3. > > Coleen Phillimore has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > Fix wait checking code. Hi Coleen, The rationale is not quite right to me here. See comments below. Thanks, David src/hotspot/share/runtime/mutex.cpp line 388: > 386: Mutex* least = get_least_ranked_lock_besides_this(locks_owned); > 387: // We enforce not holding locks of rank nosafepoint or lower while waiting for JavaThreads, > 388: // because the held lock has a NoSafepointVerifier so waiting on a lock will block out safepoints. The NSV is not the reason, it is a mechanism to detect violation of the rules. The reason we must not block in a JavaThread is because it will block without a safepoint check and without becoming safepoint-safe, thus blocking out safepoints while the wait is in progress. Also note that this applies to any wait() on a nosafepoint lock, not just one done while holding a safepoint lock. src/hotspot/share/runtime/mutex.cpp line 389: > 387: // We enforce not holding locks of rank nosafepoint or lower while waiting for JavaThreads, > 388: // because the held lock has a NoSafepointVerifier so waiting on a lock will block out safepoints. > 389: // For NonJavaThreads, we enforce not waiting on the tty lock since that could block progress also. You are checking this for all threads not just NJTs. Is the comment wrong or the code? ------------- PR: https://git.openjdk.java.net/jdk/pull/5684 From minqi at openjdk.java.net Wed Sep 29 04:38:34 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Wed, 29 Sep 2021 04:38:34 GMT Subject: RFR: 8273152: Store base archive path in CDSFileMapHeaderBase [v3] In-Reply-To: References: Message-ID: On Thu, 23 Sep 2021 16:29:22 GMT, Yumin Qi wrote: >> Store base archive path offset in CDSFileMapHeaderBase (which should be invariant in evolving versions) so we can read the base archive name reliably from dynamic archive even with variant header sizes over versions. >> >> tests: tier1-4 >> >> Thanks >> Yumin > > Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: > > Moved _base_archive_name_size to CDSFileMapHeaderBase and made checking consistency in function check_archive The patch will be undergo more modification to the header file. A new patch will include the new design and this is closed without further work. ------------- PR: https://git.openjdk.java.net/jdk/pull/5584 From minqi at openjdk.java.net Wed Sep 29 04:38:35 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Wed, 29 Sep 2021 04:38:35 GMT Subject: Withdrawn: 8273152: Store base archive path in CDSFileMapHeaderBase In-Reply-To: References: Message-ID: On Mon, 20 Sep 2021 15:58:54 GMT, Yumin Qi wrote: > Store base archive path offset in CDSFileMapHeaderBase (which should be invariant in evolving versions) so we can read the base archive name reliably from dynamic archive even with variant header sizes over versions. > > tests: tier1-4 > > Thanks > Yumin This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5584 From dholmes at openjdk.java.net Wed Sep 29 06:14:37 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 29 Sep 2021 06:14:37 GMT Subject: RFR: JDK-8274320: os::fork_and_exec() should be using posix_spawn In-Reply-To: <5hepN-Ub74DMHnpbM_TdPaHmI1zEQddSobpy6AIlT98=.11c35eb4-02c2-4bcc-8153-d07b282f3da3@github.com> References: <5hepN-Ub74DMHnpbM_TdPaHmI1zEQddSobpy6AIlT98=.11c35eb4-02c2-4bcc-8153-d07b282f3da3@github.com> Message-ID: <2oeJU-Vvp6c5itsSq0AhrOBDIFONQqQdLdiCyg9ny4M=.6129e715-11e1-48d1-9b5a-4419cfe17924@github.com> On Sat, 25 Sep 2021 16:16:29 GMT, Thomas Stuefe wrote: > Hi, may I have reviews for this small patch please? > > `os::fork_and_exec()`, used in the hotspot to spawn child programs (scripts etc) in error situations, should be using `posix_spawn()`. > > ATM it uses either `fork()` or `vfork()`. `vfork()` got deprecated on MacOS and we get build errors (JDK-8274293) - even though in this case it would be completely fine to use. This leaves us with `fork()` for MacOS, which has the known problems with large-footprint-parents. This matters here especially since we also use os::fork_and_exec to implement `-XX:OnError` for OOM situations. > > We already use posix_spawn() as default for Runtime.exec() since JDK 15, and it is available on all our Unices. We also should use it here. > > I kept the name of the function (fork_and_exec) since people know it, even though it's more incorrect now than before. > > Tests: > - manual tests using -XX:OnError with various scripts, including checking that env variables are passed correctly > - manually ran runtime/ErrorHandling tests > - GHAs Hi Thomas, There is a crucial difference between the requirements of os::fork_and_exec versus the Java Runtime.exec call - in the VM we need to use an async-signal-safe function where possible. fork() is async-signal-safe but posix_spawn is not. Cheers, David ------------- PR: https://git.openjdk.java.net/jdk/pull/5698 From mbaesken at openjdk.java.net Wed Sep 29 07:20:31 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Wed, 29 Sep 2021 07:20:31 GMT Subject: RFR: JDK-8274434: move os::get_default_process_handle and os::dll_lookup to os_posix for POSIX platforms In-Reply-To: References: <4Dt5972d0-anhV1jfU2BCrcaaANGedVnxNkrFjPz34M=.55c5f633-a698-4c33-898c-bacb1127075e@github.com> Message-ID: On Wed, 29 Sep 2021 03:58:11 GMT, David Holmes wrote: >> Hello, please review this small change. >> The os::get_default_process_handle and os::dll_lookup functions are pretty similar across the POSIX platforms so they can be moved to os_posix.cpp. > > src/hotspot/os/posix/os_posix.cpp line 646: > >> 644: // MacOS X needs to use RTLD_FIRST instead of RTLD_LAZY >> 645: // to avoid finding unexpected symbols on second (or later) >> 646: // loads of a library. > > I find this a puzzling comment. RTLD_FIRST is not used instead of RTLD_LAZY it is used with it. RTLD_FIRST simply limits how dlsym will perform a search using the handle that dlopen returns. Second it is trying to protect against something that will happen on other Posix systems anyway, so can't really be a bug. So I have to question whether we really need to special case this code for macOS? hi David, thanks for your comment and questions. Maybe some Mac expert could comment why the special handling was needed ? Indeed it would be good to remove the special handling and have the same code on all Posix platforms. Best regards, Matthias ------------- PR: https://git.openjdk.java.net/jdk/pull/5737 From rehn at openjdk.java.net Wed Sep 29 08:02:00 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Wed, 29 Sep 2021 08:02:00 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock [v4] In-Reply-To: References: Message-ID: > We should not do any processing in SM::should_process(). > The query is used to determine if we need to process safepoint/handshakes and with this change StackWaterMark. > When locking a Mutex which may be acquired in such processing, we must release that Mutex before we can start processing, otherwise we can deadlock. > > This change adds a method to determine if StackWaterMarkSet::on_safepoint() will do any processing. > In that case there are poll is armed, we do not allow suspend handshakes and there is no safepoint and no non-suspend handshakes, we still return true if StackWaterMarkSet needs processing. > Thus the code querying should release any such Mutex and call process SM::process_if_requested(). > > The cross_modify_fence() do not have any such state, so we still need to emit that before returning false if poll is armed. > > Passes t1-t4 and local stressing. Robbin Ehn 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 seven additional commits since the last revision: - Fixed comment - Merge branch 'master' into 8273695-swm-should-proc - Fixed spelling - Merge branch 'master' into 8273695-swm-should-proc - Added update poll values and fixed PR comments - Removed string dedup test from problem list - Check SWS for processing ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5613/files - new: https://git.openjdk.java.net/jdk/pull/5613/files/e5b52cda..72b98111 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5613&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5613&range=02-03 Stats: 16153 lines in 342 files changed: 12065 ins; 1711 del; 2377 mod Patch: https://git.openjdk.java.net/jdk/pull/5613.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5613/head:pull/5613 PR: https://git.openjdk.java.net/jdk/pull/5613 From rehn at openjdk.java.net Wed Sep 29 08:02:02 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Wed, 29 Sep 2021 08:02:02 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock [v3] In-Reply-To: References: Message-ID: On Fri, 24 Sep 2021 18:33:03 GMT, Patricio Chilano Mateo wrote: > LGTM! Thank you @pchilano ! > src/hotspot/share/runtime/safepointMechanism.inline.hpp line 90: > >> 88: // 3: The JavaThread wakes-up from blocked and does not allow suspend. >> 89: // We are now about to avoid processing and thus no cross modify fence will be executed. >> 90: // Therefore we execute it here. > > I would just say we still need to execute this fence in case a safepoint happened while being blocked, and not mention step 1 since as commented above there might be nothing to process. Updated, better? ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From sgehwolf at openjdk.java.net Wed Sep 29 10:09:11 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Wed, 29 Sep 2021 10:09:11 GMT Subject: RFR: 8273216: JCMD does not work across container boundaries with Podman [v2] In-Reply-To: References: Message-ID: > Please review this test fix so as to make it work with podman too. I've tested this with podman 3.3.1 when running as regular user and when running as root. Also tested it with docker on cgroups v1 with root. I don't know how to do rootless docker testing. > > Thoughts? Severin Gehwolf has updated the pull request incrementally with one additional commit since the last revision: Check for podman version >= 3.3.1 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5740/files - new: https://git.openjdk.java.net/jdk/pull/5740/files/7e1ebd85..c8c9c83f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5740&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5740&range=00-01 Stats: 80 lines in 1 file changed: 80 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5740.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5740/head:pull/5740 PR: https://git.openjdk.java.net/jdk/pull/5740 From sgehwolf at openjdk.java.net Wed Sep 29 10:09:12 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Wed, 29 Sep 2021 10:09:12 GMT Subject: RFR: 8273216: JCMD does not work across container boundaries with Podman In-Reply-To: References: Message-ID: On Tue, 28 Sep 2021 21:35:30 GMT, Mikhailo Seledtsov wrote: >> Please review this test fix so as to make it work with podman too. I've tested this with podman 3.3.1 when running as regular user and when running as root. Also tested it with docker on cgroups v1 with root. I don't know how to do rootless docker testing. >> >> Thoughts? > > Also, I checked a Podman version on our test systems: it is earlier/below 3.3.1. Perhaps the conditional guard in the test should check for that as well, and if version is below 3.3.1, we should check if user is root, and throw SkippedException if not? @mseledts Thanks for the review and tests. I've now added a version check for podman. I've run this with 3.3.1 and it works fine in rootless mode. It should start to work for you once you upgrade. Thoughts? ------------- PR: https://git.openjdk.java.net/jdk/pull/5740 From sgehwolf at openjdk.java.net Wed Sep 29 12:58:44 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Wed, 29 Sep 2021 12:58:44 GMT Subject: RFR: 8274506: TestPids.java and TestPidsLimit.java fail with podman run as root Message-ID: Please review this test fix to work around a podman issue[1]. `podman` expects for the "unlimited" option of `--pids-limit` to be `0` whereas `docker` wants `-1`. See the JBS bug for details. Thoughts? Testing: hotspot/jdk container tests with docker and podman. Two pids tests used to fail and pass with the patch. [1] https://github.com/containers/podman/issues/11782 ------------- Commit messages: - 8274506: TestPids.java and TestPidsLimit.java fail with podman run as root Changes: https://git.openjdk.java.net/jdk/pull/5750/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5750&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274506 Stats: 12 lines in 2 files changed: 10 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/5750.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5750/head:pull/5750 PR: https://git.openjdk.java.net/jdk/pull/5750 From mbaesken at openjdk.java.net Wed Sep 29 13:02:39 2021 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Wed, 29 Sep 2021 13:02:39 GMT Subject: RFR: 8274506: TestPids.java and TestPidsLimit.java fail with podman run as root In-Reply-To: References: Message-ID: On Wed, 29 Sep 2021 12:51:00 GMT, Severin Gehwolf wrote: > Please review this test fix to work around a podman issue[1]. `podman` expects for the "unlimited" option of `--pids-limit` to be `0` whereas `docker` wants `-1`. See the JBS bug for details. Thoughts? > > Testing: hotspot/jdk container tests with docker and podman. Two pids tests used to fail and pass with the patch. > > [1] https://github.com/containers/podman/issues/11782 Hello Severin, the test fix looks good to me. Best regards, Matthias ------------- Marked as reviewed by mbaesken (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5750 From sgehwolf at openjdk.java.net Wed Sep 29 16:59:38 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Wed, 29 Sep 2021 16:59:38 GMT Subject: RFR: 8274506: TestPids.java and TestPidsLimit.java fail with podman run as root In-Reply-To: References: Message-ID: On Wed, 29 Sep 2021 12:51:00 GMT, Severin Gehwolf wrote: > Please review this test fix to work around a podman issue[1]. `podman` expects for the "unlimited" option of `--pids-limit` to be `0` whereas `docker` wants `-1`. See the JBS bug for details. Thoughts? > > Testing: hotspot/jdk container tests with docker and podman. Two pids tests used to fail and pass with the patch. > > [1] https://github.com/containers/podman/issues/11782 Thanks for the review! ------------- PR: https://git.openjdk.java.net/jdk/pull/5750 From pchilanomate at openjdk.java.net Wed Sep 29 17:19:36 2021 From: pchilanomate at openjdk.java.net (Patricio Chilano Mateo) Date: Wed, 29 Sep 2021 17:19:36 GMT Subject: RFR: 8273695: Safepoint deadlock on VMOperation_lock [v3] In-Reply-To: References: Message-ID: On Wed, 29 Sep 2021 07:56:35 GMT, Robbin Ehn wrote: >> src/hotspot/share/runtime/safepointMechanism.inline.hpp line 90: >> >>> 88: // 3: The JavaThread wakes-up from blocked and does not allow suspend. >>> 89: // We are now about to avoid processing and thus no cross modify fence will be executed. >>> 90: // Therefore we execute it here. >> >> I would just say we still need to execute this fence in case a safepoint happened while being blocked, and not mention step 1 since as commented above there might be nothing to process. > > Updated, better? Looks good, thanks for the update! ------------- PR: https://git.openjdk.java.net/jdk/pull/5613 From cjplummer at openjdk.java.net Wed Sep 29 18:43:34 2021 From: cjplummer at openjdk.java.net (Chris Plummer) Date: Wed, 29 Sep 2021 18:43:34 GMT Subject: RFR: 8274506: TestPids.java and TestPidsLimit.java fail with podman run as root In-Reply-To: References: Message-ID: On Wed, 29 Sep 2021 12:51:00 GMT, Severin Gehwolf wrote: > Please review this test fix to work around a podman issue[1]. `podman` expects for the "unlimited" option of `--pids-limit` to be `0` whereas `docker` wants `-1`. See the JBS bug for details. Thoughts? > > Testing: hotspot/jdk container tests with docker and podman. Two pids tests used to fail and pass with the patch. > > [1] https://github.com/containers/podman/issues/11782 Marked as reviewed by cjplummer (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5750 From mseledtsov at openjdk.java.net Wed Sep 29 18:54:32 2021 From: mseledtsov at openjdk.java.net (Mikhailo Seledtsov) Date: Wed, 29 Sep 2021 18:54:32 GMT Subject: RFR: 8273216: JCMD does not work across container boundaries with Podman [v2] In-Reply-To: References: Message-ID: On Wed, 29 Sep 2021 10:09:11 GMT, Severin Gehwolf wrote: >> Please review this test fix so as to make it work with podman too. I've tested this with podman 3.3.1 when running as regular user and when running as root. Also tested it with docker on cgroups v1 with root. I don't know how to do rootless docker testing. >> >> Thoughts? > > Severin Gehwolf has updated the pull request incrementally with one additional commit since the last revision: > > Check for podman version >= 3.3.1 Changes look good to me. This version now passes Oracle container testing, thank you. ------------- Marked as reviewed by mseledtsov (Committer). PR: https://git.openjdk.java.net/jdk/pull/5740 From kvn at openjdk.java.net Wed Sep 29 19:27:46 2021 From: kvn at openjdk.java.net (Vladimir Kozlov) Date: Wed, 29 Sep 2021 19:27:46 GMT Subject: RFR: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern In-Reply-To: References: Message-ID: <1TNrE6nHtA1soZLht5HwXl4Hwo23Kf7y6WBZT8x2mMM=.b1e126e1-c1ea-4515-a187-c9ec066ac6c4@github.com> On Sun, 26 Sep 2021 09:55:00 GMT, Jie Fu wrote: > Hi all, > > I tried to build OpenJDK on Cygwin (Windows 2016 + VS2019). > However, I failed with C4474 and C4778 warnings as below: > > Compiling 100 properties into resource bundles for java.desktop > Compiling 3038 files for java.base > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): error C2220: the following warning is treated as an error > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): warning C4778: 'sscanf' : unterminated format string '%255[*\x01\x02\x03\x04\x05\x06\a\b\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~\xe2\x82\xac\xe4\xba\x97\xe5\x84\x8e\xe5\x8e\x97%n' > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): warning C4474: 'sscanf' : too many arguments passed for format string > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): note: placeholders and their parameters expect 1 variadic arguments, but 3 were provided > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): warning C4778: 'sscanf' : unterminated format string '%1022[[);/\x01\x02\x03\x04\x05\x06\a\b\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~\xe2\x82\xac\xe4\xba\x97\xe5\x84\x8e\xe5\x8e%n' > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): warning C4474: 'sscanf' : too many arguments passed for format string > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): note: placeholders and their parameters expect 0 variadic arguments, but 2 were provided > > > The failure is caused by non-ASCII chars in the format string of sscanf [1][2], which is non-portable on our Windows platform. > In fact, these non-ASCII coding also triggers C4819 warning, which had been disabled in JDK-8216154 [3]. > And I also found an article showing that sscanf may fail with non-ASCII in the format string [4]. > > So it would be nice to remove these non-ASCII chars (`\x80 ~ \xef`). > And I think it's safe to do so. > > This is because: > 1) There are actually no non-ASCII chars for package/class/method/signature names. > 2) I don't think there is a use case, in which people will input non-ASCII for `CompileCommand`. > > You may argue that the non-ASCII may be used by the parser itself. > But I didn't find that usage at all. (Please let me know if I miss something.) > > So I suggest to remove these non-ASCII code to make HotSpot to be more portable. > And if we do so, we can also remove the only one `PRAGMA_DISABLE_MSVC_WARNING(4819)` [5]. > > Testing: > - Build tests on Windows > - tier1~3 on Linux/x64 > > Thanks. > Best regards, > Jie > > [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L269 > [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L319 > [3] https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2019-January/032014.html > [4] https://jeffpar.github.io/kbarchive/kb/047/Q47369/ > [5] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L246 This should be discussed with `build` group and may be `runtime` to get more comments. ------------- PR: https://git.openjdk.java.net/jdk/pull/5704 From kvn at openjdk.java.net Wed Sep 29 19:43:36 2021 From: kvn at openjdk.java.net (Vladimir Kozlov) Date: Wed, 29 Sep 2021 19:43:36 GMT Subject: RFR: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern In-Reply-To: References: Message-ID: On Sun, 26 Sep 2021 09:55:00 GMT, Jie Fu wrote: > Hi all, > > I tried to build OpenJDK on Cygwin (Windows 2016 + VS2019). > However, I failed with C4474 and C4778 warnings as below: > > Compiling 100 properties into resource bundles for java.desktop > Compiling 3038 files for java.base > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): error C2220: the following warning is treated as an error > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): warning C4778: 'sscanf' : unterminated format string '%255[*\x01\x02\x03\x04\x05\x06\a\b\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~\xe2\x82\xac\xe4\xba\x97\xe5\x84\x8e\xe5\x8e\x97%n' > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): warning C4474: 'sscanf' : too many arguments passed for format string > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): note: placeholders and their parameters expect 1 variadic arguments, but 3 were provided > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): warning C4778: 'sscanf' : unterminated format string '%1022[[);/\x01\x02\x03\x04\x05\x06\a\b\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~\xe2\x82\xac\xe4\xba\x97\xe5\x84\x8e\xe5\x8e%n' > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): warning C4474: 'sscanf' : too many arguments passed for format string > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): note: placeholders and their parameters expect 0 variadic arguments, but 2 were provided > > > The failure is caused by non-ASCII chars in the format string of sscanf [1][2], which is non-portable on our Windows platform. > In fact, these non-ASCII coding also triggers C4819 warning, which had been disabled in JDK-8216154 [3]. > And I also found an article showing that sscanf may fail with non-ASCII in the format string [4]. > > So it would be nice to remove these non-ASCII chars (`\x80 ~ \xef`). > And I think it's safe to do so. > > This is because: > 1) There are actually no non-ASCII chars for package/class/method/signature names. > 2) I don't think there is a use case, in which people will input non-ASCII for `CompileCommand`. > > You may argue that the non-ASCII may be used by the parser itself. > But I didn't find that usage at all. (Please let me know if I miss something.) > > So I suggest to remove these non-ASCII code to make HotSpot to be more portable. > And if we do so, we can also remove the only one `PRAGMA_DISABLE_MSVC_WARNING(4819)` [5]. > > Testing: > - Build tests on Windows > - tier1~3 on Linux/x64 > > Thanks. > Best regards, > Jie > > [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L269 > [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L319 > [3] https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2019-January/032014.html > [4] https://jeffpar.github.io/kbarchive/kb/047/Q47369/ > [5] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L246 `RANGEBASE` was added by [JDK-6500501](https://bugs.openjdk.java.net/browse/JDK-6500501) and later was modified by [JDK-8027829](https://bugs.openjdk.java.net/browse/JDK-8027829) Note the original comment from 6500501: // The characters allowed in a class or method name. All characters > 0x7f // are allowed in order to handle obfuscated class files (e.g. Volano) ------------- PR: https://git.openjdk.java.net/jdk/pull/5704 From cjplummer at openjdk.java.net Thu Sep 30 00:02:20 2021 From: cjplummer at openjdk.java.net (Chris Plummer) Date: Thu, 30 Sep 2021 00:02:20 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v5] In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Tue, 28 Sep 2021 22:33:32 GMT, Lin Zang wrote: > Dear Chris(@plummercj) and Ralf(@schmelter-sap), may I ask your help to review this fix of JDK-8252842? Thanks! Yes, I will have a look at it. ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From cjplummer at openjdk.java.net Thu Sep 30 04:06:27 2021 From: cjplummer at openjdk.java.net (Chris Plummer) Date: Thu, 30 Sep 2021 04:06:27 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v5] In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Mon, 27 Sep 2021 14:28:43 GMT, Lin Zang wrote: >> The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. >> >> The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. >> >> The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. > > Lin Zang has updated the pull request incrementally with one additional commit since the last revision: > > remove load barrier for JNI local roots The dumper threads related fix looks fine. I don't know enough to verify the GC fix, but I think Per has that covered sufficiently. Likewise for the lock rank issue which Coleen has reviewed. Also, I tested your changes with our tier2 and tier3 CI runs, which is where the failures initially turned up, and they are passing now. ------------- Marked as reviewed by cjplummer (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5681 From jiefu at openjdk.java.net Thu Sep 30 08:34:34 2021 From: jiefu at openjdk.java.net (Jie Fu) Date: Thu, 30 Sep 2021 08:34:34 GMT Subject: RFR: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern In-Reply-To: References: Message-ID: On Wed, 29 Sep 2021 19:40:20 GMT, Vladimir Kozlov wrote: > `RANGEBASE` was added by [JDK-6500501](https://bugs.openjdk.java.net/browse/JDK-6500501) and later was modified by [JDK-8027829](https://bugs.openjdk.java.net/browse/JDK-8027829) > > Note the original comment from 6500501: > > ``` > // The characters allowed in a class or method name. All characters > 0x7f > // are allowed in order to handle obfuscated class files (e.g. Volano) > ``` Thanks @vnkozlov for your very helpful comments. I have one question: how can we specify (non-ascii chars) and (non-printable ascii chars) through `-XX:CompileCommand`? I just learned from https://bugs.openjdk.java.net/browse/JDK-8027829 that we can use unicode like `\uxxxx`. But it doesn't work in my experiments. My example was made from: https://bugs.openjdk.java.net/secure/attachment/17128/UnicodeIdentifierTest.java public class UnicodeIdentifierTest { public static void main(String args[]) { System.out.println("Can I use \\u0001 in identifier name? " + (Character.isJavaIdentifierPart(1) ? "yes" : "no")); for (int i = 0; i < 100000; i++ ) methodWithUnicode\u0001Char(); System.out.println("Can I use \\u00aa in identifier name? " + (Character.isJavaIdentifierPart(0xaa) ? "yes" : "no")); for (int i = 0; i < 100000; i++ ) methodWithUnicode\u00aaChar(); System.out.println("Can I use \\u006b in identifier name? " + (Character.isJavaIdentifierPart(0x6b) ? "yes" : "no")); for (int i = 0; i < 100000; i++ ) methodWithUnicode\u006bChar(); } public static int a = 0; public static void methodWithUnicode\u0001Char() { a++; } public static void methodWithUnicode\u00aaChar() { a++; } public static void methodWithUnicode\u006bChar() { a++; } } And I tried to exclude some specific methods like this ${JDK}/bin/java \ -XX:+PrintCompilation \ -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest::methodWithUnicode\u0001Char"` \ -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest.methodWithUnicode\u0001Char"` \ -XX:CompileCommand=exclude,"UnicodeIdentifierTest.methodWithUnicode\u0001Char" \ -XX:CompileCommand=exclude,'UnicodeIdentifierTest.methodWithUnicode\u0001Char' \ -XX:CompileCommand=exclude,UnicodeIdentifierTest.methodWithUnicode\u0001Char \ -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest::methodWithUnicode\u00aaChar"` \ -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest.methodWithUnicode\u00aaChar"` \ -XX:CompileCommand=exclude,"UnicodeIdentifierTest.methodWithUnicode\u00aaChar" \ -XX:CompileCommand=exclude,'UnicodeIdentifierTest.methodWithUnicode\u00aaChar' \ -XX:CompileCommand=exclude,UnicodeIdentifierTest.methodWithUnicode\u00aaChar \ -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest::methodWithUnicode\u006bChar"` \ -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest.methodWithUnicode\u006bChar"` \ -XX:CompileCommand=exclude,"UnicodeIdentifierTest.methodWithUnicode\u006bChar" \ -XX:CompileCommand=exclude,'UnicodeIdentifierTest.methodWithUnicode\u006bChar' \ -XX:CompileCommand=exclude,UnicodeIdentifierTest.methodWithUnicode\u006bChar \ ${TEST} But none of them worked. So if there is no other way to specify a non-ascii chars, it seems safe to remove the non-ascii code. If I miss something, please let me know. Thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/5704 From sgehwolf at openjdk.java.net Thu Sep 30 08:49:34 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Thu, 30 Sep 2021 08:49:34 GMT Subject: RFR: 8273216: JCMD does not work across container boundaries with Podman In-Reply-To: References: Message-ID: On Tue, 28 Sep 2021 21:35:30 GMT, Mikhailo Seledtsov wrote: >> Please review this test fix so as to make it work with podman too. I've tested this with podman 3.3.1 when running as regular user and when running as root. Also tested it with docker on cgroups v1 with root. I don't know how to do rootless docker testing. >> >> Thoughts? > > Also, I checked a Podman version on our test systems: it is earlier/below 3.3.1. Perhaps the conditional guard in the test should check for that as well, and if version is below 3.3.1, we should check if user is root, and throw SkippedException if not? Thanks for the review, @mseledts. Any (R)eviewers please? ------------- PR: https://git.openjdk.java.net/jdk/pull/5740 From sgehwolf at openjdk.java.net Thu Sep 30 08:56:41 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Thu, 30 Sep 2021 08:56:41 GMT Subject: Integrated: 8274506: TestPids.java and TestPidsLimit.java fail with podman run as root In-Reply-To: References: Message-ID: On Wed, 29 Sep 2021 12:51:00 GMT, Severin Gehwolf wrote: > Please review this test fix to work around a podman issue[1]. `podman` expects for the "unlimited" option of `--pids-limit` to be `0` whereas `docker` wants `-1`. See the JBS bug for details. Thoughts? > > Testing: hotspot/jdk container tests with docker and podman. Two pids tests used to fail and pass with the patch. > > [1] https://github.com/containers/podman/issues/11782 This pull request has now been integrated. Changeset: 94e31e5c Author: Severin Gehwolf URL: https://git.openjdk.java.net/jdk/commit/94e31e5ca51d1c4c253cf7ac5acd950d10c22267 Stats: 12 lines in 2 files changed: 10 ins; 0 del; 2 mod 8274506: TestPids.java and TestPidsLimit.java fail with podman run as root Reviewed-by: mbaesken, cjplummer ------------- PR: https://git.openjdk.java.net/jdk/pull/5750 From ihse at openjdk.java.net Thu Sep 30 10:04:35 2021 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Thu, 30 Sep 2021 10:04:35 GMT Subject: RFR: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern In-Reply-To: References: Message-ID: On Sun, 26 Sep 2021 09:55:00 GMT, Jie Fu wrote: > Hi all, > > I tried to build OpenJDK on Cygwin (Windows 2016 + VS2019). > However, I failed with C4474 and C4778 warnings as below: > > Compiling 100 properties into resource bundles for java.desktop > Compiling 3038 files for java.base > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): error C2220: the following warning is treated as an error > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): warning C4778: 'sscanf' : unterminated format string '%255[*\x01\x02\x03\x04\x05\x06\a\b\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~\xe2\x82\xac\xe4\xba\x97\xe5\x84\x8e\xe5\x8e\x97%n' > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): warning C4474: 'sscanf' : too many arguments passed for format string > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): note: placeholders and their parameters expect 1 variadic arguments, but 3 were provided > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): warning C4778: 'sscanf' : unterminated format string '%1022[[);/\x01\x02\x03\x04\x05\x06\a\b\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~\xe2\x82\xac\xe4\xba\x97\xe5\x84\x8e\xe5\x8e%n' > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): warning C4474: 'sscanf' : too many arguments passed for format string > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): note: placeholders and their parameters expect 0 variadic arguments, but 2 were provided > > > The failure is caused by non-ASCII chars in the format string of sscanf [1][2], which is non-portable on our Windows platform. > In fact, these non-ASCII coding also triggers C4819 warning, which had been disabled in JDK-8216154 [3]. > And I also found an article showing that sscanf may fail with non-ASCII in the format string [4]. > > So it would be nice to remove these non-ASCII chars (`\x80 ~ \xef`). > And I think it's safe to do so. > > This is because: > 1) There are actually no non-ASCII chars for package/class/method/signature names. > 2) I don't think there is a use case, in which people will input non-ASCII for `CompileCommand`. > > You may argue that the non-ASCII may be used by the parser itself. > But I didn't find that usage at all. (Please let me know if I miss something.) > > So I suggest to remove these non-ASCII code to make HotSpot to be more portable. > And if we do so, we can also remove the only one `PRAGMA_DISABLE_MSVC_WARNING(4819)` [5]. > > Testing: > - Build tests on Windows > - tier1~3 on Linux/x64 > > Thanks. > Best regards, > Jie > > [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L269 > [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L319 > [3] https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2019-January/032014.html > [4] https://jeffpar.github.io/kbarchive/kb/047/Q47369/ > [5] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L246 Some misc remarks from a build PoV: * We count language and region settings as a build environment requirement, not a portability issue. * It is really a shame that Microsoft is making changes to these so darned hard. On all other platforms, LC_ALL=C in the make file just fixes the problem. :-( * But we do want the JDK to be easy to build, so this means that we might need to support building on more than en_US on Windows, at least until Microsoft get's their act together. >From what I see in the discussion here there seems to be no clarity in what range of character the specification allows. This needs to be absolutely clear for any changes here -- we can't filter out legal characters just because they are problematic to build on non en_US platforms. However, I'm thinking that you need to take a step back and see what you are really trying to solve. To me, it seems that sscanf is not the right tool for the job, and the fact that it has worked until now is more a lucky coincidence. It seems, from a quick glance, that you should consider the input a byte array, and process it like that, instead of a string, if the encoding is unclear, and the spec is talking about character values (like 0x7f) rather than what characters they are supposed to represent in a specific encoding. ------------- PR: https://git.openjdk.java.net/jdk/pull/5704 From jiefu at openjdk.java.net Thu Sep 30 10:36:39 2021 From: jiefu at openjdk.java.net (Jie Fu) Date: Thu, 30 Sep 2021 10:36:39 GMT Subject: RFR: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern In-Reply-To: References: Message-ID: <6q7r8NP3eoLCV6e0bgbIjHODdfG9q6wNfpqECZZGZeM=.8675d1bb-f627-41b8-97a9-eb1ea721a50b@github.com> On Thu, 30 Sep 2021 10:01:52 GMT, Magnus Ihse Bursie wrote: > Some misc remarks from a build PoV: > > * We count language and region settings as a build environment requirement, not a portability issue. > * It is really a shame that Microsoft is making changes to these so darned hard. On all other platforms, LC_ALL=C in the make file just fixes the problem. :-( > * But we do want the JDK to be easy to build, so this means that we might need to support building on more than en_US on Windows, at least until Microsoft get's their act together. > > From what I see in the discussion here there seems to be no clarity in what range of character the specification allows. This needs to be absolutely clear for any changes here -- we can't filter out legal characters just because they are problematic to build on non en_US platforms. > > However, I'm thinking that you need to take a step back and see what you are really trying to solve. To me, it seems that sscanf is not the right tool for the job, and the fact that it has worked until now is more a lucky coincidence. It seems, from a quick glance, that you should consider the input a byte array, and process it like that, instead of a string, if the encoding is unclear, and the spec is talking about character values (like 0x7f) rather than what characters they are supposed to represent in a specific encoding. Thanks @magicus . The background is that we want to build CI/CD pipelines for Windows platforms to help the OpenJDK development. We already have enough Linux and MacOS pipelines but still not have one for Windows. So we just plan to setup some Windows pipelines to further improve OpenJDK product quality. But to my surprise, OpenJDK fails to build on our Windows platforms. You may suggest changing the locale settings. But many of our Apps don't allow us to changet it since we are non-English speaking country. It's unfortunate that OpenJDK can't build on our Windows platforms. It's not our goal to make CompileCommand work with non-ASCII chars. If it doesn't make anything worse, we can just remove the non-ASCII code to make it to be more portable. ------------- PR: https://git.openjdk.java.net/jdk/pull/5704 From rehn at openjdk.java.net Thu Sep 30 12:16:34 2021 From: rehn at openjdk.java.net (Robbin Ehn) Date: Thu, 30 Sep 2021 12:16:34 GMT Subject: RFR: 8274379: Allow process of unsafe access errors in check_special_condition_for_native_trans In-Reply-To: References: Message-ID: On Tue, 28 Sep 2021 17:23:29 GMT, Patricio Chilano Mateo wrote: > Hi, > > > Please review the following patch to allow processing of unsafe access errors in check_special_condition_for_native_trans(). > > Today we special case unsafe access errors from other async exceptions in that we don't process them when transitioning from native back to Java. Code comments in check_special_condition_for_native_trans() mention that unsafe access errors should not be handled because that may block while creating the exception. But that should not be an issue since we can always make sure we call process_if_requested_with_exit_check() after the call to throw_unsafe_access_internal_error() to process any pending operations not already handled in a ThreadBlockInVM wrapper (today that only means suspend requests and object reallocation operations). > > By removing this special treatment for unsafe access errors we can also simplify the async exception support API. For instance we can remove _async_exception_condition and simplify some of the supporting methods. I also removed the _thread_in_native case from the switch statement in check_and_handle_async_exceptions() since we never call that method in that state. > > Testing by running tiers1-6 in mach5. > > Thanks, > Patricio Marked as reviewed by rehn (Reviewer). Hi @pchilano, Yes this seem like an improvement, so process_if_requested_with_exit_check is the only place were we handle async exceptions. (except JNI) It looks good, but I have I really hard time looking at the diff/code to determine if this behaves differently in any bad ways. I trust you have done the testing needed to be sure. Thanks, Robbin ------------- PR: https://git.openjdk.java.net/jdk/pull/5741 From hseigel at openjdk.java.net Thu Sep 30 12:26:33 2021 From: hseigel at openjdk.java.net (Harold Seigel) Date: Thu, 30 Sep 2021 12:26:33 GMT Subject: RFR: 8273216: JCMD does not work across container boundaries with Podman [v2] In-Reply-To: References: Message-ID: On Wed, 29 Sep 2021 10:09:11 GMT, Severin Gehwolf wrote: >> Please review this test fix so as to make it work with podman too. I've tested this with podman 3.3.1 when running as regular user and when running as root. Also tested it with docker on cgroups v1 with root. I don't know how to do rootless docker testing. >> >> Thoughts? > > Severin Gehwolf has updated the pull request incrementally with one additional commit since the last revision: > > Check for podman version >= 3.3.1 Changes look good. Thanks for fixing this. Harold ------------- Marked as reviewed by hseigel (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5740 From minqi at openjdk.java.net Thu Sep 30 14:43:55 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Thu, 30 Sep 2021 14:43:55 GMT Subject: RFR: 8273152: Refactor CDS FileMapHeader loading code Message-ID: Please review, Refactor fundamental CDS FileMapHeader code for reliable reading of basic info from shared archive. With the change, it makes it possible to read an archive generated by different version of hotspot. Also it is possible to automatically generate a CDS archive If the archive supplied is not readable or fails to pass the check. Tests: tier1-4 jtreg on sa. Thanks Yumin ------------- Commit messages: - Fix comparison between size_t and unsigned int - 8273152: Refactor CDS FileMapHeader loading code Changes: https://git.openjdk.java.net/jdk/pull/5768/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5768&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273152 Stats: 423 lines in 11 files changed: 263 ins; 51 del; 109 mod Patch: https://git.openjdk.java.net/jdk/pull/5768.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5768/head:pull/5768 PR: https://git.openjdk.java.net/jdk/pull/5768 From lzang at openjdk.java.net Thu Sep 30 14:45:37 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Thu, 30 Sep 2021 14:45:37 GMT Subject: RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 [v5] In-Reply-To: References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Mon, 27 Sep 2021 14:28:43 GMT, Lin Zang wrote: >> The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. >> >> The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. >> >> The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. > > Lin Zang has updated the pull request incrementally with one additional commit since the last revision: > > remove load barrier for JNI local roots Thanks all for your help reviewing this patch. I will integrate it. ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From lzang at openjdk.java.net Thu Sep 30 14:48:34 2021 From: lzang at openjdk.java.net (Lin Zang) Date: Thu, 30 Sep 2021 14:48:34 GMT Subject: Integrated: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 In-Reply-To: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> References: <_Q2LQYt4iuP2C0-NdFPbogpOJMDygw415TcvCbaX19Y=.6c0d018e-e4d7-4c73-bc49-dcf90bff39e2@github.com> Message-ID: On Fri, 24 Sep 2021 13:13:39 GMT, Lin Zang wrote: > The root cause for crash in ZGC is that the JNIHandles are processed before object iteration. And ZGC would update the JNIHandles at object iteration with read barrier. So the crash is cause by accessing the invalid address which can be dummy info after zgc, and hence crash. > > The lock rank issue can be fixed because the related mutexes are acquired in safepoint. so the safepoint_check_required could be safepoint_check_always. > > The Epsilon issue is caused by wrong _num_dumper_thread calculated when the gang==NULL. This pull request has now been integrated. Changeset: bfd61634 Author: Lin Zang URL: https://git.openjdk.java.net/jdk/commit/bfd616347126a802c641326a6be5a14c4cd7af90 Stats: 22 lines in 3 files changed: 5 ins; 13 del; 4 mod 8274196: Crashes in VM_HeapDumper::work after JDK-8252842 8274245: sun/tools/jmap/BasicJMapTest.java Mutex rank failures Reviewed-by: coleenp, pliden, cjplummer ------------- PR: https://git.openjdk.java.net/jdk/pull/5681 From sgehwolf at openjdk.java.net Thu Sep 30 15:23:33 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Thu, 30 Sep 2021 15:23:33 GMT Subject: RFR: 8273216: JCMD does not work across container boundaries with Podman [v2] In-Reply-To: References: Message-ID: On Wed, 29 Sep 2021 10:09:11 GMT, Severin Gehwolf wrote: >> Please review this test fix so as to make it work with podman too. I've tested this with podman 3.3.1 when running as regular user and when running as root. Also tested it with docker on cgroups v1 with root. I don't know how to do rootless docker testing. >> >> Thoughts? > > Severin Gehwolf has updated the pull request incrementally with one additional commit since the last revision: > > Check for podman version >= 3.3.1 Thank you, Harold! ------------- PR: https://git.openjdk.java.net/jdk/pull/5740 From sgehwolf at openjdk.java.net Thu Sep 30 15:28:37 2021 From: sgehwolf at openjdk.java.net (Severin Gehwolf) Date: Thu, 30 Sep 2021 15:28:37 GMT Subject: Integrated: 8273216: JCMD does not work across container boundaries with Podman In-Reply-To: References: Message-ID: On Tue, 28 Sep 2021 16:05:15 GMT, Severin Gehwolf wrote: > Please review this test fix so as to make it work with podman too. I've tested this with podman 3.3.1 when running as regular user and when running as root. Also tested it with docker on cgroups v1 with root. I don't know how to do rootless docker testing. > > Thoughts? This pull request has now been integrated. Changeset: 9180d9a2 Author: Severin Gehwolf URL: https://git.openjdk.java.net/jdk/commit/9180d9a2f990e71ca6ac9c14e55a21f7372929ac Stats: 105 lines in 1 file changed: 91 ins; 4 del; 10 mod 8273216: JCMD does not work across container boundaries with Podman Reviewed-by: mseledtsov, hseigel ------------- PR: https://git.openjdk.java.net/jdk/pull/5740 From iklam at openjdk.java.net Thu Sep 30 16:23:33 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 30 Sep 2021 16:23:33 GMT Subject: RFR: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern In-Reply-To: References: Message-ID: On Thu, 30 Sep 2021 08:31:51 GMT, Jie Fu wrote: > > `RANGEBASE` was added by [JDK-6500501](https://bugs.openjdk.java.net/browse/JDK-6500501) and later was modified by [JDK-8027829](https://bugs.openjdk.java.net/browse/JDK-8027829) > > Note the original comment from 6500501: > > ``` > > // The characters allowed in a class or method name. All characters > 0x7f > > // are allowed in order to handle obfuscated class files (e.g. Volano) > > ``` > > Thanks @vnkozlov for your very helpful comments. > > I have one question: how can we specify (non-ascii chars) and (non-printable ascii chars) through `-XX:CompileCommand`? > > I just learned from https://bugs.openjdk.java.net/browse/JDK-8027829 that we can use unicode like `\uxxxx`. But it doesn't work in my experiments. > > My example was made from: https://bugs.openjdk.java.net/secure/attachment/17128/UnicodeIdentifierTest.java > > ``` > public class UnicodeIdentifierTest { > public static void main(String args[]) { > System.out.println("Can I use \\u0001 in identifier name? " + > (Character.isJavaIdentifierPart(1) ? "yes" : "no")); > for (int i = 0; i < 100000; i++ ) > methodWithUnicode\u0001Char(); > > System.out.println("Can I use \\u00aa in identifier name? " + > (Character.isJavaIdentifierPart(0xaa) ? "yes" : "no")); > for (int i = 0; i < 100000; i++ ) > methodWithUnicode\u00aaChar(); > > System.out.println("Can I use \\u006b in identifier name? " + > (Character.isJavaIdentifierPart(0x6b) ? "yes" : "no")); > for (int i = 0; i < 100000; i++ ) > methodWithUnicode\u006bChar(); > > } > public static int a = 0; > public static void methodWithUnicode\u0001Char() { > a++; > } > > public static void methodWithUnicode\u00aaChar() { > a++; > } > > public static void methodWithUnicode\u006bChar() { > a++; > } > } > ``` > > And I tried to exclude some specific methods like this > > ``` > ${JDK}/bin/java \ > -XX:+PrintCompilation \ > -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest::methodWithUnicode\u0001Char"` \ > -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest.methodWithUnicode\u0001Char"` \ > -XX:CompileCommand=exclude,"UnicodeIdentifierTest.methodWithUnicode\u0001Char" \ > -XX:CompileCommand=exclude,'UnicodeIdentifierTest.methodWithUnicode\u0001Char' \ > -XX:CompileCommand=exclude,UnicodeIdentifierTest.methodWithUnicode\u0001Char \ > -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest::methodWithUnicode\u00aaChar"` \ > -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest.methodWithUnicode\u00aaChar"` \ > -XX:CompileCommand=exclude,"UnicodeIdentifierTest.methodWithUnicode\u00aaChar" \ > -XX:CompileCommand=exclude,'UnicodeIdentifierTest.methodWithUnicode\u00aaChar' \ > -XX:CompileCommand=exclude,UnicodeIdentifierTest.methodWithUnicode\u00aaChar \ > -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest::methodWithUnicode\u006bChar"` \ > -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest.methodWithUnicode\u006bChar"` \ > -XX:CompileCommand=exclude,"UnicodeIdentifierTest.methodWithUnicode\u006bChar" \ > -XX:CompileCommand=exclude,'UnicodeIdentifierTest.methodWithUnicode\u006bChar' \ > -XX:CompileCommand=exclude,UnicodeIdentifierTest.methodWithUnicode\u006bChar \ > ${TEST} > ``` > > But none of them worked. > > So if there is no other way to specify a non-ascii chars, it seems safe to remove the non-ascii code. > > If I miss something, please let me know. Thanks. (The Chinese characters in this comment may not be displayed properly inside an e-mail reader. Please see this comment on GitHub https://github.com/openjdk/jdk/pull/5704) -XX:CompileCommand does not process \uxxxx sequences. However, if your shell's locale is UTF8, you can do something like this, by directly entering them on the command-line, without escaping with \u: public class CJK { public static void main(String args[]) { \u722a\u54c7(); } static void \u722a\u54c7() { // Chinese word for "Java" Thread.dumpStack(); } } ======= $ locale LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= $ javac CJK.java $ java -Xcomp -XX:-BackgroundCompilation -XX:CompileCommand='compileonly,*::??' -XX:+PrintCompilation -cp . CJK > log.txt java.lang.Exception: Stack trace at java.base/java.lang.Thread.dumpStack(Thread.java:1380) at CJK.?? (CJK.java:7) at CJK.main(CJK.java:3) $ grep '^ ' log.txt 53 1 b 3 CJK::\u722a\u54c7 (4 bytes) 53 2 b 4 CJK::\u722a\u54c7 (4 bytes) 53 1 3 CJK::\u722a\u54c7 (4 bytes) made not entrant ------------- PR: https://git.openjdk.java.net/jdk/pull/5704 From minqi at openjdk.java.net Thu Sep 30 16:23:34 2021 From: minqi at openjdk.java.net (Yumin Qi) Date: Thu, 30 Sep 2021 16:23:34 GMT Subject: RFR: 8273152: Refactor CDS FileMapHeader loading code [v2] In-Reply-To: References: Message-ID: > Please review, > Refactor fundamental CDS FileMapHeader code for reliable reading of basic info from shared archive. > With the change, it makes it possible to read an archive generated by different version of hotspot. Also it is possible to automatically generate a CDS archive If the archive supplied is not readable or fails to pass the check. > > Tests: tier1-4 > jtreg on sa. > > Thanks > Yumin Yumin Qi has updated the pull request incrementally with one additional commit since the last revision: Fixed miss return after file read failed ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5768/files - new: https://git.openjdk.java.net/jdk/pull/5768/files/eb560883..032e819c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5768&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5768&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/5768.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5768/head:pull/5768 PR: https://git.openjdk.java.net/jdk/pull/5768 From lucy at openjdk.java.net Thu Sep 30 16:33:51 2021 From: lucy at openjdk.java.net (Lutz Schmidt) Date: Thu, 30 Sep 2021 16:33:51 GMT Subject: RFR: JDK-8274434: move os::get_default_process_handle and os::dll_lookup to os_posix for POSIX platforms In-Reply-To: <4Dt5972d0-anhV1jfU2BCrcaaANGedVnxNkrFjPz34M=.55c5f633-a698-4c33-898c-bacb1127075e@github.com> References: <4Dt5972d0-anhV1jfU2BCrcaaANGedVnxNkrFjPz34M=.55c5f633-a698-4c33-898c-bacb1127075e@github.com> Message-ID: On Tue, 28 Sep 2021 11:13:00 GMT, Matthias Baesken wrote: > Hello, please review this small change. > The os::get_default_process_handle and os::dll_lookup functions are pretty similar across the POSIX platforms so they can be moved to os_posix.cpp. Changes look good to me. With respect to the Apple special casing I have requested an opinion from knowledgeable people. I would suggest to wait 24 hours for feedback. ------------- Changes requested by lucy (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5737 From iklam at openjdk.java.net Thu Sep 30 17:56:39 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 30 Sep 2021 17:56:39 GMT Subject: RFR: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern In-Reply-To: References: Message-ID: <4RQ7uX1dWVQYPu8WFnqt0bx4nFoq3ijIUQ6WMSP-INc=.e1274b05-a6e9-4227-9588-08310c3cffac@github.com> On Sun, 26 Sep 2021 09:55:00 GMT, Jie Fu wrote: > Hi all, > > I tried to build OpenJDK on Cygwin (Windows 2016 + VS2019). > However, I failed with C4474 and C4778 warnings as below: > > Compiling 100 properties into resource bundles for java.desktop > Compiling 3038 files for java.base > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): error C2220: the following warning is treated as an error > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): warning C4778: 'sscanf' : unterminated format string '%255[*\x01\x02\x03\x04\x05\x06\a\b\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~\xe2\x82\xac\xe4\xba\x97\xe5\x84\x8e\xe5\x8e\x97%n' > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): warning C4474: 'sscanf' : too many arguments passed for format string > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): note: placeholders and their parameters expect 1 variadic arguments, but 3 were provided > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): warning C4778: 'sscanf' : unterminated format string '%1022[[);/\x01\x02\x03\x04\x05\x06\a\b\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~\xe2\x82\xac\xe4\xba\x97\xe5\x84\x8e\xe5\x8e%n' > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): warning C4474: 'sscanf' : too many arguments passed for format string > e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(319): note: placeholders and their parameters expect 0 variadic arguments, but 2 were provided > > > The failure is caused by non-ASCII chars in the format string of sscanf [1][2], which is non-portable on our Windows platform. > In fact, these non-ASCII coding also triggers C4819 warning, which had been disabled in JDK-8216154 [3]. > And I also found an article showing that sscanf may fail with non-ASCII in the format string [4]. > > So it would be nice to remove these non-ASCII chars (`\x80 ~ \xef`). > And I think it's safe to do so. > > This is because: > 1) There are actually no non-ASCII chars for package/class/method/signature names. > 2) I don't think there is a use case, in which people will input non-ASCII for `CompileCommand`. > > You may argue that the non-ASCII may be used by the parser itself. > But I didn't find that usage at all. (Please let me know if I miss something.) > > So I suggest to remove these non-ASCII code to make HotSpot to be more portable. > And if we do so, we can also remove the only one `PRAGMA_DISABLE_MSVC_WARNING(4819)` [5]. > > Testing: > - Build tests on Windows > - tier1~3 on Linux/x64 > > Thanks. > Best regards, > Jie > > [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L269 > [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L319 > [3] https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2019-January/032014.html > [4] https://jeffpar.github.io/kbarchive/kb/047/Q47369/ > [5] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L246 The current limitations of the MethodMather class are: [1] `parse_method_pattern(char*& line, ...)` requires `line` to be a UTF8-encoded byte sequence. Essentially, this means that for -XX:CompileCommand to support non-ASCII characters, the JVM (and the shell that runs the JVM) must be using UTF8 character encoding. Note that a "locale" contains 3 parts: language, country and character encoding. For example, - en_US.utf8 (English language, United States, UTF8 character encoding) - zh_CN.utf8 (Chinese language, China, UTF8 character encoding) - zh_CN.gbk (Chinese language, China, GBK character encoding) The first two support non-ASCII characters in -XX:CompileCommand, but the third one doesn't. [2] MethodMather uses `sscanf`. It assumes that the JVM is running with UTF8 character encoding because - It uses `char*` strings returned by `sscanf` to compare with the bytes stored in Symbols. This requires `sscanf` to return strings that are encoded in UTF8, because Symbols stores the string with UTF8-encoded bytes. - It relies on range checking by `sscanf` to enforce the following restrictions. However, these restrictions are given with the RANGE macro which is UTF8 encoded bytes (and I suspect that these are incorrect when handling multi-byte UTF8-encoded characters): // '\0' and 0xf0-0xff are disallowed in constant string values // 0x20 ' ', 0x09 '\t' and, 0x2c ',' are used in the matching // 0x5b '[' and 0x5d ']' can not be used because of the matcher // 0x28 '(' and 0x29 ')' are used for the signature // 0x2e '.' is always replaced before the matching // 0x2f '/' is only used in the class name as package separator ================================== Proposed solutions: I don't think we can solve [1] easily. To handle non-ASCII characters that are non encoded in UTF8, we need to call NewPlatformString() in src/java.base/share/native/libjli/java.c. However, this executes Java code, but -XX:CompileCommand needs to be processed before any Java code execution. ==> Proposal: IGNORE it for now. For [2], there are two distinct issues: (a) The restriction checks are invalid when the JVM is running in an non-UTF8 encoding -- this is a moot point because we can't handle [1] anyway, so the data given to sscanf() is already bad. => Proposal: IGNORE it for now (b) VC++ compilation warning when methodMather.cpp is compiled in non-UTF8 environments This is just a warning, and (I think .....) it doesn't change the object file at all. I.e., the literal strings in methodMatcher.obj are exactly the same as if methodMather.cpp is compiled under a UTF8 environment. Proposal: use pragma to disable the warning. Assuming that my analysis for [1] and (a) is correct, there's no reason to fix the sscanf code. Disabling the warnings with pragma is the most painless and easiest way to handle this. @DamonFool could you try this experiment: - Implement the pragma and build two JDKs -- one in a Chinese Windows environment, and another in an English Windows environment - run `strings methodMatcher.obj` and see if the output is identical - run the "CJK" test example in my previous comment, and see if you get identical results with both JDKs - On Windows, you may need to do this to force the terminal to be using UTF8 code page. See https://stackoverflow.com/questions/388490/how-to-use-unicode-characters-in-windows-command-line (If this doesn't work, an alternative is to avoid using sscanf and write our own parser). Thanks ------------- PR: https://git.openjdk.java.net/jdk/pull/5704 From jiefu at openjdk.java.net Thu Sep 30 23:07:31 2021 From: jiefu at openjdk.java.net (Jie Fu) Date: Thu, 30 Sep 2021 23:07:31 GMT Subject: RFR: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern In-Reply-To: <4RQ7uX1dWVQYPu8WFnqt0bx4nFoq3ijIUQ6WMSP-INc=.e1274b05-a6e9-4227-9588-08310c3cffac@github.com> References: <4RQ7uX1dWVQYPu8WFnqt0bx4nFoq3ijIUQ6WMSP-INc=.e1274b05-a6e9-4227-9588-08310c3cffac@github.com> Message-ID: On Thu, 30 Sep 2021 17:53:39 GMT, Ioi Lam wrote: > The current limitations of the MethodMather class are: > > [1] `parse_method_pattern(char*& line, ...)` requires `line` to be a UTF8-encoded byte sequence. Essentially, this means that for -XX:CompileCommand to support non-ASCII characters, the JVM (and the shell that runs the JVM) must be using UTF8 character encoding. > > Note that a "locale" contains 3 parts: language, country and character encoding. For example, > > * en_US.utf8 (English language, United States, UTF8 character encoding) > * zh_CN.utf8 (Chinese language, China, UTF8 character encoding) > * zh_CN.gbk (Chinese language, China, GBK character encoding) > > The first two support non-ASCII characters in -XX:CompileCommand, but the third one doesn't. > > [2] MethodMather uses `sscanf`. It assumes that the JVM is running with UTF8 character encoding because > > * It uses `char*` strings returned by `sscanf` to compare with the bytes stored in Symbols. This requires `sscanf` to return strings that are encoded in UTF8, because Symbols stores the string with UTF8-encoded bytes. > * It relies on range checking by `sscanf` to enforce the following restrictions. However, these restrictions are given with the RANGE macro which is UTF8 encoded bytes (and I suspect that these are incorrect when handling multi-byte UTF8-encoded characters): > > ``` > // '\0' and 0xf0-0xff are disallowed in constant string values > // 0x20 ' ', 0x09 '\t' and, 0x2c ',' are used in the matching > // 0x5b '[' and 0x5d ']' can not be used because of the matcher > // 0x28 '(' and 0x29 ')' are used for the signature > // 0x2e '.' is always replaced before the matching > // 0x2f '/' is only used in the class name as package separator > ``` > > ================================== Proposed solutions: > > I don't think we can solve [1] easily. To handle non-ASCII characters that are non encoded in UTF8, we need to call NewPlatformString() in src/java.base/share/native/libjli/java.c. However, this executes Java code, but -XX:CompileCommand needs to be processed before any Java code execution. ==> Proposal: IGNORE it for now. > > For [2], there are two distinct issues: > > (a) The restriction checks are invalid when the JVM is running in an non-UTF8 encoding -- this is a moot point because we can't handle [1] anyway, so the data given to sscanf() is already bad. => Proposal: IGNORE it for now > > (b) VC++ compilation warning when methodMather.cpp is compiled in non-UTF8 environments > > This is just a warning, and (I think .....) it doesn't change the object file at all. I.e., the literal strings in methodMatcher.obj are exactly the same as if methodMather.cpp is compiled under a UTF8 environment. > > Proposal: use pragma to disable the warning. Assuming that my analysis for [1] and (a) is correct, there's no reason to fix the sscanf code. Disabling the warnings with pragma is the most painless and easiest way to handle this. > > @DamonFool could you try this experiment: > > * Implement the pragma and build two JDKs -- one in a Chinese Windows environment, and another in an English Windows environment > * run `strings methodMatcher.obj` and see if the output is identical > * run the "CJK" test example in my previous comment, and see if you get identical results with both JDKs > > * On Windows, you may need to do this to force the terminal to be using UTF8 code page. See https://stackoverflow.com/questions/388490/how-to-use-unicode-characters-in-windows-command-line > > (If this doesn't work, an alternative is to avoid using sscanf and write our own parser). > > Thanks Thanks @iklam for your excellent analysis. So HotSpot does support non-ASCII chars as names. Then we shouldn't simply remove such non-ASCII code. I will do your experiment next week. This is because it's already our National Day week and I can't find an English Windows machine until next week. I'll let you know the result as soon as possible. Thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/5704 From iklam at openjdk.java.net Thu Sep 30 23:33:39 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Thu, 30 Sep 2021 23:33:39 GMT Subject: RFR: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern In-Reply-To: References: <4RQ7uX1dWVQYPu8WFnqt0bx4nFoq3ijIUQ6WMSP-INc=.e1274b05-a6e9-4227-9588-08310c3cffac@github.com> Message-ID: On Thu, 30 Sep 2021 23:04:17 GMT, Jie Fu wrote: > I will do your experiment next week. This is because it's already our National Day week and I can't find an English Windows machine until next week. I'll let you know the result as soon as possible. Thanks. No need to hurry :-). In case you can't find an English Windows, I think you can use the `chcp 65001` command mentioned in https://stackoverflow.com/questions/388490/how-to-use-unicode-characters-in-windows-command-line to change your command-line window to use the UTF8 codepage. ------------- PR: https://git.openjdk.java.net/jdk/pull/5704 From jiefu at openjdk.java.net Thu Sep 30 23:44:43 2021 From: jiefu at openjdk.java.net (Jie Fu) Date: Thu, 30 Sep 2021 23:44:43 GMT Subject: RFR: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern In-Reply-To: References: <4RQ7uX1dWVQYPu8WFnqt0bx4nFoq3ijIUQ6WMSP-INc=.e1274b05-a6e9-4227-9588-08310c3cffac@github.com> Message-ID: On Thu, 30 Sep 2021 23:30:29 GMT, Ioi Lam wrote: > > I will do your experiment next week. This is because it's already our National Day week and I can't find an English Windows machine until next week. I'll let you know the result as soon as possible. Thanks. > > No need to hurry :-). In case you can't find an English Windows, I think you can use the `chcp 65001` command mentioned in https://stackoverflow.com/questions/388490/how-to-use-unicode-characters-in-windows-command-line to change your command-line window to use the UTF8 codepage. Okay. I also note the warning e:\jiefu\ws\jdk\src\hotspot\share\compiler\methodMatcher.cpp(269): warning C4778: 'sscanf' : unterminated format string '%255[*\x01\x02\x03\x04\x05\x06\a\b\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~\xe2\x82\xac\xe4\xba\x97\xe5\x84\x8e\xe5\x8e\x97%n' It is already different with the original `RANGEBASE` sequence [1]. ~\xe2\x82\xac\xe4\xba\x97\xe5\x84\x8e\xe5\x8e\x97%n vs. "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" \ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" \ "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf" \ "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" \ "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" \ "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" \ "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef" Not sure if this fact is sufficient to say the literal strings will be different in methodMatcher.obj. [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/methodMatcher.cpp#L49 ------------- PR: https://git.openjdk.java.net/jdk/pull/5704