From egahlin at openjdk.org Fri Aug 1 15:24:55 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Fri, 1 Aug 2025 15:24:55 GMT Subject: RFR: 8364258: ThreadGroup constant pool serialization is not normalized [v6] In-Reply-To: References: Message-ID: On Thu, 31 Jul 2025 21:18:14 GMT, Markus Gr?nlund wrote: >> Greetings, >> >> The following change set normalizes the ThreadGroup constants being serialized to the .jfr binary file. >> >> It does this in two parts: >> >> 1. Re-inserts a scavenging scheme to remove stale (unloaded) ThreadGroups; some logic that we used to have in place, but may have been lost as part of the major refactoring around JFR Event Streaming, or even earlier. >> 2. Introduces a per-epoch "is_serialized" scheme, building on top of JFR epoch generations. >> >> Problem manifestation is a very high number of duplicated TGs (jdk.types.ThreadGroup) as part of JFR checkpoints. >> >> Testing: jdk_jfr >> >> Thanks >> Markus > > Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: > > minimal window Marked as reviewed by egahlin (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26558#pullrequestreview-3079642780 From mgronlun at openjdk.org Fri Aug 1 17:11:46 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Fri, 1 Aug 2025 17:11:46 GMT Subject: RFR: 8364258: ThreadGroup constant pool serialization is not normalized [v7] In-Reply-To: References: Message-ID: > Greetings, > > The following change set normalizes the ThreadGroup constants being serialized to the .jfr binary file. > > It does this in two parts: > > 1. Re-inserts a scavenging scheme to remove stale (unloaded) ThreadGroups; some logic that we used to have in place, but may have been lost as part of the major refactoring around JFR Event Streaming, or even earlier. > 2. Introduces a per-epoch "is_serialized" scheme, building on top of JFR epoch generations. > > Problem manifestation is a very high number of duplicated TGs (jdk.types.ThreadGroup) as part of JFR checkpoints. > > Testing: jdk_jfr > > Thanks > Markus Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: handle no thread groups found ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26558/files - new: https://git.openjdk.org/jdk/pull/26558/files/c73a8f91..d3ae953c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26558&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26558&range=05-06 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26558.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26558/head:pull/26558 PR: https://git.openjdk.org/jdk/pull/26558 From mgronlun at openjdk.org Fri Aug 1 17:45:29 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Fri, 1 Aug 2025 17:45:29 GMT Subject: RFR: 8364258: ThreadGroup constant pool serialization is not normalized [v8] In-Reply-To: References: Message-ID: > Greetings, > > The following change set normalizes the ThreadGroup constants being serialized to the .jfr binary file. > > It does this in two parts: > > 1. Re-inserts a scavenging scheme to remove stale (unloaded) ThreadGroups; some logic that we used to have in place, but may have been lost as part of the major refactoring around JFR Event Streaming, or even earlier. > 2. Introduces a per-epoch "is_serialized" scheme, building on top of JFR epoch generations. > > Problem manifestation is a very high number of duplicated TGs (jdk.types.ThreadGroup) as part of JFR checkpoints. > > Testing: jdk_jfr > > Thanks > Markus Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: do not attempt to serialize a null thread group ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26558/files - new: https://git.openjdk.org/jdk/pull/26558/files/d3ae953c..7738eda8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26558&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26558&range=06-07 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26558.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26558/head:pull/26558 PR: https://git.openjdk.org/jdk/pull/26558 From mgronlun at openjdk.org Fri Aug 1 18:30:56 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Fri, 1 Aug 2025 18:30:56 GMT Subject: RFR: 8364427: JFR: Possible resource leak in Recording::getStream In-Reply-To: References: Message-ID: On Thu, 31 Jul 2025 12:17:47 GMT, Erik Gahlin wrote: > Could I have a review of the PR that fixes resource leaks when Recording::getStream is used? > > Testing: tier1 + test/jdk/jdk/jfr > > Thanks > Erik Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26575#pullrequestreview-3080180909 From mgronlun at openjdk.org Fri Aug 1 18:32:55 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Fri, 1 Aug 2025 18:32:55 GMT Subject: RFR: 8364461: JFR: Default constructor may not be first in setting control In-Reply-To: <2SjUPyQaD3JzmnNE5snHZoDH0d0nhq7_cVbK0f5Ro6Y=.fb77b298-b5a2-47ba-b7b9-6ad4b956fee9@github.com> References: <2SjUPyQaD3JzmnNE5snHZoDH0d0nhq7_cVbK0f5Ro6Y=.fb77b298-b5a2-47ba-b7b9-6ad4b956fee9@github.com> Message-ID: <42_rFeoLa1PTr6qcazu5YPraizfG_T3TdUEdMPZf3XQ=.44419860-b986-4c18-82cd-4ee24ee09f81@github.com> On Thu, 31 Jul 2025 19:24:46 GMT, Erik Gahlin wrote: > Could I have a review of a PR that fixes a bug occurring when a user-defined setting does not have the default constructor first? > > Test: test/jdk/jdk/jfr > > Thanks > Erik Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26582#pullrequestreview-3080184915 From mgronlun at openjdk.org Fri Aug 1 18:32:56 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Fri, 1 Aug 2025 18:32:56 GMT Subject: RFR: 8364257: JFR: User-defined events and settings with a one-letter name cannot be configured In-Reply-To: References: Message-ID: On Tue, 29 Jul 2025 11:43:59 GMT, Erik Gahlin wrote: > Could I have a review of the PR that fixes a bug with short event or setting names? Instead of adding a new test, I modified an existing test so that it uses an event and setting name with one letter. > > Testing: jdk/jdk/jfr > > Thanks > Erik Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26531#pullrequestreview-3080185955 From mgronlun at openjdk.org Fri Aug 1 18:34:55 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Fri, 1 Aug 2025 18:34:55 GMT Subject: RFR: 8364190: JFR: RemoteRecordingStream withers don't work In-Reply-To: <1YtQvtGf1jFNo9abBo1P0zdyctI1EeSN15WazrXX0EM=.0863ddfc-9384-472a-b996-40b1021bc71a@github.com> References: <1YtQvtGf1jFNo9abBo1P0zdyctI1EeSN15WazrXX0EM=.0863ddfc-9384-472a-b996-40b1021bc71a@github.com> Message-ID: On Tue, 29 Jul 2025 20:59:08 GMT, Erik Gahlin wrote: > Could I please have a review of a PR that fixes the RemoteRecordingStream::with-methods? > > Testing: test/jdk/jdk/jfr > > Thanks > Erik Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26540#pullrequestreview-3080189116 From egahlin at openjdk.org Sat Aug 2 07:40:59 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Sat, 2 Aug 2025 07:40:59 GMT Subject: RFR: 8364258: ThreadGroup constant pool serialization is not normalized [v8] In-Reply-To: References: Message-ID: <12hEAV63qGAxWivowB48g9zieX19awQr9X0V3EUASR8=.3643cce7-d6fb-4e4a-80a5-d7c52fb40968@github.com> On Fri, 1 Aug 2025 17:45:29 GMT, Markus Gr?nlund wrote: >> Greetings, >> >> The following change set normalizes the ThreadGroup constants being serialized to the .jfr binary file. >> >> It does this in two parts: >> >> 1. Re-inserts a scavenging scheme to remove stale (unloaded) ThreadGroups; some logic that we used to have in place, but may have been lost as part of the major refactoring around JFR Event Streaming, or even earlier. >> 2. Introduces a per-epoch "is_serialized" scheme, building on top of JFR epoch generations. >> >> Problem manifestation is a very high number of duplicated TGs (jdk.types.ThreadGroup) as part of JFR checkpoints. >> >> Testing: jdk_jfr >> >> Thanks >> Markus > > Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: > > do not attempt to serialize a null thread group Marked as reviewed by egahlin (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26558#pullrequestreview-3080950856 From egahlin at openjdk.org Mon Aug 4 08:54:07 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 4 Aug 2025 08:54:07 GMT Subject: Integrated: 8364257: JFR: User-defined events and settings with a one-letter name cannot be configured In-Reply-To: References: Message-ID: On Tue, 29 Jul 2025 11:43:59 GMT, Erik Gahlin wrote: > Could I have a review of the PR that fixes a bug with short event or setting names? Instead of adding a new test, I modified an existing test so that it uses an event and setting name with one letter. > > Testing: jdk/jdk/jfr > > Thanks > Erik This pull request has now been integrated. Changeset: ea7e9438 Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/ea7e943874288e1cbea10a6bd82d6c7f2a1c9ae0 Stats: 10 lines in 2 files changed: 4 ins; 0 del; 6 mod 8364257: JFR: User-defined events and settings with a one-letter name cannot be configured Reviewed-by: mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26531 From egahlin at openjdk.org Mon Aug 4 09:15:03 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 4 Aug 2025 09:15:03 GMT Subject: Integrated: 8364427: JFR: Possible resource leak in Recording::getStream In-Reply-To: References: Message-ID: <4G6lrGfZ0jRNoJuzvfQvzA1kFHL9GKgRK8nSkg8tVbA=.a0c25800-3172-40e8-9bd8-b2980aae3096@github.com> On Thu, 31 Jul 2025 12:17:47 GMT, Erik Gahlin wrote: > Could I have a review of the PR that fixes resource leaks when Recording::getStream is used? > > Testing: tier1 + test/jdk/jdk/jfr > > Thanks > Erik This pull request has now been integrated. Changeset: cf5a2553 Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/cf5a25538e09e449ff621562df6529abaa9b3685 Stats: 176 lines in 2 files changed: 160 ins; 6 del; 10 mod 8364427: JFR: Possible resource leak in Recording::getStream Reviewed-by: mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26575 From mgronlun at openjdk.org Mon Aug 4 09:47:10 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 4 Aug 2025 09:47:10 GMT Subject: Integrated: 8364258: ThreadGroup constant pool serialization is not normalized In-Reply-To: References: Message-ID: On Wed, 30 Jul 2025 16:08:59 GMT, Markus Gr?nlund wrote: > Greetings, > > The following change set normalizes the ThreadGroup constants being serialized to the .jfr binary file. > > It does this in two parts: > > 1. Re-inserts a scavenging scheme to remove stale (unloaded) ThreadGroups; some logic that we used to have in place, but may have been lost as part of the major refactoring around JFR Event Streaming, or even earlier. > 2. Introduces a per-epoch "is_serialized" scheme, building on top of JFR epoch generations. > > Problem manifestation is a very high number of duplicated TGs (jdk.types.ThreadGroup) as part of JFR checkpoints. > > Testing: jdk_jfr > > Thanks > Markus This pull request has now been integrated. Changeset: 3bc44979 Author: Markus Gr?nlund URL: https://git.openjdk.org/jdk/commit/3bc449797eb59f9770d2a06d260b23b6efd5ff0f Stats: 938 lines in 12 files changed: 431 ins; 482 del; 25 mod 8364258: ThreadGroup constant pool serialization is not normalized Reviewed-by: egahlin ------------- PR: https://git.openjdk.org/jdk/pull/26558 From egahlin at openjdk.org Mon Aug 4 10:28:03 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 4 Aug 2025 10:28:03 GMT Subject: Integrated: 8364461: JFR: Default constructor may not be first in setting control In-Reply-To: <2SjUPyQaD3JzmnNE5snHZoDH0d0nhq7_cVbK0f5Ro6Y=.fb77b298-b5a2-47ba-b7b9-6ad4b956fee9@github.com> References: <2SjUPyQaD3JzmnNE5snHZoDH0d0nhq7_cVbK0f5Ro6Y=.fb77b298-b5a2-47ba-b7b9-6ad4b956fee9@github.com> Message-ID: On Thu, 31 Jul 2025 19:24:46 GMT, Erik Gahlin wrote: > Could I have a review of a PR that fixes a bug occurring when a user-defined setting does not have the default constructor first? > > Test: test/jdk/jdk/jfr > > Thanks > Erik This pull request has now been integrated. Changeset: b96b9c3d Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/b96b9c3d5b2ffaeaa365b2f0d33674a980c96547 Stats: 28 lines in 2 files changed: 20 ins; 7 del; 1 mod 8364461: JFR: Default constructor may not be first in setting control Reviewed-by: mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26582 From egahlin at openjdk.org Mon Aug 4 10:44:03 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 4 Aug 2025 10:44:03 GMT Subject: Integrated: 8364190: JFR: RemoteRecordingStream withers don't work In-Reply-To: <1YtQvtGf1jFNo9abBo1P0zdyctI1EeSN15WazrXX0EM=.0863ddfc-9384-472a-b996-40b1021bc71a@github.com> References: <1YtQvtGf1jFNo9abBo1P0zdyctI1EeSN15WazrXX0EM=.0863ddfc-9384-472a-b996-40b1021bc71a@github.com> Message-ID: On Tue, 29 Jul 2025 20:59:08 GMT, Erik Gahlin wrote: > Could I please have a review of a PR that fixes the RemoteRecordingStream::with-methods? > > Testing: test/jdk/jdk/jfr > > Thanks > Erik This pull request has now been integrated. Changeset: da0d9598 Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/da0d9598d049b17c04da95b61214b093c97fb60e Stats: 151 lines in 3 files changed: 143 ins; 0 del; 8 mod 8364190: JFR: RemoteRecordingStream withers don't work Reviewed-by: mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26540 From egahlin at openjdk.org Mon Aug 4 10:57:00 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 4 Aug 2025 10:57:00 GMT Subject: Integrated: 8364316: JFR: Incorrect validation of mirror fields In-Reply-To: <2Q9ZF_yZPfqfYRsbDMs4gJggYIQPG7ui3ck7IhdaLKg=.b8f4b3f3-1bb8-4d15-9f1a-ccc13c12e39c@github.com> References: <2Q9ZF_yZPfqfYRsbDMs4gJggYIQPG7ui3ck7IhdaLKg=.b8f4b3f3-1bb8-4d15-9f1a-ccc13c12e39c@github.com> Message-ID: On Tue, 29 Jul 2025 20:50:33 GMT, Erik Gahlin wrote: > Could I please have a review of a PR that fixes a bug in the mirror field validation? > > Testing: jdk/jdk/jfr > > Thanks > Erik This pull request has now been integrated. Changeset: 68a4396d Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/68a4396dbc1f7bc02fea91934fc71366ad879637 Stats: 57 lines in 3 files changed: 6 ins; 30 del; 21 mod 8364316: JFR: Incorrect validation of mirror fields Reviewed-by: shade, mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26539 From egahlin at openjdk.org Mon Aug 4 12:26:53 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 4 Aug 2025 12:26:53 GMT Subject: [jdk25] RFR: 8364258: ThreadGroup constant pool serialization is not normalized In-Reply-To: References: Message-ID: On Mon, 4 Aug 2025 09:52:42 GMT, Markus Gr?nlund wrote: > 8364258: ThreadGroup constant pool serialization is not normalized Marked as reviewed by egahlin (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26618#pullrequestreview-3083961842 From mgronlun at openjdk.org Mon Aug 4 14:55:03 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 4 Aug 2025 14:55:03 GMT Subject: [jdk25] Integrated: 8364258: ThreadGroup constant pool serialization is not normalized In-Reply-To: References: Message-ID: On Mon, 4 Aug 2025 09:52:42 GMT, Markus Gr?nlund wrote: > 8364258: ThreadGroup constant pool serialization is not normalized This pull request has now been integrated. Changeset: 1e2bf070 Author: Markus Gr?nlund URL: https://git.openjdk.org/jdk/commit/1e2bf070f0cb9e852839347d1f5711c583091d85 Stats: 938 lines in 12 files changed: 431 ins; 482 del; 25 mod 8364258: ThreadGroup constant pool serialization is not normalized Reviewed-by: egahlin Backport-of: 3bc449797eb59f9770d2a06d260b23b6efd5ff0f ------------- PR: https://git.openjdk.org/jdk/pull/26618 From egahlin at openjdk.org Mon Aug 4 22:31:26 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 4 Aug 2025 22:31:26 GMT Subject: RFR: 8364667: JFR: Throttle doesn't work with dynamic events Message-ID: Could I have a review of a PR that fixes a bug with dynamic events and the new `@Throttle` annotation? If a class is in the boot class loader (isJDK), it only checks for a static commit method and does not check if the `@Throttle` annotation exists (which it does for dynamic events). I added a test, and I also noticed that there is no check to see if there are zero events when shouldCommit is false, so I added that as well. Testing: jdk/jdk/jfr Thanks Erik ------------- Commit messages: - Move test in file - Initial Changes: https://git.openjdk.org/jdk/pull/26632/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26632&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364667 Stats: 52 lines in 3 files changed: 46 ins; 4 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/26632.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26632/head:pull/26632 PR: https://git.openjdk.org/jdk/pull/26632 From thomas.stuefe at gmail.com Tue Aug 5 08:14:18 2025 From: thomas.stuefe at gmail.com (=?UTF-8?Q?Thomas_St=C3=BCfe?=) Date: Tue, 5 Aug 2025 10:14:18 +0200 Subject: How to add platform-specific metrics? Message-ID: Hi, short JFR question: Is there an accepted way to add OS/Arch/Runtime-specific metrics, exclude them where they don't make sense (both in JFR and JMC), and name them clearly as what they are? One example of many: "glibc memory retention". >From what I see, everything I add would have to be forced through some platform-agnostic lens? As in, find some umbrella name for it over all configurations (OSes/libc variants/Architectures), even if the metric makes no sense on other configurations. Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From mgronlun at openjdk.org Tue Aug 5 11:58:03 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Tue, 5 Aug 2025 11:58:03 GMT Subject: RFR: 8364667: JFR: Throttle doesn't work with dynamic events In-Reply-To: References: Message-ID: On Mon, 4 Aug 2025 22:20:15 GMT, Erik Gahlin wrote: > Could I have a review of a PR that fixes a bug with dynamic events and the new `@Throttle` annotation? > > If a class is in the boot class loader (isJDK), it only checks for a static commit method and does not check if the `@Throttle` annotation exists (which it does for dynamic events). > > I added a test, and I also noticed that there is no check to see if there are zero events when shouldCommit is false, so I added that as well. > > Testing: jdk/jdk/jfr > > Thanks > Erik Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26632#pullrequestreview-3087965161 From thomas.stuefe at gmail.com Tue Aug 5 14:27:58 2025 From: thomas.stuefe at gmail.com (=?UTF-8?Q?Thomas_St=C3=BCfe?=) Date: Tue, 5 Aug 2025 16:27:58 +0200 Subject: How to add platform-specific metrics? In-Reply-To: References: Message-ID: Follow-up question: Is there some process to deprecate/reshape Events? For example, let's say I want to introduce Process vsize and swap as metrics. The most reasonable way would be to group these metrics with RSS and RSSPeak into one event. There is no need for separate Events for these values (it is unlikely that someone ever needs different collection intervals, for example), and these are retrieved in a single operation anyway, so retrieving them all in one go is faster than doing it separately for every metric, and it also prevents polluting the Event space with tons of events. But there are problems: the event name for RSS is "ResidentSetSize". That is probably not a good name for a combined event, which I would name something like "ProcessMemory", with metrics like "rssUsage", "rssPeakUsage", "vsize", "swap", or similar. But this would change the existing ResidentSetSize event. This Event is the base for the RSS chart printed in JMC, so I guess JMC would have to be adapted - but if it is, it won't be able to read old jfr files anymore? So I wonder, how is backward compatibility handled in JFR? Is there a process? Or are we stuck with old decisions forever? Thanks! Kind Regards, Thomas On Tue, Aug 5, 2025 at 10:14?AM Thomas St?fe wrote: > Hi, > > short JFR question: > > Is there an accepted way to add OS/Arch/Runtime-specific metrics, exclude > them where they don't make sense (both in JFR and JMC), and name them > clearly as what they are? One example of many: "glibc memory retention". > > From what I see, everything I add would have to be forced through some > platform-agnostic lens? As in, find some umbrella name for it over all > configurations (OSes/libc variants/Architectures), even if the metric makes > no sense on other configurations. > > Thanks, > > Thomas > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From egahlin at openjdk.org Tue Aug 5 14:36:10 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Tue, 5 Aug 2025 14:36:10 GMT Subject: Integrated: 8364667: JFR: Throttle doesn't work with dynamic events In-Reply-To: References: Message-ID: On Mon, 4 Aug 2025 22:20:15 GMT, Erik Gahlin wrote: > Could I have a review of a PR that fixes a bug with dynamic events and the new `@Throttle` annotation? > > If a class is in the boot class loader (isJDK), it only checks for a static commit method and does not check if the `@Throttle` annotation exists (which it does for dynamic events). > > I added a test, and I also noticed that there is no check to see if there are zero events when shouldCommit is false, so I added that as well. > > Testing: jdk/jdk/jfr > > Thanks > Erik This pull request has now been integrated. Changeset: 8a571ee7 Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/8a571ee7f2d9a46ff485fd9f3658c552e2d20817 Stats: 52 lines in 3 files changed: 46 ins; 4 del; 2 mod 8364667: JFR: Throttle doesn't work with dynamic events Reviewed-by: mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26632 From mbaesken at openjdk.org Thu Aug 7 07:51:13 2025 From: mbaesken at openjdk.org (Matthias Baesken) Date: Thu, 7 Aug 2025 07:51:13 GMT Subject: RFR: 8359690: New test TestCPUTimeSampleThrottling still fails intermittently In-Reply-To: References: Message-ID: On Mon, 28 Jul 2025 13:49:24 GMT, Johannes Bechberger wrote: > This change fixes the issue by making the test independent of the system load. > > Tested both with high and low load. Marked as reviewed by mbaesken (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26506#pullrequestreview-3095860607 From mbaesken at openjdk.org Thu Aug 7 07:51:14 2025 From: mbaesken at openjdk.org (Matthias Baesken) Date: Thu, 7 Aug 2025 07:51:14 GMT Subject: RFR: 8359690: New test TestCPUTimeSampleThrottling still fails intermittently In-Reply-To: <1F_Q_LJmoxqwhtKy0XgOoIpH59WdOzQTleGcU_0xYwI=.b519f39c-3c73-4464-9026-0cd7e6893b32@github.com> References: <1F_Q_LJmoxqwhtKy0XgOoIpH59WdOzQTleGcU_0xYwI=.b519f39c-3c73-4464-9026-0cd7e6893b32@github.com> Message-ID: On Mon, 28 Jul 2025 14:13:23 GMT, Johannes Bechberger wrote: > We're waiting for the test to be successful in our internal queue over a few days. No issues seen any more in the internal tests (at least where the patch was used) . ------------- PR Comment: https://git.openjdk.org/jdk/pull/26506#issuecomment-3162945067 From jbechberger at openjdk.org Thu Aug 7 07:55:18 2025 From: jbechberger at openjdk.org (Johannes Bechberger) Date: Thu, 7 Aug 2025 07:55:18 GMT Subject: Integrated: 8359690: New test TestCPUTimeSampleThrottling still fails intermittently In-Reply-To: References: Message-ID: On Mon, 28 Jul 2025 13:49:24 GMT, Johannes Bechberger wrote: > This change fixes the issue by making the test independent of the system load. > > Tested both with high and low load. This pull request has now been integrated. Changeset: 487cc3c5 Author: Johannes Bechberger URL: https://git.openjdk.org/jdk/commit/487cc3c5be769d15d61cb950137d52ba0eb982b5 Stats: 15 lines in 1 file changed: 3 ins; 7 del; 5 mod 8359690: New test TestCPUTimeSampleThrottling still fails intermittently Reviewed-by: mbaesken ------------- PR: https://git.openjdk.org/jdk/pull/26506 From dcherepanov at openjdk.org Fri Aug 8 10:44:53 2025 From: dcherepanov at openjdk.org (Dmitry Cherepanov) Date: Fri, 8 Aug 2025 10:44:53 GMT Subject: RFR: 8365044: Missing copyright header in Contextual.java Message-ID: Adding missing copyright header to Contextual.java ------------- Commit messages: - 8365044: Missing copyright header in Contextual.java Changes: https://git.openjdk.org/jdk/pull/26693/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26693&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365044 Stats: 25 lines in 1 file changed: 25 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/26693.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26693/head:pull/26693 PR: https://git.openjdk.org/jdk/pull/26693 From egahlin at openjdk.org Sat Aug 9 19:01:12 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Sat, 9 Aug 2025 19:01:12 GMT Subject: RFR: 8365044: Missing copyright header in Contextual.java In-Reply-To: References: Message-ID: On Fri, 8 Aug 2025 10:38:41 GMT, Dmitry Cherepanov wrote: > Adding missing copyright header to Contextual.java Thanks for fixing. ------------- Marked as reviewed by egahlin (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26693#pullrequestreview-3103211822 From dcherepanov at openjdk.org Mon Aug 11 08:22:21 2025 From: dcherepanov at openjdk.org (Dmitry Cherepanov) Date: Mon, 11 Aug 2025 08:22:21 GMT Subject: RFR: 8365044: Missing copyright header in Contextual.java In-Reply-To: References: Message-ID: On Fri, 8 Aug 2025 10:38:41 GMT, Dmitry Cherepanov wrote: > Adding missing copyright header to Contextual.java Thanks for the review ------------- PR Comment: https://git.openjdk.org/jdk/pull/26693#issuecomment-3173712332 From dcherepanov at openjdk.org Mon Aug 11 08:22:22 2025 From: dcherepanov at openjdk.org (Dmitry Cherepanov) Date: Mon, 11 Aug 2025 08:22:22 GMT Subject: Integrated: 8365044: Missing copyright header in Contextual.java In-Reply-To: References: Message-ID: On Fri, 8 Aug 2025 10:38:41 GMT, Dmitry Cherepanov wrote: > Adding missing copyright header to Contextual.java This pull request has now been integrated. Changeset: 10762d40 Author: Dmitry Cherepanov URL: https://git.openjdk.org/jdk/commit/10762d408bba9ce0945100847a8674e7eb7fa75e Stats: 25 lines in 1 file changed: 25 ins; 0 del; 0 mod 8365044: Missing copyright header in Contextual.java Reviewed-by: egahlin ------------- PR: https://git.openjdk.org/jdk/pull/26693 From egahlin at openjdk.org Mon Aug 11 18:46:22 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 11 Aug 2025 18:46:22 GMT Subject: RFR: 8364993: JFR: Disable jdk.ModuleExport in default.jfc Message-ID: <49abVTdv2L9xuM8rZmEtX5FC7YXUqzFWF-cntaIAfzQ=.9ba41da0-9150-45e9-814e-ba5626b526a2@github.com> Could I have a review of a change that disables the ModuleExport event in default.jfc? It can use a significant amount of space in some applications, and the event is not that useful. See the bug for details. Testing: jdk/jdk/jfr Thanks Erik ------------- Commit messages: - Initial Changes: https://git.openjdk.org/jdk/pull/26728/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26728&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364993 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26728.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26728/head:pull/26728 PR: https://git.openjdk.org/jdk/pull/26728 From egahlin at openjdk.org Mon Aug 11 18:47:01 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 11 Aug 2025 18:47:01 GMT Subject: RFR: 8364756: JFR: Improve slow tests Message-ID: Could I have a review of a PR that improves the speed of some of the JFR tests? Thanks Erik ------------- Commit messages: - Revert test change as it did not yield improvement - Initial Changes: https://git.openjdk.org/jdk/pull/26644/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26644&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364756 Stats: 28 lines in 7 files changed: 8 ins; 8 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/26644.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26644/head:pull/26644 PR: https://git.openjdk.org/jdk/pull/26644 From mgronlun at openjdk.org Mon Aug 11 19:36:11 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 11 Aug 2025 19:36:11 GMT Subject: RFR: 8364756: JFR: Improve slow tests In-Reply-To: References: Message-ID: <5f5ErZmkmLCqUM5aYL3M_asoL-7Tui9JqOxttzCWBbQ=.8448d579-5654-4a5c-9079-0280a50c8a6d@github.com> On Tue, 5 Aug 2025 15:20:36 GMT, Erik Gahlin wrote: > Could I have a review of a PR that improves the speed of some of the JFR tests? > > Thanks > Erik Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26644#pullrequestreview-3107490457 From mgronlun at openjdk.org Mon Aug 11 19:38:11 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 11 Aug 2025 19:38:11 GMT Subject: RFR: 8364993: JFR: Disable jdk.ModuleExport in default.jfc In-Reply-To: <49abVTdv2L9xuM8rZmEtX5FC7YXUqzFWF-cntaIAfzQ=.9ba41da0-9150-45e9-814e-ba5626b526a2@github.com> References: <49abVTdv2L9xuM8rZmEtX5FC7YXUqzFWF-cntaIAfzQ=.9ba41da0-9150-45e9-814e-ba5626b526a2@github.com> Message-ID: On Mon, 11 Aug 2025 14:55:47 GMT, Erik Gahlin wrote: > Could I have a review of a change that disables the ModuleExport event in default.jfc? It can use a significant amount of space in some applications, and the event is not that useful. See the bug for details. > > Testing: jdk/jdk/jfr > > Thanks > Erik Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26728#pullrequestreview-3107503495 From mgronlun at openjdk.org Mon Aug 11 20:58:49 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 11 Aug 2025 20:58:49 GMT Subject: RFR: 8365199: Use a set instead of a list as the intermediary Klass* storage to reduce typeset processing Message-ID: Greetings, This change set is a performance improvement to speed up JFR typeset processing. It accomplishes this by using a set instead of a list as the intermediary Klass* storage. Further, the existing JfrSet implementation (currently backed by a linked-list ResizeableResourceHashTable) is optimized to use instead a slimmed open-addressing implementation, premised on the invariant that our sets are key sets. Running the test program attached to the JIRA issue results in a 100% performance improvement in total running time (by reducing the work set of Klass: es being processed by the JFR Recorder Thread). Testing: jdk_jfr, stress tests Thanks Markus ------------- Commit messages: - adjustment - 8365199 Changes: https://git.openjdk.org/jdk/pull/26733/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365199 Stats: 358 lines in 11 files changed: 176 ins; 86 del; 96 mod Patch: https://git.openjdk.org/jdk/pull/26733.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26733/head:pull/26733 PR: https://git.openjdk.org/jdk/pull/26733 From mgronlun at openjdk.org Mon Aug 11 21:41:27 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 11 Aug 2025 21:41:27 GMT Subject: RFR: 8365199: Use a set instead of a list as the intermediary Klass* storage to reduce typeset processing [v2] In-Reply-To: References: Message-ID: > Greetings, > > This change set is a performance improvement to speed up JFR typeset processing. > > It accomplishes this by using a set instead of a list as the intermediary Klass* storage. > > Further, the existing JfrSet implementation (currently backed by a linked-list ResizeableResourceHashTable) is optimized to use instead a slimmed open-addressing implementation, premised on the invariant that our sets are key sets. > > Running the test program attached to the JIRA issue results in a 100% performance improvement in total running time (by reducing the work set of Klass: es being processed by the JFR Recorder Thread). > > Testing: jdk_jfr, stress tests > > Thanks > Markus Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: improved typedef usage and static assert ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26733/files - new: https://git.openjdk.org/jdk/pull/26733/files/dbc9ecd2..02d6f526 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=00-01 Stats: 15 lines in 1 file changed: 3 ins; 1 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/26733.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26733/head:pull/26733 PR: https://git.openjdk.org/jdk/pull/26733 From egahlin at openjdk.org Tue Aug 12 13:46:18 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Tue, 12 Aug 2025 13:46:18 GMT Subject: Integrated: 8364993: JFR: Disable jdk.ModuleExport in default.jfc In-Reply-To: <49abVTdv2L9xuM8rZmEtX5FC7YXUqzFWF-cntaIAfzQ=.9ba41da0-9150-45e9-814e-ba5626b526a2@github.com> References: <49abVTdv2L9xuM8rZmEtX5FC7YXUqzFWF-cntaIAfzQ=.9ba41da0-9150-45e9-814e-ba5626b526a2@github.com> Message-ID: On Mon, 11 Aug 2025 14:55:47 GMT, Erik Gahlin wrote: > Could I have a review of a change that disables the ModuleExport event in default.jfc? It can use a significant amount of space in some applications, and the event is not that useful. See the bug for details. > > Testing: jdk/jdk/jfr > > Thanks > Erik This pull request has now been integrated. Changeset: a382996b Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/a382996bb496d50b4eb5a6be9f61e5c2f8aaae2d Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8364993: JFR: Disable jdk.ModuleExport in default.jfc Reviewed-by: mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26728 From mgronlun at openjdk.org Tue Aug 12 14:10:28 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Tue, 12 Aug 2025 14:10:28 GMT Subject: RFR: 8365199: Use a set instead of a list as the intermediary Klass* storage to reduce typeset processing [v3] In-Reply-To: References: Message-ID: > Greetings, > > This change set is a performance improvement to speed up JFR typeset processing. > > It accomplishes this by using a set instead of a list as the intermediary Klass* storage. > > Further, the existing JfrSet implementation (currently backed by a linked-list ResizeableResourceHashTable) is optimized to use instead a slimmed open-addressing implementation, premised on the invariant that our sets are key sets. > > Running the test program attached to the JIRA issue results in a 100% performance improvement in total running time (by reducing the work set of Klass: es being processed by the JFR Recorder Thread). > > Testing: jdk_jfr, stress tests > > Thanks > Markus Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: increase possible maxsize and extend probe sequence ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26733/files - new: https://git.openjdk.org/jdk/pull/26733/files/02d6f526..c9ed816f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/26733.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26733/head:pull/26733 PR: https://git.openjdk.org/jdk/pull/26733 From mgronlun at openjdk.org Tue Aug 12 14:14:54 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Tue, 12 Aug 2025 14:14:54 GMT Subject: RFR: 8365199: Use a set instead of a list as the intermediary Klass* storage to reduce typeset processing [v4] In-Reply-To: References: Message-ID: > Greetings, > > This change set is a performance improvement to speed up JFR typeset processing. > > It accomplishes this by using a set instead of a list as the intermediary Klass* storage. > > Further, the existing JfrSet implementation (currently backed by a linked-list ResizeableResourceHashTable) is optimized to use instead a slimmed open-addressing implementation, premised on the invariant that our sets are key sets. > > Running the test program attached to the JIRA issue results in a 100% performance improvement in total running time (by reducing the work set of Klass: es being processed by the JFR Recorder Thread). > > Testing: jdk_jfr, stress tests > > Thanks > Markus Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: const ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26733/files - new: https://git.openjdk.org/jdk/pull/26733/files/c9ed816f..c1707f85 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/26733.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26733/head:pull/26733 PR: https://git.openjdk.org/jdk/pull/26733 From egahlin at openjdk.org Tue Aug 12 17:48:16 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Tue, 12 Aug 2025 17:48:16 GMT Subject: Integrated: 8364756: JFR: Improve slow tests In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 15:20:36 GMT, Erik Gahlin wrote: > Could I have a review of a PR that improves the speed of some of the JFR tests? > > Thanks > Erik This pull request has now been integrated. Changeset: 87d73401 Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/87d734012e3130501bfd37b23cee7f5e0a3a476f Stats: 28 lines in 7 files changed: 8 ins; 8 del; 12 mod 8364756: JFR: Improve slow tests Reviewed-by: mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26644 From egahlin at openjdk.org Tue Aug 12 17:49:19 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Tue, 12 Aug 2025 17:49:19 GMT Subject: RFR: 8364556: JFR: Disable SymbolTableStatistics and StringTableStatistics in default.jfc Message-ID: Could I have a review of PR that disabled two events in the default configuration due to the runtime impact. Testing: jdk/jdk/jfr Thanks Erik ------------- Commit messages: - Initial Changes: https://git.openjdk.org/jdk/pull/26620/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26620&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364556 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/26620.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26620/head:pull/26620 PR: https://git.openjdk.org/jdk/pull/26620 From mgronlun at openjdk.org Tue Aug 12 18:57:25 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Tue, 12 Aug 2025 18:57:25 GMT Subject: RFR: 8364556: JFR: Disable SymbolTableStatistics and StringTableStatistics in default.jfc In-Reply-To: References: Message-ID: On Mon, 4 Aug 2025 13:08:48 GMT, Erik Gahlin wrote: > Could I have a review of PR that disabled two events in the default configuration due to the runtime impact. > > Testing: jdk/jdk/jfr > > Thanks > Erik Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26620#pullrequestreview-3112311587 From mgronlun at openjdk.org Wed Aug 13 14:31:01 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Wed, 13 Aug 2025 14:31:01 GMT Subject: RFR: 8365199: Use a set instead of a list as the intermediary Klass* storage to reduce typeset processing [v5] In-Reply-To: References: Message-ID: > Greetings, > > This change set is a performance improvement to speed up JFR typeset processing. > > It accomplishes this by using a set instead of a list as the intermediary Klass* storage. > > Further, the existing JfrSet implementation (currently backed by a linked-list ResizeableResourceHashTable) is optimized to use instead a slimmed open-addressing implementation, premised on the invariant that our sets are key sets. > > Running the test program attached to the JIRA issue results in a 100% performance improvement in total running time (by reducing the work set of Klass: es being processed by the JFR Recorder Thread). > > Testing: jdk_jfr, stress tests > > Thanks > Markus Markus Gr?nlund has updated the pull request incrementally with one additional commit since the last revision: less than or equal to max_initial_size ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26733/files - new: https://git.openjdk.org/jdk/pull/26733/files/c1707f85..9b9db9f2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26733.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26733/head:pull/26733 PR: https://git.openjdk.org/jdk/pull/26733 From jpai at openjdk.org Thu Aug 14 10:42:26 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Thu, 14 Aug 2025 10:42:26 GMT Subject: RFR: 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base Message-ID: Can I please get a review of these change which removes the outdated use of `jdk.internal.javac.ParticipatesInPreview` and the qualified export of `jdk.internal.javac` package? This addresses https://bugs.openjdk.org/browse/JDK-8365533. These qualified exports in `java.base` were added in https://bugs.openjdk.org/browse/JDK-8308753 when ClassFile API was in preview. Starting Java 24, ClassFile API is now a part of Java SE. These affected modules don't use any other preview feature, so there's no longer a need to export the `jdk.internal.javac` package to these modules. tier1, tier2 and tier3 testing of this change completed without any related failures. ------------- Commit messages: - 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base Changes: https://git.openjdk.org/jdk/pull/26776/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26776&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365533 Stats: 27 lines in 7 files changed: 0 ins; 22 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/26776.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26776/head:pull/26776 PR: https://git.openjdk.org/jdk/pull/26776 From egahlin at openjdk.org Thu Aug 14 10:46:17 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Thu, 14 Aug 2025 10:46:17 GMT Subject: Integrated: 8364556: JFR: Disable SymbolTableStatistics and StringTableStatistics in default.jfc In-Reply-To: References: Message-ID: On Mon, 4 Aug 2025 13:08:48 GMT, Erik Gahlin wrote: > Could I have a review of PR that disabled two events in the default configuration due to the runtime impact. > > Testing: jdk/jdk/jfr > > Thanks > Erik This pull request has now been integrated. Changeset: 7698c373 Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/7698c373a684235812c9dc11edd751059f9e8e81 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod 8364556: JFR: Disable SymbolTableStatistics and StringTableStatistics in default.jfc Reviewed-by: mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26620 From duke at openjdk.org Thu Aug 14 12:04:14 2025 From: duke at openjdk.org (ExE Boss) Date: Thu, 14 Aug 2025 12:04:14 GMT Subject: RFR: 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base In-Reply-To: References: Message-ID: On Thu, 14 Aug 2025 10:34:59 GMT, Jaikiran Pai wrote: > Can I please get a review of these change which removes the outdated use of `jdk.internal.javac.ParticipatesInPreview` and the qualified export of `jdk.internal.javac` package? This addresses https://bugs.openjdk.org/browse/JDK-8365533. > > These qualified exports in `java.base` were added in https://bugs.openjdk.org/browse/JDK-8308753 when ClassFile API was in preview. Starting Java 24, ClassFile API is now a part of Java SE. These affected modules don't use any other preview feature, so there's no longer a need to export the `jdk.internal.javac` package to these modules. > > tier1, tier2 and tier3 testing of this change completed without any related failures. See?also ([JDK?8365416]) [JDK?8365416]: https://bugs.openjdk.org/browse/JDK-8365416 "[JDK?8365416] java.desktop no?longer?needs preview?feature?access" ------------- PR Comment: https://git.openjdk.org/jdk/pull/26776#issuecomment-3188202824 From jpai at openjdk.org Thu Aug 14 12:23:12 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Thu, 14 Aug 2025 12:23:12 GMT Subject: RFR: 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base In-Reply-To: References: Message-ID: On Thu, 14 Aug 2025 10:34:59 GMT, Jaikiran Pai wrote: > Can I please get a review of these change which removes the outdated use of `jdk.internal.javac.ParticipatesInPreview` and the qualified export of `jdk.internal.javac` package? This addresses https://bugs.openjdk.org/browse/JDK-8365533. > > These qualified exports in `java.base` were added in https://bugs.openjdk.org/browse/JDK-8308753 when ClassFile API was in preview. Starting Java 24, ClassFile API is now a part of Java SE. These affected modules don't use any other preview feature, so there's no longer a need to export the `jdk.internal.javac` package to these modules. > > tier1, tier2 and tier3 testing of this change completed without any related failures. > See also #26765 ([JDK?8365416](https://bugs.openjdk.org/browse/JDK-8365416)) Right, that's what prompted me to start looking into this. The java.desktop change for which that other PR is open can go ahead independently. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26776#issuecomment-3188258941 From mgronlun at openjdk.org Thu Aug 14 14:30:01 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Thu, 14 Aug 2025 14:30:01 GMT Subject: RFR: 8365199: Use a set instead of a list as the intermediary Klass* storage to reduce typeset processing [v6] In-Reply-To: References: Message-ID: > Greetings, > > This change set is a performance improvement to speed up JFR typeset processing. > > It accomplishes this by using a set instead of a list as the intermediary Klass* storage. > > Further, the existing JfrSet implementation (currently backed by a linked-list ResizeableResourceHashTable) is optimized to use instead a slimmed open-addressing implementation, premised on the invariant that our sets are key sets. > > Running the test program attached to the JIRA issue results in a 100% performance improvement in total running time (by reducing the work set of Klass: es being processed by the JFR Recorder Thread). > > Testing: jdk_jfr, stress tests > > Thanks > Markus Markus Gr?nlund has updated the pull request incrementally with three additional commits since the last revision: - merge error - Merge branch '8365199' of github.com:mgronlun/jdk into 8365199 - use load factor instead of probe sequence ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26733/files - new: https://git.openjdk.org/jdk/pull/26733/files/9b9db9f2..07d9d1ab Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=04-05 Stats: 89 lines in 5 files changed: 32 ins; 23 del; 34 mod Patch: https://git.openjdk.org/jdk/pull/26733.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26733/head:pull/26733 PR: https://git.openjdk.org/jdk/pull/26733 From mgronlun at openjdk.org Thu Aug 14 14:34:57 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Thu, 14 Aug 2025 14:34:57 GMT Subject: RFR: 8365199: Use a set instead of a list as the intermediary Klass* storage to reduce typeset processing [v7] In-Reply-To: References: Message-ID: <7c7XSbWWI8W5rZnvAQiKrPNV2cE8--KIMrTu4uAThn8=.228b1811-4f32-426f-b690-690bc660b52e@github.com> > Greetings, > > This change set is a performance improvement to speed up JFR typeset processing. > > It accomplishes this by using a set instead of a list as the intermediary Klass* storage. > > Further, the existing JfrSet implementation (currently backed by a linked-list ResizeableResourceHashTable) is optimized to use instead a slimmed open-addressing implementation, premised on the invariant that our sets are key sets. > > Running the test program attached to the JIRA issue results in a 100% performance improvement in total running time (by reducing the work set of Klass: es being processed by the JFR Recorder Thread). > > Testing: jdk_jfr, stress tests > > Thanks > Markus Markus Gr?nlund 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' of https://git.openjdk.org/jdk into 8365199 - merge error - Merge branch '8365199' of github.com:mgronlun/jdk into 8365199 - less than or equal to max_initial_size - use load factor instead of probe sequence - const - increase possible maxsize and extend probe sequence - improved typedef usage and static assert - adjustment - 8365199 ------------- Changes: https://git.openjdk.org/jdk/pull/26733/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26733&range=06 Stats: 350 lines in 11 files changed: 175 ins; 74 del; 101 mod Patch: https://git.openjdk.org/jdk/pull/26733.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26733/head:pull/26733 PR: https://git.openjdk.org/jdk/pull/26733 From egahlin at openjdk.org Thu Aug 14 14:51:13 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Thu, 14 Aug 2025 14:51:13 GMT Subject: RFR: 8365199: Use a set instead of a list as the intermediary Klass* storage to reduce typeset processing [v7] In-Reply-To: <7c7XSbWWI8W5rZnvAQiKrPNV2cE8--KIMrTu4uAThn8=.228b1811-4f32-426f-b690-690bc660b52e@github.com> References: <7c7XSbWWI8W5rZnvAQiKrPNV2cE8--KIMrTu4uAThn8=.228b1811-4f32-426f-b690-690bc660b52e@github.com> Message-ID: On Thu, 14 Aug 2025 14:34:57 GMT, Markus Gr?nlund wrote: >> Greetings, >> >> This change set is a performance improvement to speed up JFR typeset processing. >> >> It accomplishes this by using a set instead of a list as the intermediary Klass* storage. >> >> Further, the existing JfrSet implementation (currently backed by a linked-list ResizeableResourceHashTable) is optimized to use instead a slimmed open-addressing implementation, premised on the invariant that our sets are key sets. >> >> Running the test program attached to the JIRA issue results in a 100% performance improvement in total running time (by reducing the work set of Klass: es being processed by the JFR Recorder Thread). >> >> Testing: jdk_jfr, stress tests >> >> Thanks >> Markus > > Markus Gr?nlund 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' of https://git.openjdk.org/jdk into 8365199 > - merge error > - Merge branch '8365199' of github.com:mgronlun/jdk into 8365199 > - less than or equal to max_initial_size > - use load factor instead of probe sequence > - const > - increase possible maxsize and extend probe sequence > - improved typedef usage and static assert > - adjustment > - 8365199 Looks good. ------------- Marked as reviewed by egahlin (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26733#pullrequestreview-3120901943 From liach at openjdk.org Fri Aug 15 04:29:15 2025 From: liach at openjdk.org (Chen Liang) Date: Fri, 15 Aug 2025 04:29:15 GMT Subject: RFR: 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base In-Reply-To: References: Message-ID: On Thu, 14 Aug 2025 10:34:59 GMT, Jaikiran Pai wrote: > Can I please get a review of these change which removes the outdated use of `jdk.internal.javac.ParticipatesInPreview` and the qualified export of `jdk.internal.javac` package? This addresses https://bugs.openjdk.org/browse/JDK-8365533. > > These qualified exports in `java.base` were added in https://bugs.openjdk.org/browse/JDK-8308753 when ClassFile API was in preview. Starting Java 24, ClassFile API is now a part of Java SE. These affected modules don't use any other preview feature, so there's no longer a need to export the `jdk.internal.javac` package to these modules. > > tier1, tier2 and tier3 testing of this change completed without any related failures. Looks right to me. However since your changed lines is directly by the java.desktop changed line, there's a conflict and you must resolve it. In addition, `PreviewFeature.Feature` enum has a few obsolete entries - they should be kept until the preview feature is not in the minimum boot JDK. Now the boot JDK is min 24, and a few of the features are already permanent in 24. ------------- Marked as reviewed by liach (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26776#pullrequestreview-3122788756 PR Comment: https://git.openjdk.org/jdk/pull/26776#issuecomment-3190566237 From mgronlun at openjdk.org Fri Aug 15 09:36:15 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Fri, 15 Aug 2025 09:36:15 GMT Subject: Integrated: 8365199: Use a set instead of a list as the intermediary Klass* storage to reduce typeset processing In-Reply-To: References: Message-ID: On Mon, 11 Aug 2025 20:51:22 GMT, Markus Gr?nlund wrote: > Greetings, > > This change set is a performance improvement to speed up JFR typeset processing. > > It accomplishes this by using a set instead of a list as the intermediary Klass* storage. > > Further, the existing JfrSet implementation (currently backed by a linked-list ResizeableResourceHashTable) is optimized to use instead a slimmed open-addressing implementation, premised on the invariant that our sets are key sets. > > Running the test program attached to the JIRA issue results in a 100% performance improvement in total running time (by reducing the work set of Klass: es being processed by the JFR Recorder Thread). > > Testing: jdk_jfr, stress tests > > Thanks > Markus This pull request has now been integrated. Changeset: 5856dc34 Author: Markus Gr?nlund URL: https://git.openjdk.org/jdk/commit/5856dc34c82de9f840be1dc28a9917224971491f Stats: 350 lines in 11 files changed: 175 ins; 74 del; 101 mod 8365199: Use a set instead of a list as the intermediary Klass* storage to reduce typeset processing Reviewed-by: egahlin ------------- PR: https://git.openjdk.org/jdk/pull/26733 From duke at openjdk.org Fri Aug 15 13:37:52 2025 From: duke at openjdk.org (Francesco Andreuzzi) Date: Fri, 15 Aug 2025 13:37:52 GMT Subject: RFR: 8365610: Sort share/jfr includes Message-ID: This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. Passes tier1. ------------- Commit messages: - reorder Changes: https://git.openjdk.org/jdk/pull/26800/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26800&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365610 Stats: 173 lines in 56 files changed: 82 ins; 89 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/26800.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26800/head:pull/26800 PR: https://git.openjdk.org/jdk/pull/26800 From duke at openjdk.org Fri Aug 15 13:37:52 2025 From: duke at openjdk.org (Francesco Andreuzzi) Date: Fri, 15 Aug 2025 13:37:52 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 13:30:33 GMT, Francesco Andreuzzi wrote: > This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. > > Passes tier1. src/hotspot/share/jfr/periodic/jfrOSInterface.cpp line 35: > 33: #include "utilities/ostream.hpp" > 34: > 35: #include // for environment variables I couldn't find any usage for this include, let me know if it should stay. It's been here for a long time: https://github.com/openjdk/jdk/commit/a060be188df894ed5c26fc12fc9e902f9af32bd3 src/hotspot/share/jfr/support/jfrDeprecationManager.cpp line 52: > 50: #include "runtime/thread.inline.hpp" > 51: > 52: // for strstr Let me know if the comment should stay ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26800#discussion_r2278998210 PR Review Comment: https://git.openjdk.org/jdk/pull/26800#discussion_r2278998848 From stuefe at openjdk.org Sat Aug 16 04:23:56 2025 From: stuefe at openjdk.org (Thomas Stuefe) Date: Sat, 16 Aug 2025 04:23:56 GMT Subject: RFR: 8365611: Throttle any JFR event Message-ID: This patch prepares the way to throttle any JFR event, not only the three events for which we hard-code throttlers. It also cleans up the throttler code and replaces the switch construct with a lookup table. The patch does not yet enable throttling for any other event. I can do that, if we agree that this is okay. But I'd like to avoid arguments, so for now the patch does not add the ability to throttle to any event; it just makes it trivially easy to do that if needed. ------------- Commit messages: - Update jfrEventThrottler.cpp - wip - fixes - start Changes: https://git.openjdk.org/jdk/pull/26801/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26801&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365611 Stats: 84 lines in 2 files changed: 42 ins; 22 del; 20 mod Patch: https://git.openjdk.org/jdk/pull/26801.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26801/head:pull/26801 PR: https://git.openjdk.org/jdk/pull/26801 From egahlin at openjdk.org Sun Aug 17 19:16:53 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Sun, 17 Aug 2025 19:16:53 GMT Subject: RFR: 8365636: JFR: Minor cleanup Message-ID: <9mu1ONkHASHyy8qEo4G7oaIvM0R-n717TOsQMGAh6vg=.62dceb2c-826a-4798-81a3-81adb05e544d@github.com> Could I have review of Pr That cleans up various stuff (unnecessary imports, typos etc). Testing: jdk/jdk/jfr Thanks Erik ------------- Commit messages: - Initial Changes: https://git.openjdk.org/jdk/pull/26811/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26811&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365636 Stats: 88 lines in 33 files changed: 1 ins; 16 del; 71 mod Patch: https://git.openjdk.org/jdk/pull/26811.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26811/head:pull/26811 PR: https://git.openjdk.org/jdk/pull/26811 From egahlin at openjdk.org Sun Aug 17 19:17:53 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Sun, 17 Aug 2025 19:17:53 GMT Subject: RFR: 8365614: JFR: Improve PrettyWriter::printValue Message-ID: Could I have a review of a PR that simplifies the PrettyWriter::printValue method so it uses switch expression. It also changes so null is never passed to the method, making the code more robust. Testing: jdk/jdk/jfr + manual comparison of output before and after so it hasn't changed ------------- Commit messages: - Remove wrongly added file - Initial Changes: https://git.openjdk.org/jdk/pull/26810/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26810&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365614 Stats: 154 lines in 2 files changed: 23 ins; 66 del; 65 mod Patch: https://git.openjdk.org/jdk/pull/26810.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26810/head:pull/26810 PR: https://git.openjdk.org/jdk/pull/26810 From egahlin at openjdk.org Sun Aug 17 19:19:55 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Sun, 17 Aug 2025 19:19:55 GMT Subject: RFR: 8365638: JFR: Add --exact for debugging out-of-order events Message-ID: Could I have review of PR that add --exact so the failure of a test can be debugged more easily. Testing: test/jdk/jdk/jfr/tool/TestPrintContextual.java Thanks Erik ------------- Commit messages: - Initial Changes: https://git.openjdk.org/jdk/pull/26812/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26812&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365638 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/26812.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26812/head:pull/26812 PR: https://git.openjdk.org/jdk/pull/26812 From egahlin at openjdk.org Sun Aug 17 19:20:01 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Sun, 17 Aug 2025 19:20:01 GMT Subject: RFR: 8365550: JFR: The active-settings view should not use LAST_BATCH Message-ID: Could I have a review of the change that updates the active-settings query to use LAST instead of LAST_BATCH? The problem with using LAST_BATCH is that it doesn?t work with older recordings where the jdk.ActiveSetting event was not emitted as a batch, or with later recordings where a single setting is changed programmatically. Testing: jdk/jdk/jfr Thanks Erik ------------- Commit messages: - Initial Changes: https://git.openjdk.org/jdk/pull/26813/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26813&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365550 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/26813.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26813/head:pull/26813 PR: https://git.openjdk.org/jdk/pull/26813 From jpai at openjdk.org Mon Aug 18 04:49:28 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Mon, 18 Aug 2025 04:49:28 GMT Subject: RFR: 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base [v2] In-Reply-To: References: Message-ID: > Can I please get a review of these change which removes the outdated use of `jdk.internal.javac.ParticipatesInPreview` and the qualified export of `jdk.internal.javac` package? This addresses https://bugs.openjdk.org/browse/JDK-8365533. > > These qualified exports in `java.base` were added in https://bugs.openjdk.org/browse/JDK-8308753 when ClassFile API was in preview. Starting Java 24, ClassFile API is now a part of Java SE. These affected modules don't use any other preview feature, so there's no longer a need to export the `jdk.internal.javac` package to these modules. > > tier1, tier2 and tier3 testing of this change completed without any related failures. Jaikiran Pai has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - merge latest from master branch - 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base ------------- Changes: https://git.openjdk.org/jdk/pull/26776/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26776&range=01 Stats: 27 lines in 7 files changed: 0 ins; 22 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/26776.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26776/head:pull/26776 PR: https://git.openjdk.org/jdk/pull/26776 From alanb at openjdk.org Mon Aug 18 06:04:14 2025 From: alanb at openjdk.org (Alan Bateman) Date: Mon, 18 Aug 2025 06:04:14 GMT Subject: RFR: 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base [v2] In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 04:49:28 GMT, Jaikiran Pai wrote: >> Can I please get a review of these change which removes the outdated use of `jdk.internal.javac.ParticipatesInPreview` and the qualified export of `jdk.internal.javac` package? This addresses https://bugs.openjdk.org/browse/JDK-8365533. >> >> These qualified exports in `java.base` were added in https://bugs.openjdk.org/browse/JDK-8308753 when ClassFile API was in preview. Starting Java 24, ClassFile API is now a part of Java SE. These affected modules don't use any other preview feature, so there's no longer a need to export the `jdk.internal.javac` package to these modules. >> >> tier1, tier2 and tier3 testing of this change completed without any related failures. > > Jaikiran Pai has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - merge latest from master branch > - 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26776#pullrequestreview-3126883742 From jpai at openjdk.org Mon Aug 18 06:48:19 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Mon, 18 Aug 2025 06:48:19 GMT Subject: RFR: 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base [v2] In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 04:49:28 GMT, Jaikiran Pai wrote: >> Can I please get a review of these change which removes the outdated use of `jdk.internal.javac.ParticipatesInPreview` and the qualified export of `jdk.internal.javac` package? This addresses https://bugs.openjdk.org/browse/JDK-8365533. >> >> These qualified exports in `java.base` were added in https://bugs.openjdk.org/browse/JDK-8308753 when ClassFile API was in preview. Starting Java 24, ClassFile API is now a part of Java SE. These affected modules don't use any other preview feature, so there's no longer a need to export the `jdk.internal.javac` package to these modules. >> >> tier1, tier2 and tier3 testing of this change completed without any related failures. > > Jaikiran Pai has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - merge latest from master branch > - 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base Thank you Alan and Chen for the reviews. tier1, tier2 and tier3 testing with this change completed without any related issues. > In addition, `PreviewFeature.Feature` enum has a few obsolete entries ... Now the boot JDK is min 24, and a few of the features are already permanent in 24. I'll file a separate issue to clean those up. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26776#issuecomment-3195338107 From egahlin at openjdk.org Mon Aug 18 07:00:01 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 18 Aug 2025 07:00:01 GMT Subject: RFR: 8365636: JFR: Minor cleanup [v2] In-Reply-To: <9mu1ONkHASHyy8qEo4G7oaIvM0R-n717TOsQMGAh6vg=.62dceb2c-826a-4798-81a3-81adb05e544d@github.com> References: <9mu1ONkHASHyy8qEo4G7oaIvM0R-n717TOsQMGAh6vg=.62dceb2c-826a-4798-81a3-81adb05e544d@github.com> Message-ID: > Could I have review of Pr That cleans up various stuff (unnecessary imports, typos etc). > > Testing: jdk/jdk/jfr > > Thanks > Erik Erik Gahlin has updated the pull request incrementally with one additional commit since the last revision: Compare with class instead incorrect/reversed isAssignableFrom ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26811/files - new: https://git.openjdk.org/jdk/pull/26811/files/c90ef842..9a0c6edc Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26811&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26811&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26811.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26811/head:pull/26811 PR: https://git.openjdk.org/jdk/pull/26811 From shade at openjdk.org Mon Aug 18 08:52:13 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 18 Aug 2025 08:52:13 GMT Subject: RFR: 8365638: JFR: Add --exact for debugging out-of-order events In-Reply-To: References: Message-ID: <1oc-4VowRcY5m9_c9Octw4Vex8rceVIEWcQifb69Vi8=.1d317799-830a-4b1d-ac45-759335d975c8@github.com> On Sun, 17 Aug 2025 18:34:05 GMT, Erik Gahlin wrote: > Could I have review of PR that add --exact so the failure of a test can be debugged more easily. > > Testing: test/jdk/jdk/jfr/tool/TestPrintContextual.java > > Thanks > Erik Looks good. ------------- Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26812#pullrequestreview-3127406574 From mgronlun at openjdk.org Mon Aug 18 09:48:14 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 09:48:14 GMT Subject: RFR: 8365611: Throttle any JFR event In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 14:58:12 GMT, Thomas Stuefe wrote: > This patch prepares the way to throttle any JFR event, not only the three events for which we hard-code throttlers. It also cleans up the throttler code and replaces the switch construct with a lookup table. > > The patch does not yet enable throttling for any other event, since that may be a contentious move, and I would like for this patch to go in without too much fuss. So I did not make any new events "throttleble". > > If it turns out to be non-contentious, I am fine with just enabling throttling capability for all events. What motivates this change? It does not make any sense to "throttle all events." Also, "all events" at this location only constitute JVM events, not Java events. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26801#issuecomment-3195941664 From mgronlun at openjdk.org Mon Aug 18 09:59:13 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 09:59:13 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 13:30:33 GMT, Francesco Andreuzzi wrote: > This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. > > Testing: > - [x] tier1 > - [x] tier2 This creates a dependency on a test that is not normally run when we develop JFR. What tier is the test located? ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3195982055 From stuefe at openjdk.org Mon Aug 18 10:00:11 2025 From: stuefe at openjdk.org (Thomas Stuefe) Date: Mon, 18 Aug 2025 10:00:11 GMT Subject: RFR: 8365611: Throttle any JFR event In-Reply-To: References: Message-ID: <0a3Rvcto678pkGJpzyvDSEwqBrfYh9_-Jt8u6Zpv3xM=.2b495455-a660-4779-9c0d-aa52f94e1683@github.com> On Mon, 18 Aug 2025 09:45:20 GMT, Markus Gr?nlund wrote: > What motivates this change? > > It does not make any sense to "throttle all events." Also, "all events" at this location only constitute JVM events, not Java events. I'd like to introduce an event to count allocations via Unsafe.allocateMemory ([1]). We get many customers with unexplainably high RSS footprint, and often it turns out that the culprit is an external library allocating memory via Unsafe.allocateMemory. One example would be Netty. What folks currently do is to use techniques like valgrind, replacing the C-Heap with jemalloc or using asyncprofiler. It would be very nice if we could do this with JFR itself; it is certainly capable. But these calls can be relatively fine-grained. Often not, but sometimes they are. If they are, it makes sense to make this new event "throttleable" and throttle it by default to a sensible level. Apart from all of that, is this not something that is cleaner and just makes sense? You's avoid some ugly and more costly switch case constructs that are executed on every event, don't you? [1] https://github.com/openjdk/jdk/compare/master...tstuefe:jdk:refs/heads/JFR-Unsafe.allocateMemory ------------- PR Comment: https://git.openjdk.org/jdk/pull/26801#issuecomment-3195983563 From duke at openjdk.org Mon Aug 18 10:07:16 2025 From: duke at openjdk.org (Francesco Andreuzzi) Date: Mon, 18 Aug 2025 10:07:16 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 09:56:32 GMT, Markus Gr?nlund wrote: > This creates a dependency on a test that is not normally run when we develop JFR. > > What tier is the test located? `TestIncludesAreSorted.java` is in [`tier1`](https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/TEST.groups#L142). ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3196013395 From mgronlun at openjdk.org Mon Aug 18 10:18:09 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 10:18:09 GMT Subject: RFR: 8365611: Throttle any JFR event In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 14:58:12 GMT, Thomas Stuefe wrote: > This patch prepares the way to throttle any JFR event, not only the three events for which we hard-code throttlers. It also cleans up the throttler code and replaces the switch construct with a lookup table. > > The patch does not yet enable throttling for any other event, since that may be a contentious move, and I would like for this patch to go in without too much fuss. So I did not make any new events "throttleble". > > If it turns out to be non-contentious, I am fine with just enabling throttling capability for all events. I'm just trying to understand what is "underneath" this change. Throttling all events is not a target since it does not make sense. Making it easy to plug in a new throttler for a new event would make more sense. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26801#issuecomment-3196052544 From egahlin at openjdk.org Mon Aug 18 10:40:17 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 18 Aug 2025 10:40:17 GMT Subject: Integrated: 8365638: JFR: Add --exact for debugging out-of-order events In-Reply-To: References: Message-ID: On Sun, 17 Aug 2025 18:34:05 GMT, Erik Gahlin wrote: > Could I have review of PR that add --exact so the failure of a test can be debugged more easily. > > Testing: test/jdk/jdk/jfr/tool/TestPrintContextual.java > > Thanks > Erik This pull request has now been integrated. Changeset: a42ba1ff Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/a42ba1ff1a6c7c856323a8e2c54457fc3ddb3659 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8365638: JFR: Add --exact for debugging out-of-order events Reviewed-by: shade ------------- PR: https://git.openjdk.org/jdk/pull/26812 From mgronlun at openjdk.org Mon Aug 18 10:41:11 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 10:41:11 GMT Subject: RFR: 8365611: Throttle any JFR event In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 14:58:12 GMT, Thomas Stuefe wrote: > This patch prepares the way to throttle any JFR event, not only the three events for which we hard-code throttlers. It also cleans up the throttler code and replaces the switch construct with a lookup table. > > The patch does not yet enable throttling for any other event, since that may be a contentious move, and I would like for this patch to go in without too much fuss. So I did not make any new events "throttleble". > > If it turns out to be non-contentious, I am fine with just enabling throttling capability for all events. Changes requested by mgronlun (Reviewer). src/hotspot/share/jfr/recorder/service/jfrEventThrottler.cpp line 101: > 99: } > 100: > 101: // There is currently only two throttler instances, one for the jdk.ObjectAllocationSample event Now we can remove this comment. src/hotspot/share/jfr/recorder/service/jfrEventThrottler.cpp line 117: > 115: > 116: JfrEventThrottler* JfrEventThrottler::create_throttler(JfrEventId id) { > 117: JfrEventThrottler* p = new JfrEventThrottler(id); JfrEventThrottler is a JfrAdaptiveSampler that utilizes the JfrCHeapObj allocator, which can return nullptr during JFR initialization. src/hotspot/share/jfr/recorder/service/jfrEventThrottler.hpp line 53: > 51: > 52: public: > 53: static JfrEventThrottler* create_throttler(JfrEventId event_id); Please make this private and add ThrottlerLookupTable as a friend. ------------- PR Review: https://git.openjdk.org/jdk/pull/26801#pullrequestreview-3127803372 PR Review Comment: https://git.openjdk.org/jdk/pull/26801#discussion_r2282002313 PR Review Comment: https://git.openjdk.org/jdk/pull/26801#discussion_r2282014257 PR Review Comment: https://git.openjdk.org/jdk/pull/26801#discussion_r2281999373 From mgronlun at openjdk.org Mon Aug 18 10:46:11 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 10:46:11 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 13:30:33 GMT, Francesco Andreuzzi wrote: > This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. > > Testing: > - [x] tier1 > - [x] tier2 A blanket HotSpot change that does not add much value, but instead creates an unnecessary dependency that will make development of JFR more problematic. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3196133193 From shade at openjdk.org Mon Aug 18 11:35:12 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 18 Aug 2025 11:35:12 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 10:43:38 GMT, Markus Gr?nlund wrote: > A blanket HotSpot change that does not add much value, but instead creates an unnecessary dependency that will make development of JFR more problematic. It is not "blanket", is it? The includes get sorted component by component, and many components in Hotspot have already been processed, with a long view of entire Hotspot being covered. Overall, while I agree maintaining the include order hygiene would require additional work, that is true for _any_ hygiene work. It does not mean we refrain from it. What we do is to make sure the detection is as prompt and the fixes are as easy as practically possible. Also, there is already a "dependency" on source tests. For example, if you write `NULL` anywhere in JFR code, this test would fail: https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/sources/TestNoNULL.java. You'll get a failure with any `tier1` testing, including GHA checks. The include order test is not that different. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3196274329 From shade at openjdk.org Mon Aug 18 11:43:12 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 18 Aug 2025 11:43:12 GMT Subject: RFR: 8365550: JFR: The active-settings view should not use LAST_BATCH In-Reply-To: References: Message-ID: On Sun, 17 Aug 2025 19:08:58 GMT, Erik Gahlin wrote: > Could I have a review of a change that updates the active-settings query to use LAST instead of LAST_BATCH? > > The problem with using LAST_BATCH is that it doesn?t work with older recordings where the jdk.ActiveSetting event was not emitted as a batch, or with later recordings where a single setting is changed programmatically. > > Testing: jdk/jdk/jfr > > Thanks > Erik This makes sense, thanks. ------------- Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26813#pullrequestreview-3128025057 From mgronlun at openjdk.org Mon Aug 18 11:47:12 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 11:47:12 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 13:30:33 GMT, Francesco Andreuzzi wrote: > This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. > > Testing: > - [x] tier1 > - [x] tier2 That is a blanket change, yes - it means all of HotSpot being covered. In my opinion, it adds little value and instead creates more work for us that develop JFR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3196311191 From shade at openjdk.org Mon Aug 18 11:51:13 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 18 Aug 2025 11:51:13 GMT Subject: RFR: 8365636: JFR: Minor cleanup [v2] In-Reply-To: References: <9mu1ONkHASHyy8qEo4G7oaIvM0R-n717TOsQMGAh6vg=.62dceb2c-826a-4798-81a3-81adb05e544d@github.com> Message-ID: On Mon, 18 Aug 2025 07:00:01 GMT, Erik Gahlin wrote: >> Could I have review of Pr That cleans up various stuff (unnecessary imports, typos etc). >> >> Testing: jdk/jdk/jfr >> >> Thanks >> Erik > > Erik Gahlin has updated the pull request incrementally with one additional commit since the last revision: > > Compare with class instead incorrect/reversed isAssignableFrom Looks fine to me, I just have one question: src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordedObject.java line 186: > 184: } > 185: T object = getValue(name); > 186: if (object == null || object.getClass() == clazz) { Comprehension check: looks like do not need to check hierarchy at all, since we only ever call `getTyped` with `final` classes, correct? ------------- Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26811#pullrequestreview-3128046871 PR Review Comment: https://git.openjdk.org/jdk/pull/26811#discussion_r2282171802 From mgronlun at openjdk.org Mon Aug 18 11:53:12 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 11:53:12 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 11:44:38 GMT, Markus Gr?nlund wrote: > That is a blanket change, yes - it means all of HotSpot being covered. > > In my opinion, it adds little value and instead creates more work for us that develop JFR. But if "someone" has said this is good to do for all of HotSpot (who?) we can accommodate to the general will. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3196327634 From shade at openjdk.org Mon Aug 18 12:06:12 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 18 Aug 2025 12:06:12 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 11:44:38 GMT, Markus Gr?nlund wrote: > In my opinion, it adds little value and instead creates more work for us that develop JFR. Noted, but I think this overestimates the amount of work. If the test would fail in `tier1` (which the required pre-integration testing, runs even in GHA), in 99% of cases you either sort the includes by hand, or run the tool in the way that test failure itself would guide you through: https://github.com/openjdk/jdk/blob/c1198bba0e8cbdaa47c821263d122d0ba4dd6759/test/hotspot/jtreg/sources/TestIncludesAreSorted.java#L91-L93 > But if "someone" has said this is good to do for all of HotSpot (who?) we can accommodate to the general will. Take a look at [Hotspot Style Guide](https://github.com/openjdk/jdk/blob/master/doc/hotspot-style.md#source-files): "Keep the include lines within a section alphabetically sorted by their lowercase value. If an include must be out of order for correctness, suffix with it a comment such as // do not reorder. Source code processing tools can also use this hint." Both the original [JDK-8352645](https://bugs.openjdk.org/browse/JDK-8352645), and the related tasks from it maintain the same consensus: sort the includes, make sure the test would keep them sorted. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3196365263 From stuefe at openjdk.org Mon Aug 18 13:33:11 2025 From: stuefe at openjdk.org (Thomas Stuefe) Date: Mon, 18 Aug 2025 13:33:11 GMT Subject: RFR: 8365611: Throttle any JFR event In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 10:37:10 GMT, Markus Gr?nlund wrote: >> This patch prepares the way to throttle any JFR event, not only the three events for which we hard-code throttlers. It also cleans up the throttler code and replaces the switch construct with a lookup table. >> >> The patch does not yet enable throttling for any other event, since that may be a contentious move, and I would like for this patch to go in without too much fuss. So I did not make any new events "throttleble". >> >> If it turns out to be non-contentious, I am fine with just enabling throttling capability for all events. > > src/hotspot/share/jfr/recorder/service/jfrEventThrottler.cpp line 117: > >> 115: >> 116: JfrEventThrottler* JfrEventThrottler::create_throttler(JfrEventId id) { >> 117: JfrEventThrottler* p = new JfrEventThrottler(id); > > JfrEventThrottler is a JfrAdaptiveSampler that utilizes the JfrCHeapObj allocator, which can return nullptr during JFR initialization. Are you sure? .. Ah, I see it now. You end up calling the nothrow variant of `CHeapObjBase::operator new`. And treat malloc OOMs during initialization as non-fatal, runtime malloc OOMs as fatal. May I ask why you bother? Is the memory footprint of JFR really so high as to make this distinction worthwhile? (As in "if JVM does not come up with JFR, the footprint without JFR will be so much lower that it is worth trying"?) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26801#discussion_r2282403845 From mgronlun at openjdk.org Mon Aug 18 13:40:13 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 13:40:13 GMT Subject: RFR: 8365550: JFR: The active-settings view should not use LAST_BATCH In-Reply-To: References: Message-ID: On Sun, 17 Aug 2025 19:08:58 GMT, Erik Gahlin wrote: > Could I have a review of a change that updates the active-settings query to use LAST instead of LAST_BATCH? > > The problem with using LAST_BATCH is that it doesn?t work with older recordings where the jdk.ActiveSetting event was not emitted as a batch, or with later recordings where a single setting is changed programmatically. > > Testing: jdk/jdk/jfr > > Thanks > Erik Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26813#pullrequestreview-3128406055 From stuefe at openjdk.org Mon Aug 18 13:41:51 2025 From: stuefe at openjdk.org (Thomas Stuefe) Date: Mon, 18 Aug 2025 13:41:51 GMT Subject: RFR: 8365611: Throttle any JFR event [v2] In-Reply-To: References: Message-ID: > This patch prepares the way to throttle any JFR event, not only the three events for which we hard-code throttlers. It also cleans up the throttler code and replaces the switch construct with a lookup table. > > The patch does not yet enable throttling for any other event, since that may be a contentious move, and I would like for this patch to go in without too much fuss. So I did not make any new events "throttleble". > > If it turns out to be non-contentious, I am fine with just enabling throttling capability for all events. Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision: Markus Feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26801/files - new: https://git.openjdk.org/jdk/pull/26801/files/34c340fb..3cb74305 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26801&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26801&range=00-01 Stats: 9 lines in 2 files changed: 4 ins; 4 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26801.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26801/head:pull/26801 PR: https://git.openjdk.org/jdk/pull/26801 From mgronlun at openjdk.org Mon Aug 18 13:42:13 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 13:42:13 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 13:30:33 GMT, Francesco Andreuzzi wrote: > This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. > > Testing: > - [x] tier1 > - [x] tier2 That the test is integrated with GHA is the good part. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3196955412 From jpai at openjdk.org Mon Aug 18 13:43:23 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Mon, 18 Aug 2025 13:43:23 GMT Subject: Integrated: 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base In-Reply-To: References: Message-ID: On Thu, 14 Aug 2025 10:34:59 GMT, Jaikiran Pai wrote: > Can I please get a review of these change which removes the outdated use of `jdk.internal.javac.ParticipatesInPreview` and the qualified export of `jdk.internal.javac` package? This addresses https://bugs.openjdk.org/browse/JDK-8365533. > > These qualified exports in `java.base` were added in https://bugs.openjdk.org/browse/JDK-8308753 when ClassFile API was in preview. Starting Java 24, ClassFile API is now a part of Java SE. These affected modules don't use any other preview feature, so there's no longer a need to export the `jdk.internal.javac` package to these modules. > > tier1, tier2 and tier3 testing of this change completed without any related failures. This pull request has now been integrated. Changeset: 81c6ed38 Author: Jaikiran Pai URL: https://git.openjdk.org/jdk/commit/81c6ed38828940d51c872c354c29dc13ed62a5ac Stats: 27 lines in 7 files changed: 0 ins; 22 del; 5 mod 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base Reviewed-by: alanb, liach ------------- PR: https://git.openjdk.org/jdk/pull/26776 From mgronlun at openjdk.org Mon Aug 18 13:45:12 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 13:45:12 GMT Subject: RFR: 8365611: Throttle any JFR event [v2] In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 13:30:31 GMT, Thomas Stuefe wrote: >> src/hotspot/share/jfr/recorder/service/jfrEventThrottler.cpp line 117: >> >>> 115: >>> 116: JfrEventThrottler* JfrEventThrottler::create_throttler(JfrEventId id) { >>> 117: JfrEventThrottler* p = new JfrEventThrottler(id); >> >> JfrEventThrottler is a JfrAdaptiveSampler that utilizes the JfrCHeapObj allocator, which can return nullptr during JFR initialization. > > Are you sure? > > .. > > Ah, I see it now. You end up calling the nothrow variant of `CHeapObjBase::operator new`. And treat malloc OOMs during initialization as non-fatal, runtime malloc OOMs as fatal. > > May I ask why you bother? Is the memory footprint of JFR really so high as to make this distinction worthwhile? (As in "if JVM does not come up with JFR, the footprint without JFR will be so much lower that it is worth trying"?) Because JFR can be started dynamically during runtime, from the outside. We don't want someone killing the JVM by starting JFR. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26801#discussion_r2282441434 From jpai at openjdk.org Mon Aug 18 14:23:16 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Mon, 18 Aug 2025 14:23:16 GMT Subject: RFR: 8365533: Remove outdated jdk.internal.javac package export to several modules from java.base [v2] In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 06:45:27 GMT, Jaikiran Pai wrote: > > In addition, `PreviewFeature.Feature` enum has a few obsolete entries ... Now the boot JDK is min 24, and a few of the features are already permanent in 24. > > I'll file a separate issue to clean those up. I've now filed https://bugs.openjdk.org/browse/JDK-8365699 to track this. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26776#issuecomment-3197140201 From mgronlun at openjdk.org Mon Aug 18 14:58:12 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 14:58:12 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 13:30:33 GMT, Francesco Andreuzzi wrote: > This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. > > Testing: > - [x] tier1 > - [x] tier2 Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26800#pullrequestreview-3128733760 From mgronlun at openjdk.org Mon Aug 18 15:05:16 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Mon, 18 Aug 2025 15:05:16 GMT Subject: RFR: 8365611: Throttle any JFR event [v2] In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 13:41:51 GMT, Thomas Stuefe wrote: >> This patch prepares the way to throttle any JFR event, not only the three events for which we hard-code throttlers. It also cleans up the throttler code and replaces the switch construct with a lookup table. >> >> The patch does not yet enable throttling for any other event, since that may be a contentious move, and I would like for this patch to go in without too much fuss. So I did not make any new events "throttleble". >> >> If it turns out to be non-contentious, I am fine with just enabling throttling capability for all events. > > Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision: > > Markus Feedback Looks good. ------------- Marked as reviewed by mgronlun (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26801#pullrequestreview-3128764724 From duke at openjdk.org Mon Aug 18 15:20:13 2025 From: duke at openjdk.org (duke) Date: Mon, 18 Aug 2025 15:20:13 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 13:30:33 GMT, Francesco Andreuzzi wrote: > This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. > > Testing: > - [x] tier1 > - [x] tier2 @fandreuz Your change (at version 3bfcf13525c3eb1c1ff5a5e1e37fdc8de7323995) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3197353485 From egahlin at openjdk.org Mon Aug 18 15:42:13 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 18 Aug 2025 15:42:13 GMT Subject: RFR: 8365550: JFR: The active-settings view should not use LAST_BATCH In-Reply-To: References: Message-ID: On Sun, 17 Aug 2025 19:08:58 GMT, Erik Gahlin wrote: > Could I have a review of a change that updates the active-settings query to use LAST instead of LAST_BATCH? > > The problem with using LAST_BATCH is that it doesn?t work with older recordings where the jdk.ActiveSetting event was not emitted as a batch, or with later recordings where a single setting is changed programmatically. > > Testing: jdk/jdk/jfr > > Thanks > Erik Thanks for the reviews. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26813#issuecomment-3197445781 From egahlin at openjdk.org Mon Aug 18 15:46:15 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 18 Aug 2025 15:46:15 GMT Subject: Integrated: 8365550: JFR: The active-settings view should not use LAST_BATCH In-Reply-To: References: Message-ID: On Sun, 17 Aug 2025 19:08:58 GMT, Erik Gahlin wrote: > Could I have a review of a change that updates the active-settings query to use LAST instead of LAST_BATCH? > > The problem with using LAST_BATCH is that it doesn?t work with older recordings where the jdk.ActiveSetting event was not emitted as a batch, or with later recordings where a single setting is changed programmatically. > > Testing: jdk/jdk/jfr > > Thanks > Erik This pull request has now been integrated. Changeset: 2a16cc89 Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/2a16cc890b99652a37b2e220dd61875063328b36 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod 8365550: JFR: The active-settings view should not use LAST_BATCH Reviewed-by: shade, mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26813 From shade at openjdk.org Mon Aug 18 15:49:14 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 18 Aug 2025 15:49:14 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: <4LAyQOzRNUaavo8sKS2fr-ojornnGkgCzhmaqJOAE_s=.d6443b31-668e-4991-9ec0-03268f88b5df@github.com> On Fri, 15 Aug 2025 13:30:33 GMT, Francesco Andreuzzi wrote: > This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. > > Testing: > - [x] tier1 > - [x] tier2 For Hotspot changes, you need to wait 24 hours, so people around the globe could take a look. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3197465672 From duke at openjdk.org Mon Aug 18 15:56:13 2025 From: duke at openjdk.org (Francesco Andreuzzi) Date: Mon, 18 Aug 2025 15:56:13 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: <4LAyQOzRNUaavo8sKS2fr-ojornnGkgCzhmaqJOAE_s=.d6443b31-668e-4991-9ec0-03268f88b5df@github.com> References: <4LAyQOzRNUaavo8sKS2fr-ojornnGkgCzhmaqJOAE_s=.d6443b31-668e-4991-9ec0-03268f88b5df@github.com> Message-ID: On Mon, 18 Aug 2025 15:46:09 GMT, Aleksey Shipilev wrote: > For Hotspot changes, you need to wait 24 hours, so people around the globe could take a look. Sure, so is it 24 hours after getting approval? I thought it's 24 hours after opening the PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3197491190 From egahlin at openjdk.org Mon Aug 18 19:08:02 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Mon, 18 Aug 2025 19:08:02 GMT Subject: RFR: 8365636: JFR: Minor cleanup [v2] In-Reply-To: References: <9mu1ONkHASHyy8qEo4G7oaIvM0R-n717TOsQMGAh6vg=.62dceb2c-826a-4798-81a3-81adb05e544d@github.com> Message-ID: On Mon, 18 Aug 2025 11:48:31 GMT, Aleksey Shipilev wrote: >> Erik Gahlin has updated the pull request incrementally with one additional commit since the last revision: >> >> Compare with class instead incorrect/reversed isAssignableFrom > > src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordedObject.java line 186: > >> 184: } >> 185: T object = getValue(name); >> 186: if (object == null || object.getClass() == clazz) { > > Comprehension check: looks like do not need to check hierarchy at all, since we only ever call `getTyped` with `final` classes, correct? We only use the method with known leaf classes, e.g. Long and RecordedThread, which all happen to be final, but hypothetically they would not need to be. The class should match the type that the parser has instantiated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26811#discussion_r2283210921 From stuefe at openjdk.org Tue Aug 19 05:02:36 2025 From: stuefe at openjdk.org (Thomas Stuefe) Date: Tue, 19 Aug 2025 05:02:36 GMT Subject: RFR: 8365611: Throttle any JFR event [v2] In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 15:02:42 GMT, Markus Gr?nlund wrote: > Looks good. Thank you, @mgronlun ------------- PR Comment: https://git.openjdk.org/jdk/pull/26801#issuecomment-3199209692 From egahlin at openjdk.org Tue Aug 19 06:29:36 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Tue, 19 Aug 2025 06:29:36 GMT Subject: RFR: 8365611: Throttle any JFR event [v2] In-Reply-To: References: Message-ID: <__DJ7zVbtW9xBpbAVnjqKBfiyce5pX3lQCWT6Ma5T7I=.802e961b-c009-4ffc-8b0a-b13d1d5180fc@github.com> On Mon, 18 Aug 2025 13:41:51 GMT, Thomas Stuefe wrote: >> This patch prepares the way to throttle any JFR event, not only the three events for which we hard-code throttlers. It also cleans up the throttler code and replaces the switch construct with a lookup table. >> >> The patch does not yet enable throttling for any other event, since that may be a contentious move, and I would like for this patch to go in without too much fuss. So I did not make any new events "throttleble". >> >> If it turns out to be non-contentious, I am fine with just enabling throttling capability for all events. > > Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision: > > Markus Feedback Could we change the title of the issue? "Throttle any JFR event" is not really what the PR does. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26801#issuecomment-3199386101 From stuefe at openjdk.org Tue Aug 19 06:37:36 2025 From: stuefe at openjdk.org (Thomas Stuefe) Date: Tue, 19 Aug 2025 06:37:36 GMT Subject: RFR: 8365611: Throttle any JFR event [v2] In-Reply-To: <__DJ7zVbtW9xBpbAVnjqKBfiyce5pX3lQCWT6Ma5T7I=.802e961b-c009-4ffc-8b0a-b13d1d5180fc@github.com> References: <__DJ7zVbtW9xBpbAVnjqKBfiyce5pX3lQCWT6Ma5T7I=.802e961b-c009-4ffc-8b0a-b13d1d5180fc@github.com> Message-ID: On Tue, 19 Aug 2025 06:27:13 GMT, Erik Gahlin wrote: > Could we change the title of the issue? "Throttle any JFR event" is not really what the PR does. How about "Use lookup table for JfrEventThrottler"? Yes I thought so too. Will do. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26801#issuecomment-3199413006 From egahlin at openjdk.org Tue Aug 19 06:45:39 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Tue, 19 Aug 2025 06:45:39 GMT Subject: RFR: 8365306: Provide OS Process Size and Libc statistic metrics to JFR In-Reply-To: References: Message-ID: On Wed, 13 Aug 2025 09:42:57 GMT, Thomas Stuefe wrote: > This provides the following new metrics: > - `ProcessSize` event (new, periodic) > - vsize (for analyzing address-space fragmentation issues) > - RSS including subtypes (subtypes are useful for excluding atypical issues, e.g. kernel problems that cause large file buffer bloat) > - peak RSS > - process swap (if we swap we cannot trust the RSS values, plus it indicates bad sizing) > - pte size (to quickly see if we run with a super-large working set but an unsuitably small page size) > - `LibcStatistics` (new, periodic) > - outstanding malloc size (important counterpoint to whatever NMT tries to tell me, which alone is often misleading) > - retained malloc size (super-important for the same reason) > - number of libc trims the hotspot executed (needed to gauge the usefulness of the retain counter, and to see if a customer employs native heap auto trimming (`-XX:TrimNativeHeapInterval`) > - `NativeHeapTrim` (new, event-driven) (for both manual and automatic trims) > - RSS before and RSS after > - RSS recovered by this trim > - whether it was an automatic or manual trim > - duration > - `JavaThreadStatistic` > - os thread counter (new field) (useful to understand the behavior of third-party code in our process if threads are created that bypass the JVM. E.g. some custom launchers do that.) > - nonJava thread counter (new field) (needed to interprete the os thread counter) > > Notes: > - we already have `ResidentSetSize` event, and the new `ProcessSize` event is a superset of that. I don't know how these cases are handled. I'd prefer to throw the old event out, but JMC has a hard-coded chart for RSS, so I kept it in unless someone tells me to remove it. > > - Obviously, the libc events are very platform-specific. Still, I argue that these metrics are highly useful. We want people to use JFR and JMC; people include developers that are dealing with performance problems that require platform-specific knowledge to understand. See my comment in the JBS issue. > > I provided implementations, as far as possible, to Linux, MacOS and Windows. > > Testing: > - ran the new tests manually and as part of GHAs What is the problem with adding RSS metrics to the existing ResidentSetSize event? ------------- PR Comment: https://git.openjdk.org/jdk/pull/26756#issuecomment-3199438538 From stuefe at openjdk.org Tue Aug 19 07:01:40 2025 From: stuefe at openjdk.org (Thomas Stuefe) Date: Tue, 19 Aug 2025 07:01:40 GMT Subject: RFR: 8365306: Provide OS Process Size and Libc statistic metrics to JFR In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 06:43:01 GMT, Erik Gahlin wrote: > What is the problem with adding RSS metrics to the existing ResidentSetSize event? You mean adding the vsize, swap etc fields to ResidentSetSize? I thought about that, but then it would be weirdly misnamed. RSS has a very specific meaning. So we would have ResidentSetSize.vsize, ResidentSetSize.swap, ResidentSetSize.rss (?) I also thought about splitting them up and add one event per value, following the "ResidentSetSize" pattern. So, one event for "VirtualSize", one for "Swap" etc. Apart from not liking the fine granularity, having these fields grouped in one event has multiple advantages. Mainly, I can build myself graphs in JMC for all these fields in one graph and correlate all the values. It is also cheaper to obtain (just one parsing operation for /proc/meminfo, for instance). ------------- PR Comment: https://git.openjdk.org/jdk/pull/26756#issuecomment-3199479458 From shade at openjdk.org Tue Aug 19 10:13:41 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Tue, 19 Aug 2025 10:13:41 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: <4LAyQOzRNUaavo8sKS2fr-ojornnGkgCzhmaqJOAE_s=.d6443b31-668e-4991-9ec0-03268f88b5df@github.com> Message-ID: On Mon, 18 Aug 2025 15:53:50 GMT, Francesco Andreuzzi wrote: > > For Hotspot changes, you need to wait 24 hours, so people around the globe could take a look. > > Sure, so is it 24 hours after getting approval? I thought it's 24 hours after opening the PR. Ah no, you're right: https://openjdk.org/guide/#life-of-a-pr -- 24 hours is the bare minimum. It gets a bit murky around holidays/weekends, as people take time off or checkout on Friday earlier. But this looks fine. You also need a Review from one area expert (for JFR, Markus definitely qualifies), and another Review from any other reviewer. I'll do it shortly. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3200112542 From shade at openjdk.org Tue Aug 19 10:30:49 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Tue, 19 Aug 2025 10:30:49 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: <8zVTQIeCpGMKTLXckQvoHyhtCulVA-H1uzB5xSljT3w=.6ea182fe-edaf-42d3-a56c-bb76a16b69dd@github.com> On Fri, 15 Aug 2025 13:30:33 GMT, Francesco Andreuzzi wrote: > This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. > > Testing: > - [x] tier1 > - [x] tier2 Looks fine, but I think we should refrain from deleting the includes here. ------------- PR Review: https://git.openjdk.org/jdk/pull/26800#pullrequestreview-3131682406 From shade at openjdk.org Tue Aug 19 10:30:52 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Tue, 19 Aug 2025 10:30:52 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: <3RwSwd93WGbyHLsMyrRegNwyyG_Z8TyRKVb4LeQWKZ4=.c0e8b7dc-dca4-48ea-9ddf-4b00f102e148@github.com> On Fri, 15 Aug 2025 13:32:11 GMT, Francesco Andreuzzi wrote: >> This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. >> >> Testing: >> - [x] tier1 >> - [x] tier2 > > src/hotspot/share/jfr/periodic/jfrOSInterface.cpp line 35: > >> 33: #include "utilities/ostream.hpp" >> 34: >> 35: #include // for environment variables > > I couldn't find any usage for this include, let me know if it should stay. It's been here for a long time: https://github.com/openjdk/jdk/commit/a060be188df894ed5c26fc12fc9e902f9af32bd3 I suspect it has to do with `generate_environment_variables_events()` here: https://github.com/openjdk/jdk/pull/26800/files#diff-2d77a162387fd8e8a57c631e91543fa87889a7ef867725ecbfa37804b678fdabR83 Which does not have any implementation. I cannot find any code history about this as well; looks like it was unimplemented from day 1: % git log -p --follow src/hotspot/ | grep generate_environment_variables_events + void generate_environment_variables_events(); So maybe keep this one intact, and submit another quick RFE to clean up both the header inclusion and the dead method declarations? It would also match the synopsis for current PR ("sort") better. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26800#discussion_r2284818979 From duke at openjdk.org Tue Aug 19 10:53:25 2025 From: duke at openjdk.org (Francesco Andreuzzi) Date: Tue, 19 Aug 2025 10:53:25 GMT Subject: RFR: 8365610: Sort share/jfr includes [v2] In-Reply-To: References: Message-ID: > This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. > > Testing: > - [x] tier1 > - [x] tier2 Francesco Andreuzzi 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: - revert - Merge branch 'master' into JDK-8365610 - reorder ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26800/files - new: https://git.openjdk.org/jdk/pull/26800/files/3bfcf135..f734135f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26800&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26800&range=00-01 Stats: 5591 lines in 165 files changed: 4356 ins; 612 del; 623 mod Patch: https://git.openjdk.org/jdk/pull/26800.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26800/head:pull/26800 PR: https://git.openjdk.org/jdk/pull/26800 From duke at openjdk.org Tue Aug 19 10:53:25 2025 From: duke at openjdk.org (Francesco Andreuzzi) Date: Tue, 19 Aug 2025 10:53:25 GMT Subject: RFR: 8365610: Sort share/jfr includes [v2] In-Reply-To: <3RwSwd93WGbyHLsMyrRegNwyyG_Z8TyRKVb4LeQWKZ4=.c0e8b7dc-dca4-48ea-9ddf-4b00f102e148@github.com> References: <3RwSwd93WGbyHLsMyrRegNwyyG_Z8TyRKVb4LeQWKZ4=.c0e8b7dc-dca4-48ea-9ddf-4b00f102e148@github.com> Message-ID: <6UHdI2ZFRFPb4H5155iarl1OoP3HTCaKA4pkZJJk5lc=.5d98b15f-232c-4501-b834-ad8d1f275f7f@github.com> On Tue, 19 Aug 2025 10:25:34 GMT, Aleksey Shipilev wrote: >> src/hotspot/share/jfr/periodic/jfrOSInterface.cpp line 35: >> >>> 33: #include "utilities/ostream.hpp" >>> 34: >>> 35: #include // for environment variables >> >> I couldn't find any usage for this include, let me know if it should stay. It's been here for a long time: https://github.com/openjdk/jdk/commit/a060be188df894ed5c26fc12fc9e902f9af32bd3 > > I suspect it has to do with `generate_environment_variables_events()` here: > https://github.com/openjdk/jdk/pull/26800/files#diff-2d77a162387fd8e8a57c631e91543fa87889a7ef867725ecbfa37804b678fdabR83 > > Which does not have any implementation. I cannot find any code history about this as well; looks like it was unimplemented from day 1: > > > % git log -p --follow src/hotspot/ | grep generate_environment_variables_events > + void generate_environment_variables_events(); > > > So maybe keep this one intact, and submit another quick RFE to clean up both the header inclusion and the dead method declarations? It would also match the synopsis for current PR ("sort") better. Sure: f734135f2ecc399ef2aa2a2d150ebba454e5776d https://bugs.openjdk.org/browse/JDK-8365782 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26800#discussion_r2284870134 From mgronlun at openjdk.org Tue Aug 19 11:58:43 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Tue, 19 Aug 2025 11:58:43 GMT Subject: RFR: 8365614: JFR: Improve PrettyWriter::printValue In-Reply-To: References: Message-ID: On Sun, 17 Aug 2025 11:30:51 GMT, Erik Gahlin wrote: > Could I have a review of a PR that simplifies the PrettyWriter::printValue method so it uses switch expression. It also changes so null is never passed to the method, making the code more robust. > > Testing: jdk/jdk/jfr + manual comparison of output before and after so it hasn't changed Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26810#pullrequestreview-3131991254 From egahlin at openjdk.org Tue Aug 19 14:48:56 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Tue, 19 Aug 2025 14:48:56 GMT Subject: Integrated: 8365636: JFR: Minor cleanup In-Reply-To: <9mu1ONkHASHyy8qEo4G7oaIvM0R-n717TOsQMGAh6vg=.62dceb2c-826a-4798-81a3-81adb05e544d@github.com> References: <9mu1ONkHASHyy8qEo4G7oaIvM0R-n717TOsQMGAh6vg=.62dceb2c-826a-4798-81a3-81adb05e544d@github.com> Message-ID: On Sun, 17 Aug 2025 17:40:36 GMT, Erik Gahlin wrote: > Could I have review of Pr That cleans up various stuff (unnecessary imports, typos etc). > > Testing: jdk/jdk/jfr > > Thanks > Erik This pull request has now been integrated. Changeset: 0b2d0817 Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/0b2d0817f14895102600744670e4a6d4764b0259 Stats: 89 lines in 34 files changed: 1 ins; 16 del; 72 mod 8365636: JFR: Minor cleanup Reviewed-by: shade ------------- PR: https://git.openjdk.org/jdk/pull/26811 From shade at openjdk.org Tue Aug 19 15:11:45 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Tue, 19 Aug 2025 15:11:45 GMT Subject: RFR: 8365610: Sort share/jfr includes [v2] In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 10:53:25 GMT, Francesco Andreuzzi wrote: >> This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. >> >> Testing: >> - [x] tier1 >> - [x] tier2 > > Francesco Andreuzzi 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: > > - revert > - Merge branch 'master' into JDK-8365610 > - reorder Looks fine, thanks. ------------- Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26800#pullrequestreview-3132770097 From duke at openjdk.org Tue Aug 19 15:19:39 2025 From: duke at openjdk.org (Francesco Andreuzzi) Date: Tue, 19 Aug 2025 15:19:39 GMT Subject: RFR: 8365610: Sort share/jfr includes In-Reply-To: References: <4LAyQOzRNUaavo8sKS2fr-ojornnGkgCzhmaqJOAE_s=.d6443b31-668e-4991-9ec0-03268f88b5df@github.com> Message-ID: On Tue, 19 Aug 2025 10:10:56 GMT, Aleksey Shipilev wrote: >>> For Hotspot changes, you need to wait 24 hours, so people around the globe could take a look. >> >> Sure, so is it 24 hours after getting approval? I thought it's 24 hours after opening the PR. > >> > For Hotspot changes, you need to wait 24 hours, so people around the globe could take a look. >> >> Sure, so is it 24 hours after getting approval? I thought it's 24 hours after opening the PR. > > Ah no, you're right: https://openjdk.org/guide/#life-of-a-pr -- 24 hours is the bare minimum. It gets a bit murky around holidays/weekends, as people take time off or checkout on Friday earlier. But this looks fine. > > You also need a Review from one area expert (for JFR, Markus definitely qualifies), and another Review from any other reviewer. I'll do it shortly. Thanks for your reviews @shipilev and @mgronlun ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3201175425 From duke at openjdk.org Tue Aug 19 15:19:41 2025 From: duke at openjdk.org (duke) Date: Tue, 19 Aug 2025 15:19:41 GMT Subject: RFR: 8365610: Sort share/jfr includes [v2] In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 10:53:25 GMT, Francesco Andreuzzi wrote: >> This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. >> >> Testing: >> - [x] tier1 >> - [x] tier2 > > Francesco Andreuzzi 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: > > - revert > - Merge branch 'master' into JDK-8365610 > - reorder @fandreuz Your change (at version f734135f2ecc399ef2aa2a2d150ebba454e5776d) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26800#issuecomment-3201182213 From egahlin at openjdk.org Tue Aug 19 16:10:45 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Tue, 19 Aug 2025 16:10:45 GMT Subject: Integrated: 8365614: JFR: Improve PrettyWriter::printValue In-Reply-To: References: Message-ID: On Sun, 17 Aug 2025 11:30:51 GMT, Erik Gahlin wrote: > Could I have a review of a PR that simplifies the PrettyWriter::printValue method so it uses switch expression. It also changes so null is never passed to the method, making the code more robust. > > Testing: jdk/jdk/jfr + manual comparison of output before and after so it hasn't changed This pull request has now been integrated. Changeset: 024292ac Author: Erik Gahlin URL: https://git.openjdk.org/jdk/commit/024292ac4dde7e49816d82d5f8a30a3e11f44d18 Stats: 154 lines in 2 files changed: 23 ins; 66 del; 65 mod 8365614: JFR: Improve PrettyWriter::printValue Reviewed-by: mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26810 From egahlin at openjdk.org Tue Aug 19 19:02:36 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Tue, 19 Aug 2025 19:02:36 GMT Subject: RFR: 8365306: Provide OS Process Size and Libc statistic metrics to JFR In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 06:58:58 GMT, Thomas Stuefe wrote: > You mean adding the vsize, swap etc fields to ResidentSetSize? > > I thought about that, but then it would be weirdly misnamed. RSS has a very specific meaning. So we would have ResidentSetSize.vsize, ResidentSetSize.swap, ResidentSetSize.rss (?) I was thinking something like this: When it comes to non-rss metrics, there is a Swap event, but not sure it is appropriate? Regarding other metrics, perhaps they should go into other events, or perhaps new events should be created. I haven't had time to look into it. > Mainly, I can build myself graphs in JMC for all these fields in one graph and correlate all the values. Periodic events can be emitted with the same timestamp. That way they can be grouped together. This is what we do with NativeMemoryUsage and NativeMemoryTotal. These events will likely be around for a long time. We shouldn't design them just to match the workflow of one tool as it currently works. New functionality can be added in the future. > It is also cheaper to obtain (just one parsing operation for /proc/meminfo, for instance). We should not sacrifice the design unless the overhead is significant. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26756#issuecomment-3201882624 From stuefe at openjdk.org Wed Aug 20 05:24:38 2025 From: stuefe at openjdk.org (Thomas Stuefe) Date: Wed, 20 Aug 2025 05:24:38 GMT Subject: RFR: 8365306: Provide OS Process Size and Libc statistic metrics to JFR In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 18:59:18 GMT, Erik Gahlin wrote: > > You mean adding the vsize, swap etc fields to ResidentSetSize? > > I thought about that, but then it would be weirdly misnamed. RSS has a very specific meaning. So we would have ResidentSetSize.vsize, ResidentSetSize.swap, ResidentSetSize.rss (?) > > I was thinking something like this: > > ``` > > > > > > > > ``` Hmm, yes, that would be one alternative. > > When it comes to non-rss metrics, there is a Swap event, but not sure it is appropriate? Regarding other metrics, perhaps they should go into other events, or perhaps new events should be created. I haven't had time to look into it. > > > Mainly, I can build myself graphs in JMC for all these fields in one graph and correlate all the values. > > Periodic events can be emitted with the same timestamp. That way they can be grouped together. This is what we do with NativeMemoryUsage and NativeMemoryTotal. > > These events will likely be around for a long time. We shouldn't design them just to match the workflow of one tool as it currently works. New functionality can be added in the future. I spent a lot of the time allotted to this PR deliberating on how exactly to shape the events. I didn't want just to jam them in. And I agree. I dislike it how tight the coupling is between the data model and the renderer in the case of JMC. It leads to many UI inconsistencies and gives the wrong motivation. Unfortunately, we live in a world where JMC is the only serious and freely available tool, and where JFR protocol is not open, so I fear this is likely to stay that way. In the case of this PR, an argument can be made for grouping OS-side process-related metrics together into one event. Doing it the way I did is not absurd; this is how these metrics are often presented: vsize+rss+swap, complementing each other and giving a holistic view of the OS side of process memory consumption?especially rss+swap. You need swap to be able to explain rss. I also agonized about the platform-specific aspects of this. This is rather Linux-centric. But again, reality: Linux is by far the most important platform. On Windows, for example, we can ask for the size of the commit charge. That is a nice complementary information. On Linux, we also have a commit charge (as in, how much of the process memory was committed by the OS, underlaid with swap according to the kernel overcommit rules). That would be useful to know, since it can explain native OOMs when the OS runs out of swap. But I don't see a way to obtain that information on Linux. Since I only have the number on Windows, I left it out. And I realize this is a bit arbitrary, since I included values I only get for Linux. Shaping events the right way is hard, and I am thankful for any direction from your side. > > > It is also cheaper to obtain (just one parsing operation for /proc/meminfo, for instance). > > We should not sacrifice the design unless the overhead is significant. Hm, sure. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26756#issuecomment-3204233221 From dholmes at openjdk.org Wed Aug 20 12:28:38 2025 From: dholmes at openjdk.org (David Holmes) Date: Wed, 20 Aug 2025 12:28:38 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() In-Reply-To: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: On Fri, 15 Aug 2025 11:58:48 GMT, Artem Semenov wrote: > The defect has been detected and confirmed in the function ArchDesc::declareClasses() located in the file src/hotspot/share/adlc/output_h.cpp with static code analysis. This defect can potentially lead to a null pointer dereference. > > The pointer instr->_matrule is dereferenced in line 1952 without checking for nullptr, although earlier in line 1858 the same pointer is checked for nullptr, which indicates that it can be null. > > According to [this](https://github.com/openjdk/jdk/pull/26002#issuecomment-3023050372) comment, this PR contains fixes for similar cases in other places. Some alignment nits where you have added additional condition clauses. Some of these are difficult to evaluate in isolation and will need review from the specific component areas. src/hotspot/share/adlc/output_h.cpp line 1952: > 1950: }*/ > 1951: else if( instr->is_ideal_copy() && > 1952: (instr->_matrule != nullptr && instr->_matrule->_rChild != nullptr) && Suggestion: (instr->_matrule != nullptr && instr->_matrule->_rChild != nullptr) && src/hotspot/share/c1/c1_LinearScan.cpp line 4422: > 4420: > 4421: if ((cur != nullptr) && > 4422: (cur->from() < split_pos)) { Suggestion: (cur->from() < split_pos)) { src/hotspot/share/nmt/mallocSiteTable.cpp line 172: > 170: index < pos_idx && head != nullptr; > 171: index++, head = ((MallocSiteHashtableEntry*)head->next() == nullptr) ? head : > 172: (MallocSiteHashtableEntry*)head->next()) {} This doesn't look right to me. We check `head != nullptr` in the loop condition so we cannot reach the assignment if it is null. src/hotspot/share/opto/vectorIntrinsics.cpp line 1319: > 1317: log_if_needed(" ** not supported: arity=%d op=%s vlen=%d etype=%s atype=%s ismask=no", > 1318: is_scatter, is_scatter ? "scatter" : "gather", > 1319: num_elem, type2name(elem_bt), type2name(arr_type->elem()->array_element_basic_type())); There is a bug here but I'm not sure it is what you think it is. ------------- Changes requested by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26798#pullrequestreview-3136325292 PR Review Comment: https://git.openjdk.org/jdk/pull/26798#discussion_r2287976814 PR Review Comment: https://git.openjdk.org/jdk/pull/26798#discussion_r2287984002 PR Review Comment: https://git.openjdk.org/jdk/pull/26798#discussion_r2287993050 PR Review Comment: https://git.openjdk.org/jdk/pull/26798#discussion_r2287996530 From dholmes at openjdk.org Wed Aug 20 12:32:42 2025 From: dholmes at openjdk.org (David Holmes) Date: Wed, 20 Aug 2025 12:32:42 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() In-Reply-To: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: On Fri, 15 Aug 2025 11:58:48 GMT, Artem Semenov wrote: > The defect has been detected and confirmed in the function ArchDesc::declareClasses() located in the file src/hotspot/share/adlc/output_h.cpp with static code analysis. This defect can potentially lead to a null pointer dereference. > > The pointer instr->_matrule is dereferenced in line 1952 without checking for nullptr, although earlier in line 1858 the same pointer is checked for nullptr, which indicates that it can be null. > > According to [this](https://github.com/openjdk/jdk/pull/26002#issuecomment-3023050372) comment, this PR contains fixes for similar cases in other places. I've added some additional mailing lists to ensure better coverage here. Also I think you need to update the JBS (and PR) title to reflect the broader scope of the changes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26798#issuecomment-3206112684 From adinn at openjdk.org Wed Aug 20 14:22:37 2025 From: adinn at openjdk.org (Andrew Dinn) Date: Wed, 20 Aug 2025 14:22:37 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() In-Reply-To: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: On Fri, 15 Aug 2025 11:58:48 GMT, Artem Semenov wrote: > The defect has been detected and confirmed in the function ArchDesc::declareClasses() located in the file src/hotspot/share/adlc/output_h.cpp with static code analysis. This defect can potentially lead to a null pointer dereference. > > The pointer instr->_matrule is dereferenced in line 1952 without checking for nullptr, although earlier in line 1858 the same pointer is checked for nullptr, which indicates that it can be null. > > According to [this](https://github.com/openjdk/jdk/pull/26002#issuecomment-3023050372) comment, this PR contains fixes for similar cases in other places. I'm not clear that the original issue is necessarily a bug that needs fixing with a skip to the next else if case. The justification for adding `instr->_matrule != nullptr && instr->_matrule->_rChild != nullptr` to the if branch test is that earlier code allows for the possibility that `instr->_matrule` might be null. However, that check is performed in an unconditional context for any value of `instr` whereas this specific else branch limits the circumstance to the case where `instr->is_ideal_copy()` is found to be true. So, the prior test offers no guarantee that in this restricted case a null pointer should or should not be possible. The original design may assume that a successful test for `instr->is_ideal_copy()` ought to guarantee that both `instr->_matrule` and `instr->_matrule->_rChild` are non-null. That cannot be determined by the evidence offered. It can only be determined by looking at how instr is constructed. So, rather than just skip to the next case we might need to handle this with an assert and fix whatever code is producing an ideal copy with null fields. Given the level of analysis offered for this case I am suspicious as to whether the other cases tacked onto this issue ought to be accepted at face value without some justification as to why a null check and skip to the next case is correct. I'm also wondering how and why all these cases and associated amendments were arrived at? Is this perhaps based on output from a code analysis tool (perhaps even a genAI tool). If so then I think 1) we ought to be told and 2) we ought to treat its recommendations with a very healthy dose of skepticism. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26798#issuecomment-3206613521 From duke at openjdk.org Wed Aug 20 16:54:40 2025 From: duke at openjdk.org (Robert Toyonaga) Date: Wed, 20 Aug 2025 16:54:40 GMT Subject: RFR: 8365611: Use lookup table for JfrEventThrottler [v2] In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 13:41:51 GMT, Thomas Stuefe wrote: >> This patch prepares the way to throttle any JFR event, not only the three events for which we hard-code throttlers. It also cleans up the throttler code and replaces the switch construct with a lookup table. >> >> The patch does not yet enable throttling for any other event, since that may be a contentious move, and I would like for this patch to go in without too much fuss. So I did not make any new events "throttleble". >> >> If it turns out to be non-contentious, I am fine with just enabling throttling capability for all events. > > Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision: > > Markus Feedback I think that the reasoning behind this change makes sense (to avoid the risk of high overhead for a Unsafe.allocateMemory event). I agree there is also immediate benefit in generalizing the throttler code rather than hardcoding for specific event types. I've left a couple minor comments below: src/hotspot/share/jfr/recorder/service/jfrEventThrottler.cpp line 103: > 101: JfrEventThrottler* JfrEventThrottler::for_event(JfrEventId event_id) { > 102: JfrEventThrottler* const throttler = _throttler_table.at(event_id); > 103: assert(throttler != nullptr, "Event type %d has an unconfigured throttler", (int)event_id); The call to configure throttlers originates from up in the Java level JFR code. Would it be possible to attempt sampling when a throttler is created, but not yet configured? If this is possible, then it was possible before this PR too (not introduced here). src/hotspot/share/jfr/recorder/service/jfrEventThrottler.cpp line 109: > 107: void JfrEventThrottler::configure(JfrEventId event_id, int64_t sample_size, int64_t period_ms) { > 108: JfrEventThrottler* const throttler = _throttler_table.at(event_id); > 109: assert(throttler != nullptr, "Event type %d has an unconfigured throttler", (int)event_id); Small nitpick: it's actually just checking that the throttler exists. We configure it on the next line. If it doesn't make sense to make this distinction, feel free to ignore this. ------------- Marked as reviewed by roberttoyonaga at github.com (no known OpenJDK username). PR Review: https://git.openjdk.org/jdk/pull/26801#pullrequestreview-3137462451 PR Review Comment: https://git.openjdk.org/jdk/pull/26801#discussion_r2288759661 PR Review Comment: https://git.openjdk.org/jdk/pull/26801#discussion_r2288747936 From duke at openjdk.org Wed Aug 20 17:24:45 2025 From: duke at openjdk.org (Francesco Andreuzzi) Date: Wed, 20 Aug 2025 17:24:45 GMT Subject: Integrated: 8365610: Sort share/jfr includes In-Reply-To: References: Message-ID: <31mvWaEYnLUFv4czPcKW6vZKOzyJIEtEoWyFVcznVsE=.4b4c9da2-e537-44c0-ab94-635ed857be6e@github.com> On Fri, 15 Aug 2025 13:30:33 GMT, Francesco Andreuzzi wrote: > This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted. > > Testing: > - [x] tier1 > - [x] tier2 This pull request has now been integrated. Changeset: ecab52c0 Author: Francesco Andreuzzi Committer: Volker Simonis URL: https://git.openjdk.org/jdk/commit/ecab52c09b078201ebeb8d45c0982b0481e15dc3 Stats: 171 lines in 55 files changed: 82 ins; 87 del; 2 mod 8365610: Sort share/jfr includes Reviewed-by: shade, mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/26800 From duke at openjdk.org Wed Aug 20 20:00:37 2025 From: duke at openjdk.org (Robert Toyonaga) Date: Wed, 20 Aug 2025 20:00:37 GMT Subject: RFR: 8365306: Provide OS Process Size and Libc statistic metrics to JFR In-Reply-To: References: Message-ID: On Wed, 20 Aug 2025 05:22:23 GMT, Thomas Stuefe wrote: >>> You mean adding the vsize, swap etc fields to ResidentSetSize? >>> >>> I thought about that, but then it would be weirdly misnamed. RSS has a very specific meaning. So we would have ResidentSetSize.vsize, ResidentSetSize.swap, ResidentSetSize.rss (?) >> >> I was thinking something like this: >> >> >> >> >> >> >> >> >> >> >> >> When it comes to non-rss metrics, there is a Swap event, but not sure it is appropriate? Regarding other metrics, perhaps they should go into other events, or perhaps new events should be created. I haven't had time to look into it. >> >>> Mainly, I can build myself graphs in JMC for all these fields in one graph and correlate all the values. >> >> Periodic events can be emitted with the same timestamp. That way they can be grouped together. This is what we do with NativeMemoryUsage and NativeMemoryTotal. >> >> These events will likely be around for a long time. We shouldn't design them just to match the workflow of one tool as it currently works. New functionality can be added in the future. >> >>> It is also cheaper to obtain (just one parsing operation for /proc/meminfo, for instance). >> >> We should not sacrifice the design unless the overhead is significant. > >> > You mean adding the vsize, swap etc fields to ResidentSetSize? >> > I thought about that, but then it would be weirdly misnamed. RSS has a very specific meaning. So we would have ResidentSetSize.vsize, ResidentSetSize.swap, ResidentSetSize.rss (?) >> >> I was thinking something like this: >> >> ``` >> >> >> >> >> >> >> >> ``` > > Hmm, yes, that would be one alternative. > >> >> When it comes to non-rss metrics, there is a Swap event, but not sure it is appropriate? Regarding other metrics, perhaps they should go into other events, or perhaps new events should be created. I haven't had time to look into it. >> >> > Mainly, I can build myself graphs in JMC for all these fields in one graph and correlate all the values. >> >> Periodic events can be emitted with the same timestamp. That way they can be grouped together. This is what we do with NativeMemoryUsage and NativeMemoryTotal. >> >> These events will likely be around for a long time. We shouldn't design them just to match the workflow of one tool as it currently works. New functionality can be added in the future. > > I spent a lot of the time allotted to this PR deliberating on how exactly to shape the events. I didn't want just to jam them in. And I agree. I dislike it how tight the coupling is between the data model and the renderer in the case of JMC. It leads to many UI inconsistencies and gives the wrong motivation. > > Unfortunately, we live in a world where JMC is the only serious and freely available tool, and where JFR protocol is not open, so I fear this is likely to stay that way. > > In the case of this PR, an argument can be made for grouping OS-side process-related metrics together into one event. Doing it the way I did is not absurd; this is how these metrics are often presented: vsize+rss+swap, complementing each other and giving a holistic view of the OS side of process memory consumption?especially rss+swap. You need swap to be able to explain rss. > > I also agonized about the platform-specific aspects of this. This is rather Linux-centric. But again, reality: Linux is by far the most important platform. > > On Windows, for exa... @tstuefe I think that putting those metrics (vsize, swap, rss, etc) under a new `ProcessSize` event (while not touching `jdk.ResidentSetSize`) makes sense. - This allows JMC to continue as normal - And also keeps the relevant metrics together so they can be easily interpreted in relation to each other. - @egahlin , is there a procedure for deprecating event types? Or are events permanent once introduced? If you decide to go this route, maybe it would be possible to mark the `jdk.ResidentSetSize` event for deprecation at some point in the future to allow JMC time to eventually switch over to using the new event for its charts? > When it comes to non-rss metrics, there is a Swap event, but not sure it is appropriate? I think this new swap data is process-specific so is not already covered by `jdk.SwapSpace`, which shows the max amount available and how much is currently free to the OS. I think it could be reasonable to leave the process' swap data in `ProcessSize` rather than the `jdk.SwapSpace` which contains data for the whole OS. The connecting thread is that this info is a "process" metric being grouped with other memory metrics for this specific process. Another option, in order to avoid duplication, could be to leave the RSS metrics in the `jdk.ResidentSetSize` event, not put them in the `ProcessSize` event, and correlate them by giving them the same timestamp as (Erik mentions above). Something similar was also done with the `NativeMemoryUsagePeak` and `NativeMemoryUsageTotalPeak` events (which are GraalVM specific) to avoid having to modify `NativeMemoryUsage` and `NativeMemoryUsageTotal`. Admittedly, this is not as clean or convenient. Either way, I agree that putting all the metrics in `ProcessSize` in their own individual events is not the best way. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26756#issuecomment-3207897026 From egahlin at openjdk.org Wed Aug 20 20:52:04 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Wed, 20 Aug 2025 20:52:04 GMT Subject: RFR: 8365815: JFR: Update metadata.xml with 'jfr query' examples Message-ID: Could I have a review of a PR that adds a couple of 'jfr query' examples to metadata.xml? It turns out that the EventDuration event doesn't work because it has no fields. The fix is to remove the class-specific commit() method and constructor for events without fields. Testing: test/jdk/jdk/jfr + tier1 Thanks Erik ------------- Commit messages: - Initial Changes: https://git.openjdk.org/jdk/pull/26869/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26869&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365815 Stats: 15 lines in 2 files changed: 13 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/26869.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26869/head:pull/26869 PR: https://git.openjdk.org/jdk/pull/26869 From egahlin at openjdk.org Thu Aug 21 05:21:23 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Thu, 21 Aug 2025 05:21:23 GMT Subject: RFR: 8365815: JFR: Update metadata.xml with 'jfr query' examples [v2] In-Reply-To: References: Message-ID: > Could I have a review of a PR that adds a couple of 'jfr query' examples to metadata.xml? > > It turns out that the EventDuration event doesn't work because it has no fields. The fix is to remove the class-specific commit() method and constructor for events without fields. > > Testing: test/jdk/jdk/jfr + tier1 > > Thanks > Erik Erik Gahlin has updated the pull request incrementally with one additional commit since the last revision: Add view output ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26869/files - new: https://git.openjdk.org/jdk/pull/26869/files/604b86de..9d54c0e5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26869&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26869&range=00-01 Stats: 17 lines in 1 file changed: 13 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/26869.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26869/head:pull/26869 PR: https://git.openjdk.org/jdk/pull/26869 From asemenov at openjdk.org Thu Aug 21 09:01:12 2025 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 21 Aug 2025 09:01:12 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() [v2] In-Reply-To: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: > The defect has been detected and confirmed in the function ArchDesc::declareClasses() located in the file src/hotspot/share/adlc/output_h.cpp with static code analysis. This defect can potentially lead to a null pointer dereference. > > The pointer instr->_matrule is dereferenced in line 1952 without checking for nullptr, although earlier in line 1858 the same pointer is checked for nullptr, which indicates that it can be null. > > According to [this](https://github.com/openjdk/jdk/pull/26002#issuecomment-3023050372) comment, this PR contains fixes for similar cases in other places. Artem Semenov has updated the pull request incrementally with two additional commits since the last revision: - Update src/hotspot/share/c1/c1_LinearScan.cpp Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com> - Update src/hotspot/share/adlc/output_h.cpp Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26798/files - new: https://git.openjdk.org/jdk/pull/26798/files/80777ced..dd21148b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26798&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26798&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/26798.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26798/head:pull/26798 PR: https://git.openjdk.org/jdk/pull/26798 From asemenov at openjdk.org Thu Aug 21 09:11:53 2025 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 21 Aug 2025 09:11:53 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() [v2] In-Reply-To: References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: On Wed, 20 Aug 2025 12:20:51 GMT, David Holmes wrote: >> Artem Semenov has updated the pull request incrementally with two additional commits since the last revision: >> >> - Update src/hotspot/share/c1/c1_LinearScan.cpp >> >> Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com> >> - Update src/hotspot/share/adlc/output_h.cpp >> >> Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com> > > src/hotspot/share/nmt/mallocSiteTable.cpp line 172: > >> 170: index < pos_idx && head != nullptr; >> 171: index++, head = ((MallocSiteHashtableEntry*)head->next() == nullptr) ? head : >> 172: (MallocSiteHashtableEntry*)head->next()) {} > > This doesn't look right to me. We check `head != nullptr` in the loop condition so we cannot reach the assignment if it is null. A situation is possible where head becomes nullptr when head->next() returns nullptr on the last iteration. Then, after the loop finishes, assert(head != nullptr) will trigger (only in debug mode), and return head->data() will cause a program error ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26798#discussion_r2290418847 From cito at openjdk.org Thu Aug 21 09:27:43 2025 From: cito at openjdk.org (Chihiro Ito) Date: Thu, 21 Aug 2025 09:27:43 GMT Subject: RFR: 8365066: RecordingStream and RemoteRecordingStream do not terminate when the associated Recording is stopped or closed externally Message-ID: Fix an issue where RecordingStream and RemoteRecordingStream do not stop when their underlying the local/remote recording stop. Introduce an internal EventSource abstraction to unify control across local (PlatformRecording) and remote (FlightRecorderMXBean) recordings, ensuring consistent propagation of stop/close and stop time to the consumer streams. Tests updated to validate lifecycle consistency: Verifies that stopping/closing the underlying recording (local and remote) properly stops/closes the corresponding stream. Test: jdk/jdk/jfr ------------- Commit messages: - 8365066: RecordingStream and RemoteRecordingStream do not terminate when the associated Recording is stopped or closed externally Changes: https://git.openjdk.org/jdk/pull/26710/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26710&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365066 Stats: 648 lines in 7 files changed: 584 ins; 30 del; 34 mod Patch: https://git.openjdk.org/jdk/pull/26710.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26710/head:pull/26710 PR: https://git.openjdk.org/jdk/pull/26710 From cito at openjdk.org Thu Aug 21 09:27:43 2025 From: cito at openjdk.org (Chihiro Ito) Date: Thu, 21 Aug 2025 09:27:43 GMT Subject: RFR: 8365066: RecordingStream and RemoteRecordingStream do not terminate when the associated Recording is stopped or closed externally In-Reply-To: References: Message-ID: <0lFoRfCUlAVk-7LwYZ3Ps67pBUnLlHm0fIPpTd_XNko=.d69fa0b4-f72f-4345-8365-10d658f29958@github.com> On Sat, 9 Aug 2025 04:50:26 GMT, Erik Gahlin wrote: >> Fix an issue where RecordingStream and RemoteRecordingStream do not stop when their underlying the local/remote recording stop. >> >> Introduce an internal EventSource abstraction to unify control across local (PlatformRecording) and remote (FlightRecorderMXBean) recordings, ensuring consistent propagation of stop/close and stop time to the consumer streams. >> >> Tests updated to validate lifecycle consistency: >> Verifies that stopping/closing the underlying recording (local and remote) properly stops/closes the corresponding stream. >> >> Test: jdk/jdk/jfr > > Did you look into adding a FlightRecorderListener and implementing recordingStateChanged to check if the RecordingState is CLOSED and then call close() on the stream? Or perhaps it would be better to set a flag and let the thread running the stream close itself after the next flush is complete. > > For a RemoteRecordingStream there is a JMX notification that can be listened on. @egahlin That sounds like a good idea. I?ll give it a try. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26710#issuecomment-3179096227 From egahlin at openjdk.org Thu Aug 21 09:27:43 2025 From: egahlin at openjdk.org (Erik Gahlin) Date: Thu, 21 Aug 2025 09:27:43 GMT Subject: RFR: 8365066: RecordingStream and RemoteRecordingStream do not terminate when the associated Recording is stopped or closed externally In-Reply-To: References: Message-ID: On Sat, 9 Aug 2025 01:33:29 GMT, Chihiro Ito wrote: > Fix an issue where RecordingStream and RemoteRecordingStream do not stop when their underlying the local/remote recording stop. > > Introduce an internal EventSource abstraction to unify control across local (PlatformRecording) and remote (FlightRecorderMXBean) recordings, ensuring consistent propagation of stop/close and stop time to the consumer streams. > > Tests updated to validate lifecycle consistency: > Verifies that stopping/closing the underlying recording (local and remote) properly stops/closes the corresponding stream. > > Test: jdk/jdk/jfr Did you look into adding a FlightRecorderListener and implementing recordingStateChanged to check if the RecordingState is CLOSED and then call close() on the stream? Or perhaps it would be better to set a flag and let the thread running the stream close itself after the next flush is complete. For a RemoteRecordingStream there is a JMX notification that can be listened on. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26710#issuecomment-3170208274 From aturbanov at openjdk.org Thu Aug 21 09:27:50 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Thu, 21 Aug 2025 09:27:50 GMT Subject: RFR: 8365066: RecordingStream and RemoteRecordingStream do not terminate when the associated Recording is stopped or closed externally In-Reply-To: References: Message-ID: On Sat, 9 Aug 2025 01:33:29 GMT, Chihiro Ito wrote: > Fix an issue where RecordingStream and RemoteRecordingStream do not stop when their underlying the local/remote recording stop. > > Introduce an internal EventSource abstraction to unify control across local (PlatformRecording) and remote (FlightRecorderMXBean) recordings, ensuring consistent propagation of stop/close and stop time to the consumer streams. > > Tests updated to validate lifecycle consistency: > Verifies that stopping/closing the underlying recording (local and remote) properly stops/closes the corresponding stream. > > Test: jdk/jdk/jfr src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventDirectoryStream.java line 171: > 169: } > 170: > 171: if(!barrier.used()) { Suggestion: if (!barrier.used()) { src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventDirectoryStream.java line 195: > 193: } > 194: > 195: if(!barrier.used()) { Suggestion: if (!barrier.used()) { src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventDirectoryStream.java line 200: > 198: logStreamEnd("Event source is closed externally"); > 199: return; > 200: }else if(state == RecordingState.STOPPED) { Suggestion: } else if (state == RecordingState.STOPPED) { src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/LocalRecordingEventSource.java line 57: > 55: > 56: @Override > 57: public RecordingState getState() { Suggestion: public RecordingState getState() { src/jdk.management.jfr/share/classes/jdk/management/jfr/RemoteRecordingStream.java line 470: > 468: stream.close(); > 469: try { > 470: if(eventSource.getState() != RecordingState.CLOSED) { Suggestion: if (eventSource.getState() != RecordingState.CLOSED) { src/jdk.management.jfr/share/classes/jdk/management/jfr/internal/RemoteRecordingEventSource.java line 48: > 46: public long getStopTime() { > 47: Optional recordingInfo = mbean.getRecordings().stream().filter(r -> r.getId() == recordingId).findFirst(); > 48: if(recordingInfo.isEmpty()){ Suggestion: if (recordingInfo.isEmpty()){ src/jdk.management.jfr/share/classes/jdk/management/jfr/internal/RemoteRecordingEventSource.java line 55: > 53: > 54: @Override > 55: public RecordingState getState() { Suggestion: public RecordingState getState() { src/jdk.management.jfr/share/classes/jdk/management/jfr/internal/RemoteRecordingEventSource.java line 57: > 55: public RecordingState getState() { > 56: Optional recordingInfo = mbean.getRecordings().stream().filter(r -> r.getId() == recordingId).findFirst(); > 57: if(recordingInfo.isEmpty()){ Suggestion: if (recordingInfo.isEmpty()){ src/jdk.management.jfr/share/classes/jdk/management/jfr/internal/RemoteRecordingEventSource.java line 58: > 56: Optional recordingInfo = mbean.getRecordings().stream().filter(r -> r.getId() == recordingId).findFirst(); > 57: if(recordingInfo.isEmpty()){ > 58: return RecordingState.CLOSED; Suggestion: return RecordingState.CLOSED; test/jdk/jdk/jfr/api/consumer/recordingstream/TestClosedRecording.java line 47: > 45: @Override > 46: public void recordingStateChanged(Recording recording) { > 47: if(recording.getState() == RecordingState.RUNNING){ Suggestion: if (recording.getState() == RecordingState.RUNNING){ test/jdk/jdk/jfr/api/consumer/recordingstream/TestStoppedRecording.java line 44: > 42: public class TestStoppedRecording { > 43: > 44: private static class SendEventListener implements FlightRecorderListener{ Suggestion: private static class SendEventListener implements FlightRecorderListener { test/jdk/jdk/jfr/api/consumer/recordingstream/TestStoppedRecording.java line 47: > 45: @Override > 46: public void recordingStateChanged(Recording recording) { > 47: if(recording.getState() == RecordingState.RUNNING){ Suggestion: if (recording.getState() == RecordingState.RUNNING){ test/jdk/jdk/jfr/jmx/streaming/TestClosedRecording.java line 49: > 47: @Override > 48: public void recordingStateChanged(Recording recording) { > 49: if(recording.getState() == RecordingState.RUNNING){ Suggestion: if (recording.getState() == RecordingState.RUNNING){ test/jdk/jdk/jfr/jmx/streaming/TestStoppedRecording.java line 49: > 47: @Override > 48: public void recordingStateChanged(Recording recording) { > 49: if(recording.getState() == RecordingState.RUNNING){ Suggestion: if (recording.getState() == RecordingState.RUNNING){ ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2268786865 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2268787115 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2269049532 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2268786126 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2268785446 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2269052713 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2269053453 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2269053705 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2269053990 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2268784511 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2269051861 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2269050262 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2268784953 PR Review Comment: https://git.openjdk.org/jdk/pull/26710#discussion_r2269050747 From mgronlun at openjdk.org Thu Aug 21 09:57:54 2025 From: mgronlun at openjdk.org (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Thu, 21 Aug 2025 09:57:54 GMT Subject: RFR: 8365611: Use lookup table for JfrEventThrottler [v2] In-Reply-To: References: Message-ID: On Wed, 20 Aug 2025 16:47:44 GMT, Robert Toyonaga wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision: >> >> Markus Feedback > > src/hotspot/share/jfr/recorder/service/jfrEventThrottler.cpp line 103: > >> 101: JfrEventThrottler* JfrEventThrottler::for_event(JfrEventId event_id) { >> 102: JfrEventThrottler* const throttler = _throttler_table.at(event_id); >> 103: assert(throttler != nullptr, "Event type %d has an unconfigured throttler", (int)event_id); > > The call to configure throttlers originates from up in the Java level JFR code. Would it be possible to attempt sampling when a throttler is created, but not yet configured? > > If this is possible, then it was possible before this PR too (not introduced here). The settings system prevents this situation, because configure -> !enabled ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26801#discussion_r2290535281 From adinn at openjdk.org Thu Aug 21 10:01:59 2025 From: adinn at openjdk.org (Andrew Dinn) Date: Thu, 21 Aug 2025 10:01:59 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() [v2] In-Reply-To: References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: On Thu, 21 Aug 2025 09:08:58 GMT, Artem Semenov wrote: >> src/hotspot/share/nmt/mallocSiteTable.cpp line 172: >> >>> 170: index < pos_idx && head != nullptr; >>> 171: index++, head = ((MallocSiteHashtableEntry*)head->next() == nullptr) ? head : >>> 172: (MallocSiteHashtableEntry*)head->next()) {} >> >> This doesn't look right to me. We check `head != nullptr` in the loop condition so we cannot reach the assignment if it is null. > > A situation is possible where head becomes nullptr when head->next() returns nullptr on the last iteration. Then, after the loop finishes, assert(head != nullptr) will trigger (only in debug mode), and return head->data() will cause a program error Hmm, is it possible? Perhaps you could explain how pos_idx is being used in this loop to guard against that happening and why that does not make this safe? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26798#discussion_r2290543955 From adinn at openjdk.org Thu Aug 21 10:17:56 2025 From: adinn at openjdk.org (Andrew Dinn) Date: Thu, 21 Aug 2025 10:17:56 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() [v2] In-Reply-To: References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: On Thu, 21 Aug 2025 09:01:12 GMT, Artem Semenov wrote: >> The defect has been detected and confirmed in the function ArchDesc::declareClasses() located in the file src/hotspot/share/adlc/output_h.cpp with static code analysis. This defect can potentially lead to a null pointer dereference. >> >> The pointer instr->_matrule is dereferenced in line 1952 without checking for nullptr, although earlier in line 1858 the same pointer is checked for nullptr, which indicates that it can be null. >> >> According to [this](https://github.com/openjdk/jdk/pull/26002#issuecomment-3023050372) comment, this PR contains fixes for similar cases in other places. > > Artem Semenov has updated the pull request incrementally with two additional commits since the last revision: > > - Update src/hotspot/share/c1/c1_LinearScan.cpp > > Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com> > - Update src/hotspot/share/adlc/output_h.cpp > > Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com> n.b. Before accepting any of the changes in this PR I'd really like to know whether they have arisen from reports of an actual null pointer dereference or they are simply derived from some theoretical analysis. In the latter case then I think we would need a better explanation of why an error can happen than we have seen so far. Given that requirement I also think each of the changes should be submitted in its own PR with its own justification. We should not modify control flow logic on the nod. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26798#issuecomment-3209906082 From asemenov at openjdk.org Thu Aug 21 10:34:03 2025 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 21 Aug 2025 10:34:03 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() In-Reply-To: References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: On Wed, 20 Aug 2025 12:29:34 GMT, David Holmes wrote: > I've added some additional mailing lists to ensure better coverage here. > > Also I think you need to update the JBS (and PR) title to reflect the broader scope of the changes. Please provide an example of an updated title? ------------- PR Comment: https://git.openjdk.org/jdk/pull/26798#issuecomment-3209975632 From asemenov at openjdk.org Thu Aug 21 10:34:04 2025 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 21 Aug 2025 10:34:04 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() [v2] In-Reply-To: References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: On Wed, 20 Aug 2025 12:22:18 GMT, David Holmes wrote: >> Artem Semenov has updated the pull request incrementally with two additional commits since the last revision: >> >> - Update src/hotspot/share/c1/c1_LinearScan.cpp >> >> Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com> >> - Update src/hotspot/share/adlc/output_h.cpp >> >> Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com> > > src/hotspot/share/opto/vectorIntrinsics.cpp line 1319: > >> 1317: log_if_needed(" ** not supported: arity=%d op=%s vlen=%d etype=%s atype=%s ismask=no", >> 1318: is_scatter, is_scatter ? "scatter" : "gather", >> 1319: num_elem, type2name(elem_bt), type2name(arr_type->elem()->array_element_basic_type())); > > There is a bug here but I'm not sure it is what you think it is. ```addr_type->isa_aryptr();``` might return nullptr, while in ```elem_consistent_with_arr(elem_bt, arr_type, false)```, arr_type is only checked with an assert. Moreover, the presence of a check in the original version indicates that arr_type can be null, and there is no protection against this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26798#discussion_r2290615638 From asemenov at openjdk.org Thu Aug 21 11:11:56 2025 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 21 Aug 2025 11:11:56 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() [v2] In-Reply-To: References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: On Thu, 21 Aug 2025 09:59:01 GMT, Andrew Dinn wrote: >> A situation is possible where head becomes nullptr when head->next() returns nullptr on the last iteration. Then, after the loop finishes, assert(head != nullptr) will trigger (only in debug mode), and return head->data() will cause a program error > > Hmm, is it possible? > > Perhaps you could explain how pos_idx is being used in this loop to guard against that happening and why that does not make this safe? ```head->next()``` returns a pointer to _next without any checks. In turn, the _next pointer is marked as volatile, which means it can be modified at any moment, for example, in another thread. >From this, I conclude that a check in this location is desirable. Moreover, pos_idx is also not being checked. It is quite possible that ```head->next()``` could turn out to be nullptr. But I don?t mind. If you are sure that there can?t be a nullptr in this place, I will withdraw this patch. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26798#discussion_r2290701959 From adinn at openjdk.org Thu Aug 21 12:11:53 2025 From: adinn at openjdk.org (Andrew Dinn) Date: Thu, 21 Aug 2025 12:11:53 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() [v2] In-Reply-To: References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: On Thu, 21 Aug 2025 11:09:12 GMT, Artem Semenov wrote: > Moreover, pos_idx is also not being checked I don't know what you mean by this comment. `pos_idx` is being checked in the loop test before the call to `head->next()` in that same test. The important question you need to address is why and what that check guarantees. I say you need to address it because you are the one claiming that there is a possible nullptr dereference here without any evidence that it has occurred in practice. If that is based on a correct analysis of the code then you need to explain how we can arrive at a situtation where we hit a null pointer that takes into account the logic of the loop test. So far you have not done so. n.b. I am not claiming there is no possibility of a nullptr dereference here (although I can form my own opinion). I'm asking you to tell me why I should take your claim that it is possible seriously. Your answers so far are not convincing me that you have understood how this code works. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26798#discussion_r2290852355 From asemenov at openjdk.org Thu Aug 21 13:21:02 2025 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 21 Aug 2025 13:21:02 GMT Subject: RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() [v2] In-Reply-To: References: <3lBcWmU_crhlwmnXaBl3ljOS87FTJ4VDZUC_kwlFC0A=.45fbea2f-4b39-4e15-a4a3-31b74c483748@github.com> Message-ID: On Thu, 21 Aug 2025 12:09:38 GMT, Andrew Dinn wrote: >> ```head->next()``` returns a pointer to _next without any checks. >> >> In turn, the _next pointer is marked as volatile, which means it can be modified at any moment, for example, in another thread. >> >> From this, I conclude that a check in this location is desirable. Moreover, pos_idx is also not being checked. It is quite possible that ```head->next()``` could turn out to be nullptr. >> >> But I don?t mind. If you are sure that there can?t be a nullptr in this place, I will withdraw this patch. > >> Moreover, pos_idx is also not being checked > > I don't know what you mean by this comment. `pos_idx` is being checked in the loop test before the call to `head->next()` in that same test. > > The important question you need to address is why and what that check guarantees. I say you need to address it because you are the one claiming that there is a possible nullptr dereference here without any evidence that it has occurred in practice. If that is based on a correct analysis of the code then you need to explain how we can arrive at a situtation where we hit a null pointer that takes into account the logic of the loop test. So far you have not done so. > > n.b. I am not claiming there is no possibility of a nullptr dereference here (although I can form my own opinion). I'm asking you to tell me why I should take your claim that it is possible seriously. Your answers so far are not convincing me that you have understood how this code works. pos_idx receives its value when calling a certain function pos_idx_from_marker(marker), and there is no check before the loop to ensure that it is within the bounds of the _table size. I mentioned above that I am not insisting on this particular patch. This issue was detected by a static analyzer and confirmed by a specialist from another organization. After that, based on my limited knowledge, I considered it confirmed? If you have any refutation, please share your thoughts. In that case, I will revert this patch and mark the trigger as ?NO FIX REQUIRED?. As far as I have checked, there are no checks anywhere in the calls to this function to compare the marker with the table or any other entities in any form. I certainly do not claim to understand this code as well as you or any other member of the hotspot team. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26798#discussion_r2291041769