Re: RFR: 8279047: Remove expired flags in JDK 20

2022-06-10 Thread Kim Barrett
On Fri, 10 Jun 2022 13:23:51 GMT, David Holmes wrote: > Expired Flags in 20: > > - FilterSpuriousWakeups > - MinInliningThreshold > - PrefetchFieldsAhead > > No remaining usages in code or tests. > > - UseHeavyMonitors (expired in PRODUCT ONLY) > > As this flag now only exists for debug buil

Re: RFR: 8287363: null pointer should use NULL instead of 0

2022-05-28 Thread Kim Barrett
On Sat, 28 May 2022 03:31:30 GMT, Yasumasa Suenaga wrote: > We found using `0` as `NULL` in java_md_common.c . `0` is not a pointer, so > we should use `NULL` where we want to handle it. > > https://github.com/openjdk/jdk/pull/8646#discussion_r882294076 > > Also I found using `0` as NUL char i

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v10]

2022-05-26 Thread Kim Barrett
On Thu, 26 May 2022 10:55:28 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >> *

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v9]

2022-05-25 Thread Kim Barrett
On Wed, 25 May 2022 09:16:43 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >> *

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-24 Thread Kim Barrett
On Sun, 22 May 2022 16:45:11 GMT, Kim Barrett wrote: >> It might be GCC bug... >> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578 >> >> This issue is for integer literal, but [Comment >> 29](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c29) m

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v8]

2022-05-24 Thread Kim Barrett
On Sun, 22 May 2022 08:40:28 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >> *

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-22 Thread Kim Barrett
On Sun, 22 May 2022 08:45:48 GMT, Yasumasa Suenaga wrote: >> I don't think this warning has anything to do with that NULL check. But I'm >> still not understanding what it is warning about. The "region of size 0" part >> of the warning message seems important, but I'm not (yet?) seeing how it >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-22 Thread Kim Barrett
On Sun, 22 May 2022 08:35:54 GMT, Yasumasa Suenaga wrote: >> `Array::_data` is a pseudo flexible array member. "Pseudo" because C++ >> doesn't have flexible array members. The compiler is completely justified in >> complaining about the apparently out-of-bounds accesses. >> >> There is a "well-k

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-21 Thread Kim Barrett
On Tue, 17 May 2022 12:43:02 GMT, Yasumasa Suenaga wrote: >> src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp >> line 103: >> >>> 101: PRAGMA_STRINGOP_OVERFLOW_IGNORED >>> 102: *dest = op(bits, *dest); >>> 103: PRAGMA_DIAG_POP >> >> I see no stringop here. I

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-21 Thread Kim Barrett
On Tue, 17 May 2022 12:38:55 GMT, Yasumasa Suenaga wrote: >> src/hotspot/share/classfile/classFileParser.cpp line 5970: >> >>> 5968: PRAGMA_STRINGOP_OVERFLOW_IGNORED >>> 5969: _cp->symbol_at_put(hidden_index, _class_name); >>> 5970: PRAGMA_DIAG_POP >> >> I don't understand these warning suppr

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-16 Thread Kim Barrett
On Tue, 17 May 2022 03:05:09 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert change for java.c , parse_manifest.c , LinuxPackage.c > > src/hotspot/sh

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-16 Thread Kim Barrett
On Fri, 13 May 2022 10:02:30 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >> *

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v4]

2022-05-16 Thread Kim Barrett
On Thu, 12 May 2022 18:28:02 GMT, Kim Barrett wrote: >> Thanks for all to review this PR! I think we should separate this issue as >> following: >> >> * Suppress warnings >> * make/modules/java.desktop/lib/Awt2dLibraries.gmk >> * src/hotspot/s

Re: RFR: 8286705: GCC 12 reports use-after-free potential bugs

2022-05-13 Thread Kim Barrett
On Fri, 13 May 2022 09:14:28 GMT, Yasumasa Suenaga wrote: > GCC 12 reports use-after-free potential bugs in below: > > > In function 'find_positions', > inlined from 'find_file' at > /home/ysuenaga/github-forked/jdk/src/java.base/share/native/libjli/parse_manifest.c:364:9: Looks good. --

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v4]

2022-05-12 Thread Kim Barrett
On Thu, 12 May 2022 01:29:13 GMT, Yasumasa Suenaga wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Calculate char offset before realloc() > > Thanks for all to review this PR! I think we should separate this is

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Kim Barrett
On Wed, 11 May 2022 13:56:44 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Avoid pragma error in before GCC 12 > > src/java.base/share/native/libjl

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Kim Barrett
On Wed, 11 May 2022 08:40:21 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >> *

Re: RFR: 8285690: CloneableReference subtest should not throw CloneNotSupportedException [v2]

2022-04-28 Thread Kim Barrett
On Wed, 27 Apr 2022 15:32:35 GMT, Roger Riggs wrote: >> Kim Barrett has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update copyright, @bug list > > LGTM Thanks for reviews @RogerRiggs and @mlc

Integrated: 8285690: CloneableReference subtest should not throw CloneNotSupportedException

2022-04-28 Thread Kim Barrett
On Wed, 27 Apr 2022 09:24:24 GMT, Kim Barrett wrote: > Please review this fix to test/jdk/java/lang/ref/ReferenceClone.java. It was > passing if CloneableReference::clone were to throw CloneNotSupportedException. > That should be a failure. > > Testing: > Locally (linux-

Re: RFR: 8285690: CloneableReference subtest should not throw CloneNotSupportedException [v2]

2022-04-27 Thread Kim Barrett
On Wed, 27 Apr 2022 18:25:27 GMT, Mandy Chung wrote: >> That was my initial thought, but it doesn't work - CNSE is a checked >> exception so must be handled. > >> test() and main will need to declare this checked exception. > > > diff --git a/test/jdk/java/lang/ref/ReferenceClone.java > b/tes

Re: RFR: 8285690: CloneableReference subtest should not throw CloneNotSupportedException [v2]

2022-04-27 Thread Kim Barrett
On Wed, 27 Apr 2022 15:57:34 GMT, Mandy Chung wrote: >> Kim Barrett has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update copyright, @bug list > > test/jdk/java/lang/ref/ReferenceClone.java line

Re: RFR: 8285690: CloneableReference subtest should not throw CloneNotSupportedException [v2]

2022-04-27 Thread Kim Barrett
t; CloneableReference::clone to throw and verified the expected failure gets > reported, unlike before. Kim Barrett has updated the pull request incrementally with one additional commit since the last revision: update copyright, @bug list - Changes: - all: https://git.openjd

RFR: 8285690: CloneableReference subtest should not throw CloneNotSupportedException

2022-04-27 Thread Kim Barrett
Please review this fix to test/jdk/java/lang/ref/ReferenceClone.java. It was passing if CloneableReference::clone were to throw CloneNotSupportedException. That should be a failure. Testing: Locally (linux-x64) verified test still passes. Temporarily changed CloneableReference::clone to throw an

Re: RFR: JDK-8283415: Update java.lang.ref to use sealed classes

2022-03-19 Thread Kim Barrett
On Sat, 19 Mar 2022 22:30:13 GMT, Joe Darcy wrote: > Another refactoring to use sealed classes where possible, this time in the > java.lang.ref package. > > Copyright dates will be updated, if needed, before a push. Looks good. - Marked as reviewed by kbarrett (Reviewer). PR: ht

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Kim Barrett
On Fri, 11 Mar 2022 23:38:10 GMT, Mikael Vidstedt wrote: > Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' may > be used uninitialized [-Werror=maybe-uniniti

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Kim Barrett
On Thu, 17 Mar 2022 08:08:07 GMT, Kim Barrett wrote: >> Background, from JBS: >> >> src/java.base/share/native/libverify/check_code.c: In function >> 'read_all_code': >> src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths&

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Kim Barrett
On Thu, 17 Mar 2022 06:59:01 GMT, David Holmes wrote: >> Background, from JBS: >> >> src/java.base/share/native/libverify/check_code.c: In function >> 'read_all_code': >> src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' >> may be used uninitialized [-Werror=maybe-unin

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Kim Barrett
On Fri, 11 Mar 2022 23:38:10 GMT, Mikael Vidstedt wrote: > Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' may > be used uninitialized [-Werror=maybe-uniniti

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

2022-03-10 Thread Kim Barrett
On Fri, 11 Mar 2022 06:55:23 GMT, Ioi Lam wrote: >> This patch makes the result of "java -Xshare:dump" deterministic: >> - Disabled new Java threads from launching. This is harmless. See comments >> in jvm.cpp >> - Fixed a problem in hashtable ordering in heapShared.cpp >> - BasicHashtableEntry

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

2022-03-10 Thread Kim Barrett
On Fri, 11 Mar 2022 04:56:23 GMT, Ioi Lam wrote: >> This patch makes the result of "java -Xshare:dump" deterministic: >> - Disabled new Java threads from launching. This is harmless. See comments >> in jvm.cpp >> - Fixed a problem in hashtable ordering in heapShared.cpp >> - BasicHashtableEntry

Re: a quick question about String

2022-01-01 Thread Kim Barrett
> On Dec 24, 2021, at 2:46 PM, liangchenb...@gmail.com wrote: > >> Are you saying that new would always create a new object but the GC might >> merge multiple instances of String into a single instance? > > About jvm's string optimizations, jvm may make different string > objects with the same c

Re: RFR: JDK-8276422 Add command-line option to disable finalization [v4]

2021-11-18 Thread Kim Barrett
On Fri, 19 Nov 2021 00:14:18 GMT, Stuart Marks wrote: >> Pretty much what it says. The new option controls a static member in >> InstanceKlass that's consulted to determine whether the finalization >> machinery is activated for instances when a class is loaded. A new native >> method is added

Re: RFR: JDK-8276422 Add command-line option to disable finalization

2021-11-17 Thread Kim Barrett
On Thu, 18 Nov 2021 01:34:36 GMT, Stuart Marks wrote: > Pretty much what it says. The new option controls a static member in > InstanceKlass that's consulted to determine whether the finalization > machinery is activated for instances when a class is loaded. A new native > method is added so t

Re: RFR: JDK-8276422 Add command-line option to disable finalization

2021-11-17 Thread Kim Barrett
On Thu, 18 Nov 2021 06:43:01 GMT, Kim Barrett wrote: >> Pretty much what it says. The new option controls a static member in >> InstanceKlass that's consulted to determine whether the finalization >> machinery is activated for instances when a class is loaded. A new nat

Re: RFR: 8274071: Clean up java.lang.ref comments and documentation

2021-09-21 Thread Kim Barrett
On Tue, 21 Sep 2021 12:05:27 GMT, Pavel Rappo wrote: > This PR fixes an inline comment typo and reduces "overlinking" in a doc > comment in `java.lang.ref.Reference`. Overlinking happens because the > `reachabilityFence` method: > * Links `package-summary.html#reachability` twice. > * Refers

Re: RFR: 8271862: C2 intrinsic for Reference.refersTo() is often not used

2021-08-09 Thread Kim Barrett
On Mon, 9 Aug 2021 13:13:33 GMT, Per Liden wrote: > While fixing JDK-8270626 it was discovered that the C2 intrinsic for > `Reference.refersTo()` is not used as often as one would think. Instead C2 > often prefers using the native implementation, which is much slower which > defeats the purpos

Re: RFR: JDK-8256844: Make NMT late-initializable

2021-07-29 Thread Kim Barrett
On Thu, 29 Jul 2021 22:53:42 GMT, Coleen Phillimore wrote: >> Short: this patch makes NMT available in custom-launcher scenarios and >> during gtests. It simplifies NMT initialization. It adds a lot of >> NMT-specific testing, cleans them up and makes them sideeffect-free. >> >> - >>

Re: RFR: JDK-8256844: Make NMT late-initializable

2021-07-29 Thread Kim Barrett
On Thu, 29 Jul 2021 22:52:07 GMT, Coleen Phillimore wrote: >> Short: this patch makes NMT available in custom-launcher scenarios and >> during gtests. It simplifies NMT initialization. It adds a lot of >> NMT-specific testing, cleans them up and makes them sideeffect-free. >> >> - >>

Re: [jdk17] RFR: JDK-8225667: Clarify the behavior of System::gc w.r.t. reference processing [v2]

2021-06-30 Thread Kim Barrett
On Wed, 30 Jun 2021 22:52:36 GMT, Mandy Chung wrote: >> This spec clarification is a follow-up to >> [JDK-8224760](https://bugs.openjdk.java.net/browse/JDK-8224760?focusedCommentId=14268320&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14268320) >> w.r.t. refer

Re: [jdk17] RFR: JDK-8225667: Clarify the behavior of System::gc w.r.t. reference processing

2021-06-30 Thread Kim Barrett
On Wed, 30 Jun 2021 18:24:24 GMT, Mandy Chung wrote: > This spec clarification is a follow-up to > [JDK-8224760](https://bugs.openjdk.java.net/browse/JDK-8224760?focusedCommentId=14268320&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14268320) > w.r.t. referenc

Re: [jdk17] RFR: JDK-8262841: Clarify the behavior of PhantomReference::refersTo

2021-06-30 Thread Kim Barrett
On Wed, 30 Jun 2021 16:49:44 GMT, Mandy Chung wrote: > `Reference::refersTo` behaves the same for soft, weak, and phantom references > whereas `PhantomReference::get` always returns `null` which is different than > soft and weak references. > > This patch clarifies the specification of `Phant

Re: RFR: 8254598: StringDedupTable should use OopStorage [v5]

2021-05-14 Thread Kim Barrett
On Fri, 14 May 2021 12:40:46 GMT, Zhengyu Gu wrote: >> Kim Barrett has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 10 commits: >> >> - Merge branch 'master' into new_dedup2 >> - fix she

Integrated: 8254598: StringDedupTable should use OopStorage

2021-05-14 Thread Kim Barrett
On Fri, 23 Apr 2021 19:48:47 GMT, Kim Barrett wrote: > Please review this change to the String Deduplication facility. It is being > changed to use OopStorage to hold weak references to relevant objects, > rather than bespoke data structures requiring dedicated processing phases by >

Re: RFR: 8254598: StringDedupTable should use OopStorage [v5]

2021-05-14 Thread Kim Barrett
gs/* > > shenandoah-only: > - gc/shenandoah/jvmti/TestHeapDump.java > - gc/shenandoah/TestStringDedup.java > - gc/shenandoah/TestStringDedupStress.java > > Performance tested baseline, baseline + stringdedup, new with stringdedup, > finding no significant differences. Kim Barrett has

Re: RFR: 8254598: StringDedupTable should use OopStorage [v4]

2021-05-13 Thread Kim Barrett
On Fri, 14 May 2021 04:31:59 GMT, Kim Barrett wrote: >> Please review this change to the String Deduplication facility. It is being >> changed to use OopStorage to hold weak references to relevant objects, >> rather than bespoke data structures requiring dedicated pr

Re: RFR: 8254598: StringDedupTable should use OopStorage [v4]

2021-05-13 Thread Kim Barrett
gs/* > > shenandoah-only: > - gc/shenandoah/jvmti/TestHeapDump.java > - gc/shenandoah/TestStringDedup.java > - gc/shenandoah/TestStringDedupStress.java > > Performance tested baseline, baseline + stringdedup, new with stringdedup, > finding no significant differences. Kim Barrett has upd

Re: RFR: 8254598: StringDedupTable should use OopStorage [v2]

2021-05-13 Thread Kim Barrett
On Wed, 12 May 2021 11:55:08 GMT, Thomas Schatzl wrote: >> Kim Barrett has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - more comment improvements >> - improve naming and comments around injected String

Re: RFR: 8254598: StringDedupTable should use OopStorage [v3]

2021-05-13 Thread Kim Barrett
gs/* > > shenandoah-only: > - gc/shenandoah/jvmti/TestHeapDump.java > - gc/shenandoah/TestStringDedup.java > - gc/shenandoah/TestStringDedupStress.java > > Performance tested baseline, baseline + stringdedup, new with stringdedup, > finding no significant differences. Kim Barrett has u

Re: RFR: 8254598: StringDedupTable should use OopStorage [v2]

2021-05-13 Thread Kim Barrett
On Wed, 12 May 2021 21:13:54 GMT, Albert Mingkun Yang wrote: >> Kim Barrett has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - more comment improvements >> - improve naming and comments around inject

Re: RFR: 8254598: StringDedupTable should use OopStorage [v2]

2021-05-07 Thread Kim Barrett
On Tue, 4 May 2021 11:46:21 GMT, Thomas Schatzl wrote: >> Kim Barrett has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - more comment improvements >> - improve naming and comments around injected String

Re: RFR: 8254598: StringDedupTable should use OopStorage [v2]

2021-05-07 Thread Kim Barrett
On Tue, 4 May 2021 11:47:25 GMT, Thomas Schatzl wrote: >> Kim Barrett has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - more comment improvements >> - improve naming and comments around injected String

Re: RFR: 8254598: StringDedupTable should use OopStorage [v2]

2021-05-07 Thread Kim Barrett
gs/* > > shenandoah-only: > - gc/shenandoah/jvmti/TestHeapDump.java > - gc/shenandoah/TestStringDedup.java > - gc/shenandoah/TestStringDedupStress.java > > Performance tested baseline, baseline + stringdedup, new with stringdedup, > finding no significant differences. Kim Barrett h

Re: RFR: 8254598: StringDedupTable should use OopStorage

2021-05-07 Thread Kim Barrett
On Fri, 23 Apr 2021 19:48:47 GMT, Kim Barrett wrote: > Please review this change to the String Deduplication facility. It is being > changed to use OopStorage to hold weak references to relevant objects, > rather than bespoke data structures requiring dedicated processing phases by >

Re: RFR: 8254598: StringDedupTable should use OopStorage

2021-05-06 Thread Kim Barrett
On Fri, 23 Apr 2021 19:48:47 GMT, Kim Barrett wrote: > Please review this change to the String Deduplication facility. It is being > changed to use OopStorage to hold weak references to relevant objects, > rather than bespoke data structures requiring dedicated processing phases by >

Re: RFR: 8254598: StringDedupTable should use OopStorage

2021-05-01 Thread Kim Barrett
On Wed, 28 Apr 2021 06:44:58 GMT, Ioi Lam wrote: >> src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp line 557: >> >>> 555: // non-latin1, and deduplicating if we find a match. For >>> deduplication we >>> 556: // only care if the arrays consist of the same sequence of bytes

Re: RFR: 8254598: StringDedupTable should use OopStorage

2021-05-01 Thread Kim Barrett
On Sun, 25 Apr 2021 17:32:51 GMT, Zhengyu Gu wrote: >> Please review this change to the String Deduplication facility. It is being >> changed to use OopStorage to hold weak references to relevant objects, >> rather than bespoke data structures requiring dedicated processing phases by >> supporti

Re: RFR: 8254598: StringDedupTable should use OopStorage

2021-05-01 Thread Kim Barrett
On Wed, 28 Apr 2021 00:29:23 GMT, Ioi Lam wrote: >> src/hotspot/share/classfile/stringTable.cpp line 784: >> >>> 782: SharedStringIterator iter(f); >>> 783: _shared_table.iterate(&iter); >>> 784: } >> >> So with this change (somewhere below) do you no longer deduplicate strings >> from the

Re: RFR: 8254598: StringDedupTable should use OopStorage

2021-05-01 Thread Kim Barrett
On Tue, 27 Apr 2021 22:30:04 GMT, Coleen Phillimore wrote: >> Please review this change to the String Deduplication facility. It is being >> changed to use OopStorage to hold weak references to relevant objects, >> rather than bespoke data structures requiring dedicated processing phases by >> s

RFR: 8254598: StringDedupTable should use OopStorage

2021-04-24 Thread Kim Barrett
Please review this change to the String Deduplication facility. It is being changed to use OopStorage to hold weak references to relevant objects, rather than bespoke data structures requiring dedicated processing phases by supporting GCs. (The Shenandoah update was contributed by Zhengyu Gu.) T

Re: RFR: 8264489: Add more logging to LargeCopyWithMark.java

2021-03-31 Thread Kim Barrett
On Wed, 31 Mar 2021 06:56:23 GMT, Stefan Karlsson wrote: > Add more logging to the LargeCopyWithMark.java test, to gather more > information when this test fails with OOME. > > The intention is to gather more info for JDK-8239089. > > I consider this patch trivial, and expect to push it after

Integrated: 8263903: Use Cleaner instead of finalize to auto stop Timer thread

2021-03-23 Thread Kim Barrett
On Sun, 21 Mar 2021 03:53:24 GMT, Kim Barrett wrote: > Please review this change to java.util.Timer, replacing the use of deprecated > finalization-based cleanup with use of java.lang.ref.Cleaner. > > In addition, Timer.cancel now cancels any later execution of the the no >

Re: RFR: 8263903: Use Cleaner instead of finalize to auto stop Timer thread [v4]

2021-03-23 Thread Kim Barrett
ier1 > New AutoStop test verifies the specified cleanup behavior. > (There are existing tests involving Timer.cancel.) Kim Barrett 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/reb

Re: RFR: 8263903: Use Cleaner instead of finalize to auto stop Timer thread [v3]

2021-03-23 Thread Kim Barrett
On Tue, 23 Mar 2021 18:36:24 GMT, Brent Christian wrote: >> Kim Barrett has updated the pull request incrementally with one additional >> commit since the last revision: >> >> make ThreadReaper constructor non-public > > Marked as reviewed by bchristi (Revi

Re: RFR: 8263903: Use Cleaner instead of finalize to auto stop Timer thread [v3]

2021-03-22 Thread Kim Barrett
ier1 > New AutoStop test verifies the specified cleanup behavior. > (There are existing tests involving Timer.cancel.) Kim Barrett has updated the pull request incrementally with one additional commit since the last revision: make ThreadReaper constructor non-public

Re: RFR: 8263903: Use Cleaner instead of finalize to auto stop Timer thread [v2]

2021-03-22 Thread Kim Barrett
On Mon, 22 Mar 2021 07:15:24 GMT, Kim Barrett wrote: >> Please review this change to java.util.Timer, replacing the use of >> deprecated finalization-based cleanup with use of java.lang.ref.Cleaner. >> >> In addition, Timer.cancel now cancels any later execution

Re: RFR: 8263903: Use Cleaner instead of finalize to auto stop Timer thread [v2]

2021-03-22 Thread Kim Barrett
ier1 > New AutoStop test verifies the specified cleanup behavior. > (There are existing tests involving Timer.cancel.) Kim Barrett has updated the pull request incrementally with one additional commit since the last revision: dholmes review - Changes: - all: https://git.

Re: RFR: 8263903: Use Cleaner instead of finalize to auto stop Timer thread

2021-03-21 Thread Kim Barrett
On Sun, 21 Mar 2021 22:57:10 GMT, David Holmes wrote: >> Please review this change to java.util.Timer, replacing the use of >> deprecated finalization-based cleanup with use of java.lang.ref.Cleaner. >> >> In addition, Timer.cancel now cancels any later execution of the the no >> longer releva

Re: RFR: 8263903: Use Cleaner instead of finalize to auto stop Timer thread

2021-03-21 Thread Kim Barrett
On Sun, 21 Mar 2021 22:49:37 GMT, David Holmes wrote: >> Please review this change to java.util.Timer, replacing the use of >> deprecated finalization-based cleanup with use of java.lang.ref.Cleaner. >> >> In addition, Timer.cancel now cancels any later execution of the the no >> longer releva

RFR: 8263903: Use Cleaner instead of finalize to auto stop Timer thread

2021-03-20 Thread Kim Barrett
Please review this change to java.util.Timer, replacing the use of deprecated finalization-based cleanup with use of java.lang.ref.Cleaner. In addition, Timer.cancel now cancels any later execution of the the no longer relevant cleanup. Testing: mach5 tier1 New AutoStop test verifies the specif

Integrated: 8132984: incorrect type for Reference.discovered

2021-01-19 Thread Kim Barrett
On Sat, 26 Dec 2020 03:25:51 GMT, Kim Barrett wrote: > Please review this change which fixes the type of the private > Reference.discovered field. It was Reference, but that's wrong because > it can be any Reference object. > > I've changed it to Reference and let th

Re: RFR: 8132984: incorrect type for Reference.discovered [v4]

2021-01-19 Thread Kim Barrett
ding the discovered field, > could be moved into a non-public, non-generic, sealed(?) base class of > Reference. The pending list handling has nothing to do with the generic > parameter T. > > Testing: > mach5 tier1 and tier4 (tier4 is where vmTestbase_vm_gc_ref tests are run)

Re: RFR: 8132984: incorrect type for Reference.discovered [v3]

2021-01-19 Thread Kim Barrett
On Tue, 19 Jan 2021 11:15:17 GMT, Peter Levart wrote: >> Kim Barrett has updated the pull request incrementally with one additional >> commit since the last revision: >> >> plevart improvement > > This looks good. Thanks @plevart , @rkennke , @RogerRi

Re: RFR: 8132984: incorrect type for Reference.discovered [v3]

2021-01-18 Thread Kim Barrett
ding the discovered field, > could be moved into a non-public, non-generic, sealed(?) base class of > Reference. The pending list handling has nothing to do with the generic > parameter T. > > Testing: > mach5 tier1 and tier4 (tier4 is where vmTestbase_vm_gc_ref tests are r

Re: RFR: 8132984: incorrect type for Reference.discovered

2021-01-18 Thread Kim Barrett
> On Jan 18, 2021, at 12:28 PM, Peter Levart wrote: > If you introduce a private method in Reference: > >private void enqueueFromPending() { >var q = queue; >if (q != ReferenceQueue.NULL) q.enqueue(this); >} > > ...and use it Reference.processPendingReferences while loop

Re: RFR: 8132984: incorrect type for Reference.discovered [v2]

2021-01-18 Thread Kim Barrett
ding the discovered field, > could be moved into a non-public, non-generic, sealed(?) base class of > Reference. The pending list handling has nothing to do with the generic > parameter T. > > Testing: > mach5 tier1 and tier4 (tier4 is where vmTestbase_vm_gc_ref tests are run)

RFR: 8132984: incorrect type for Reference.discovered

2020-12-25 Thread Kim Barrett
Please review this change which fixes the type of the private Reference.discovered field. It was Reference, but that's wrong because it can be any Reference object. I've changed it to Reference and let that flow through, updating some other variables that were previously somewhat incorrectly type

Re: RFR: 8257876: Avoid Reference.isEnqueued in tests [v3]

2020-12-10 Thread Kim Barrett
On Tue, 8 Dec 2020 17:30:11 GMT, Mandy Chung wrote: >> Kim Barrett 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 addi

Integrated: 8257876: Avoid Reference.isEnqueued in tests

2020-12-10 Thread Kim Barrett
On Tue, 8 Dec 2020 09:52:51 GMT, Kim Barrett wrote: > Please review this change that eliminates the use of Reference.isEnqueued by > tests. There were three tests using it: > > vmTestbase/gc/gctests/ReferencesGC/ReferencesGC.java > vmTestbase/gc/gctests/WeakReferenceGC/WeakR

Re: RFR: 8257876: Avoid Reference.isEnqueued in tests [v3]

2020-12-10 Thread Kim Barrett
d the failure checks were made stronger. > > Testing: > mach5 tier1 > Locally (linux-x64) ran all three tests with each GC (including Shenandoah). Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelate

Re: RFR: 8257876: Avoid Reference.isEnqueued in tests [v2]

2020-12-10 Thread Kim Barrett
d the failure checks were made stronger. > > Testing: > mach5 tier1 > Locally (linux-x64) ran all three tests with each GC (including Shenandoah). Kim Barrett has updated the pull request incrementally with one additional commit since the last revision: move REMOVE and RETAIN dec

Re: RFR: 8257876: Avoid Reference.isEnqueued in tests [v2]

2020-12-10 Thread Kim Barrett
On Wed, 9 Dec 2020 13:59:09 GMT, Thomas Schatzl wrote: >> test/jdk/java/lang/ref/ReferenceEnqueue.java line 58: >> >>> 56: for (int i = 0; i < iterations; i++) { >>> 57: System.gc(); >>> 58: enqueued = (queue.remove(100) == ref); >> >> The code does n

Re: RFR: 8257876: Avoid Reference.isEnqueued in tests

2020-12-10 Thread Kim Barrett
On Wed, 9 Dec 2020 13:26:04 GMT, Thomas Schatzl wrote: >> Please review this change that eliminates the use of Reference.isEnqueued by >> tests. There were three tests using it: >> >> vmTestbase/gc/gctests/ReferencesGC/ReferencesGC.java >> vmTestbase/gc/gctests/WeakReferenceGC/WeakReferenceGC.j

Re: RFR: 8257876: Avoid Reference.isEnqueued in tests

2020-12-10 Thread Kim Barrett
On Wed, 9 Dec 2020 13:28:44 GMT, Thomas Schatzl wrote: >> Please review this change that eliminates the use of Reference.isEnqueued by >> tests. There were three tests using it: >> >> vmTestbase/gc/gctests/ReferencesGC/ReferencesGC.java >> vmTestbase/gc/gctests/WeakReferenceGC/WeakReferenceGC.j

Re: RFR: 8052260: Reference.isEnqueued() spec does not match the long-standing behavior returning true iff it's in the ref queue [v3]

2020-12-09 Thread Kim Barrett
On Tue, 8 Dec 2020 20:42:52 GMT, Mandy Chung wrote: >> `Reference::isEnqueued` method was never implemented as it was initially >> specified since 1.2. The specification says that it tests if this reference >> object has been enqueued, but the long-standing behavior is to test if this >> refer

RFR: 8257876: Avoid Reference.isEnqueued in tests

2020-12-08 Thread Kim Barrett
Please review this change that eliminates the use of Reference.isEnqueued by tests. There were three tests using it: vmTestbase/gc/gctests/ReferencesGC/ReferencesGC.java vmTestbase/gc/gctests/WeakReferenceGC/WeakReferenceGC.java jdk/java/lang/ref/ReferenceEnqueue.java In each of them, some combi

Re: RFR: 8052260: Reference.isEnqueued() spec does not match the long-standing behavior returning true iff it's in the ref queue

2020-12-07 Thread Kim Barrett
On Tue, 8 Dec 2020 02:36:01 GMT, Mandy Chung wrote: > `Reference::isEnqueued` method was never implemented as it was initially > specified since 1.2. The specification says that it tests if this reference > object has been enqueued, but the long-standing behavior is to test if this > reference

Re: RFR: 8256167: Convert JDK use of `Reference::get` to `Reference::refersTo` [v2]

2020-12-04 Thread Kim Barrett
On Fri, 4 Dec 2020 22:38:24 GMT, Mandy Chung wrote: >> This patch replaces some uses of `Reference::get` to `Reference::refersTo` >> to avoid keeping a referent strongly reachable that could cause unnecessary >> delay in collecting such object. I only made change in some but not all >> class

Re: RFR: 8256167: Convert JDK use of `Reference::get` to `Reference::refersTo`

2020-12-04 Thread Kim Barrett
On Thu, 3 Dec 2020 22:54:54 GMT, Mandy Chung wrote: > This patch replaces some uses of `Reference::get` to `Reference::refersTo` to > avoid keeping a referent strongly reachable that could cause unnecessary > delay in collecting such object. I only made change in some but not all > classes i

Re: RFR: 8256517: (ref) Reference.clear during reference processing may lose notification [v3]

2020-11-24 Thread Kim Barrett
-6 > Local (linux-x64) tier1 using Shenandoah. > New TestReferenceClearDuringMarking fails for G1 without these changes. > New TestReferenceClearDuringReferenceProcessing fails for ZGC without these > changes. Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The inc

Integrated: 8256517: (ref) Reference.clear during reference processing may lose notification

2020-11-24 Thread Kim Barrett
On Mon, 23 Nov 2020 01:43:39 GMT, Kim Barrett wrote: > Please review this change to Reference.clear() to address several issues. > > (JDK-8240696) For GCs using a SATB barrier, simply assigning the referent > field to null may extend the lifetime of the referent value. > >

Re: RFR: 8256517: (ref) Reference.clear during reference processing may lose notification [v2]

2020-11-24 Thread Kim Barrett
On Mon, 23 Nov 2020 20:36:57 GMT, Roman Kennke wrote: >> Kim Barrett has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - new tests need ref in oldgen too >> - remove obsolete comment about races with cl

Re: RFR: 8256517: (ref) Reference.clear during reference processing may lose notification [v2]

2020-11-23 Thread Kim Barrett
On Tue, 24 Nov 2020 02:59:50 GMT, Kim Barrett wrote: >> Looks good. Just want to request that you also remove the following comment >> in zReferenceProcessor.cpp, as it's no longer true. >> >> --- a/src/hotspot/share/gc/z/zReferenceProcessor.cpp &g

Re: RFR: 8256517: (ref) Reference.clear during reference processing may lose notification [v2]

2020-11-23 Thread Kim Barrett
-6 > Local (linux-x64) tier1 using Shenandoah. > New TestReferenceClearDuringMarking fails for G1 without these changes. > New TestReferenceClearDuringReferenceProcessing fails for ZGC without these > changes. Kim Barrett has updated the pull request incrementally with two additional commits since the

Re: RFR: 8256517: (ref) Reference.clear during reference processing may lose notification [v2]

2020-11-23 Thread Kim Barrett
On Mon, 23 Nov 2020 12:50:31 GMT, Per Liden wrote: > Looks good. Just want to request that you also remove the following comment > in zReferenceProcessor.cpp, as it's no longer true. > > ``` > --- a/src/hotspot/share/gc/z/zReferenceProcessor.cpp > +++ b/src/hotspot/share/gc/z/zReferenceProcesso

RFR: 8256517: (ref) Reference.clear during reference processing may lose notification

2020-11-22 Thread Kim Barrett
Please review this change to Reference.clear() to address several issues. (JDK-8240696) For GCs using a SATB barrier, simply assigning the referent field to null may extend the lifetime of the referent value. (JDK-8240696) For GCs with concurrent reference processing, clearing the referent field

Re: RFR: 8256370: Add asserts to Reference.getInactive()

2020-11-22 Thread Kim Barrett
On Mon, 16 Nov 2020 18:30:38 GMT, Mandy Chung wrote: >> A follow-up to JDK-8256106, this is adding two asserts to check that the API >> is used as it should be, i.e. only on inactive FinalReferences. Also, in >> Finalizer, where getInactive() is used, there is a null-check. The GC must >> neve

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v6]

2020-11-04 Thread Kim Barrett
On Wed, 4 Nov 2020 09:31:13 GMT, Tagir F. Valeev wrote: > Hello! > > As an IDE developer, I'm thinking about IDE inspection that may suggest the > new method. My idea is to suggest replacing every `ref.get() == obj` with > `ref.refersTo(obj)`. Is this a good idea or there are cases when `ref.g

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v6]

2020-11-04 Thread Kim Barrett
On Wed, 4 Nov 2020 09:31:13 GMT, Tagir F. Valeev wrote: >> The API looks good, thanks for getting this in. > > Hello! > > As an IDE developer, I'm thinking about IDE inspection that may suggest the > new method. My idea is to suggest replacing every `ref.get() == obj` with > `ref.refersTo(obj)

Integrated: 8188055: (ref) Add Reference::refersTo predicate

2020-11-04 Thread Kim Barrett
On Sun, 4 Oct 2020 03:59:59 GMT, Kim Barrett wrote: > Finally returning to this review that was started in April 2020. I've > recast it as a github PR. I think the security concern raised by Gil > has been adequately answered. > https://mail.openjdk.java.net/pipermail/hotspot-

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v7]

2020-11-04 Thread Kim Barrett
plitting avoids that complexity. > > Testing: > mach5 tier1 > Locally (linux-x64) verified the new test passes with various garbage > collectors. Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes t

  1   2   3   >