From tommy.ludwig at broadcom.com Tue Jun 3 10:07:17 2025 From: tommy.ludwig at broadcom.com (Tommy Ludwig) Date: Tue, 3 Jun 2025 19:07:17 +0900 Subject: Timeline for new JMH release Message-ID: It's been a while since the last release (1.37), and a number of changes have been made since then[1]. Are there plans on when to do another release? In particular, I'd be interested in trying out the new xctrace-based profiler, and it'd be convenient if it were available in a released version. [1] https://github.com/openjdk/jmh/compare/1.37...872b7203c294d90c17766d19fc9f71cea5885380 -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5466 bytes Desc: S/MIME Cryptographic Signature URL: From shipilev at amazon.de Tue Jun 3 18:51:05 2025 From: shipilev at amazon.de (Aleksey Shipilev) Date: Tue, 3 Jun 2025 20:51:05 +0200 Subject: Timeline for new JMH release In-Reply-To: References: Message-ID: <7d89e1d0-d8ef-4c43-99f0-5208d32f5013@amazon.de> On 03.06.25 12:07, Tommy Ludwig wrote: > It's been a while since the last release (1.37), and a number of > changes have been made since then[1]. Are there plans on when to do > another release? In particular, I'd be interested in trying out the > new xctrace-based profiler, and it'd be convenient if it were > available in a released version. Yes! Hopefully, soon. Apologies for delay, we keep crunching on other things (at the moment: JDK 25). -Aleksey Amazon Web Services Development Center Germany GmbH Tamara-Danz-Str. 13 10243 Berlin Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B Sitz: Berlin Ust-ID: DE 365 538 597 From galder at openjdk.org Tue Jun 17 12:36:20 2025 From: galder at openjdk.org (Galder =?UTF-8?B?WmFtYXJyZcOxbw==?=) Date: Tue, 17 Jun 2025 12:36:20 GMT Subject: RFR: [Fibula] Make OutputFormatAdapter public Message-ID: This is the first in a series of PRs that I will be sending over the next few days, which make extending JMH to benchmark Java code running as GraalVM native images more easily. The codename for this extension is Fibula. It can still work without this PRs but without them the extension has to duplicate code that exists in JMH, which is not desirable. In this PR, we make `OutputFormatAdapter` public. Why do that? This enables Fibula to reuse the same class when it wants to redirect the output from the process to the JMH output. This is useful for example when Fibula's PGO integration invokes native image to recreate the binary with the profiling information, see https://github.com/galderz/fibula/commit/20eaf64936ef3e8f77eaed2ac7e8094b57e66a8d ------------- Commit messages: - Make OutputFormatAdapter public Changes: https://git.openjdk.org/jmh/pull/158/files Webrev: https://webrevs.openjdk.org/?repo=jmh&pr=158&range=00 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jmh/pull/158.diff Fetch: git fetch https://git.openjdk.org/jmh.git pull/158/head:pull/158 PR: https://git.openjdk.org/jmh/pull/158 From galder at openjdk.org Tue Jun 17 12:36:20 2025 From: galder at openjdk.org (Galder =?UTF-8?B?WmFtYXJyZcOxbw==?=) Date: Tue, 17 Jun 2025 12:36:20 GMT Subject: RFR: [Fibula] Make OutputFormatAdapter public In-Reply-To: References: Message-ID: On Tue, 17 Jun 2025 12:31:28 GMT, Galder Zamarre?o wrote: > This is the first in a series of PRs that I will be sending over the next few days, which make extending JMH to benchmark Java code running as GraalVM native images more easily. The codename for this extension is Fibula. It can still work without this PRs but without them the extension has to duplicate code that exists in JMH, which is not desirable. > > In this PR, we make `OutputFormatAdapter` public. > > Why do that? This enables Fibula to reuse the same class when it wants to redirect the output from the process to the JMH output. This is useful for example when Fibula's PGO integration invokes native image to recreate the binary with the profiling information, see https://github.com/galderz/fibula/commit/20eaf64936ef3e8f77eaed2ac7e8094b57e66a8d Oh forgot, I'll create a CODETOOLS issue for each of these PRs, coming... ------------- PR Comment: https://git.openjdk.org/jmh/pull/158#issuecomment-2980198087 From apangin at openjdk.org Wed Jun 25 01:12:01 2025 From: apangin at openjdk.org (Andrei Pangin) Date: Wed, 25 Jun 2025 01:12:01 GMT Subject: RFR: 7904047: JMH: support async-profiler 4.0 options Message-ID: JMH has built-in capability for running benchmarks with async-profiler. `-prof async` supports commonly used async-profiler options, however, these options became a bit outdated and don't reflect features appeared in async-profiler 3.0 and 4.0. Async-profiler users [get confused](https://github.com/async-profiler/async-profiler/discussions/1345) why certain async-profiler options don't work with JMH. This PR: - updates async-profiler stack walking modes: `dwarf`, `vm`, `vmx`; - adds native memory profiling option; - adds OTLP output format; - introduces `norm` and `lib` flags for tuning async-profiler frame names; - fixes minor inaccuracies in option description. ------------- Commit messages: - Add async-profiler 4.0 options Changes: https://git.openjdk.org/jmh/pull/159/files Webrev: https://webrevs.openjdk.org/?repo=jmh&pr=159&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7904047 Stats: 58 lines in 1 file changed: 38 ins; 10 del; 10 mod Patch: https://git.openjdk.org/jmh/pull/159.diff Fetch: git fetch https://git.openjdk.org/jmh.git pull/159/head:pull/159 PR: https://git.openjdk.org/jmh/pull/159 From apangin at openjdk.org Wed Jun 25 01:21:15 2025 From: apangin at openjdk.org (Andrei Pangin) Date: Wed, 25 Jun 2025 01:21:15 GMT Subject: RFR: 7904047: JMH: support async-profiler 4.0 options [v2] In-Reply-To: References: Message-ID: > JMH has built-in capability for running benchmarks with async-profiler. `-prof async` supports commonly used async-profiler options, however, these options became a bit outdated and don't reflect features appeared in async-profiler 3.0 and 4.0. > > Async-profiler users [get confused](https://github.com/async-profiler/async-profiler/discussions/1345) why certain async-profiler options don't work with JMH. > > This PR: > - updates async-profiler stack walking modes: `dwarf`, `vm`, `vmx`; > - adds native memory profiling option; > - adds OTLP output format; > - introduces `norm` and `lib` flags for tuning async-profiler frame names; > - fixes minor inaccuracies in option description. Andrei Pangin has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: 7904047: JMH: support async-profiler 4.0 options ------------- Changes: - all: https://git.openjdk.org/jmh/pull/159/files - new: https://git.openjdk.org/jmh/pull/159/files/667d5283..b63fec28 Webrevs: - full: https://webrevs.openjdk.org/?repo=jmh&pr=159&range=01 - incr: https://webrevs.openjdk.org/?repo=jmh&pr=159&range=00-01 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jmh/pull/159.diff Fetch: git fetch https://git.openjdk.org/jmh.git pull/159/head:pull/159 PR: https://git.openjdk.org/jmh/pull/159 From shade at openjdk.org Wed Jun 25 10:21:47 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 25 Jun 2025 10:21:47 GMT Subject: RFR: 7904047: JMH: support async-profiler 4.0 options [v2] In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 01:21:15 GMT, Andrei Pangin wrote: >> JMH has built-in capability for running benchmarks with async-profiler. `-prof async` supports commonly used async-profiler options, however, these options became a bit outdated and don't reflect features appeared in async-profiler 3.0 and 4.0. >> >> Async-profiler users [get confused](https://github.com/async-profiler/async-profiler/discussions/1345) why certain async-profiler options don't work with JMH. >> >> This PR: >> - updates async-profiler stack walking modes: `dwarf`, `vm`, `vmx`; >> - adds native memory profiling option; >> - adds OTLP output format; >> - introduces `norm` and `lib` flags for tuning async-profiler frame names; >> - fixes minor inaccuracies in option description. > > Andrei Pangin has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > 7904047: JMH: support async-profiler 4.0 options Looks generally fine. But I am thinking if these changes are compatible with async-profiler 3.0? If not, we need to do some version checks. This code already does some, look around uses of `isVersion1x`. ------------- PR Review: https://git.openjdk.org/jmh/pull/159#pullrequestreview-2957577575 From shade at openjdk.org Wed Jun 25 10:25:49 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 25 Jun 2025 10:25:49 GMT Subject: RFR: 7904047: JMH: support async-profiler 4.0 options [v2] In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 01:21:15 GMT, Andrei Pangin wrote: >> JMH has built-in capability for running benchmarks with async-profiler. `-prof async` supports commonly used async-profiler options, however, these options became a bit outdated and don't reflect features appeared in async-profiler 3.0 and 4.0. >> >> Async-profiler users [get confused](https://github.com/async-profiler/async-profiler/discussions/1345) why certain async-profiler options don't work with JMH. >> >> This PR: >> - updates async-profiler stack walking modes: `dwarf`, `vm`, `vmx`; >> - adds native memory profiling option; >> - adds OTLP output format; >> - introduces `norm` and `lib` flags for tuning async-profiler frame names; >> - fixes minor inaccuracies in option description. > > Andrei Pangin has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > 7904047: JMH: support async-profiler 4.0 options On the other hand, we also have GHA check here: https://github.com/openjdk/jmh/blob/872b7203c294d90c17766d19fc9f71cea5885380/.github/workflows/pre-integration.yml#L65-L69 -- which apparently shows this code works with 3.0. I assume 4.0 is the recommended version? If so, bump GHA check to pick up 4.0. ------------- PR Comment: https://git.openjdk.org/jmh/pull/159#issuecomment-3004243955 From galder at openjdk.org Thu Jun 26 11:13:42 2025 From: galder at openjdk.org (Galder =?UTF-8?B?WmFtYXJyZcOxbw==?=) Date: Thu, 26 Jun 2025 11:13:42 GMT Subject: RFR: 7904047: JMH: support async-profiler 4.0 options [v2] In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 01:21:15 GMT, Andrei Pangin wrote: >> JMH has built-in capability for running benchmarks with async-profiler. `-prof async` supports commonly used async-profiler options, however, these options became a bit outdated and don't reflect features appeared in async-profiler 3.0 and 4.0. >> >> Async-profiler users [get confused](https://github.com/async-profiler/async-profiler/discussions/1345) why certain async-profiler options don't work with JMH. >> >> This PR: >> - updates async-profiler stack walking modes: `dwarf`, `vm`, `vmx`; >> - adds native memory profiling option; >> - adds OTLP output format; >> - introduces `norm` and `lib` flags for tuning async-profiler frame names; >> - fixes minor inaccuracies in option description. > > Andrei Pangin has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > 7904047: JMH: support async-profiler 4.0 options I agree with @shipilev about making it work with both 3.x and 4.x. I'm unsure it'll work out of the box, but it'd be interesting to try this profiler against a [GraalVM native image JMH benchmark](https://github.com/galderz/fibula) now that dwarf stack traces are understood in 4.0. I'll create a tracker there. ------------- PR Review: https://git.openjdk.org/jmh/pull/159#pullrequestreview-2961705266 From apangin at openjdk.org Fri Jun 27 12:17:31 2025 From: apangin at openjdk.org (Andrei Pangin) Date: Fri, 27 Jun 2025 12:17:31 GMT Subject: RFR: 7904047: JMH: support async-profiler 4.0 options [v3] In-Reply-To: References: Message-ID: > JMH has built-in capability for running benchmarks with async-profiler. `-prof async` supports commonly used async-profiler options, however, these options became a bit outdated and don't reflect features appeared in async-profiler 3.0 and 4.0. > > Async-profiler users [get confused](https://github.com/async-profiler/async-profiler/discussions/1345) why certain async-profiler options don't work with JMH. > > This PR: > - updates async-profiler stack walking modes: `dwarf`, `vm`, `vmx`; > - adds native memory profiling option; > - adds OTLP output format; > - introduces `norm` and `lib` flags for tuning async-profiler frame names; > - fixes minor inaccuracies in option description. Andrei Pangin has updated the pull request incrementally with one additional commit since the last revision: Bump async-profiler version for pre-integration tests ------------- Changes: - all: https://git.openjdk.org/jmh/pull/159/files - new: https://git.openjdk.org/jmh/pull/159/files/b63fec28..f573b283 Webrevs: - full: https://webrevs.openjdk.org/?repo=jmh&pr=159&range=02 - incr: https://webrevs.openjdk.org/?repo=jmh&pr=159&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jmh/pull/159.diff Fetch: git fetch https://git.openjdk.org/jmh.git pull/159/head:pull/159 PR: https://git.openjdk.org/jmh/pull/159 From apangin at openjdk.org Fri Jun 27 14:03:02 2025 From: apangin at openjdk.org (Andrei Pangin) Date: Fri, 27 Jun 2025 14:03:02 GMT Subject: RFR: 7904047: JMH: support async-profiler 4.0 options [v2] In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 10:22:49 GMT, Aleksey Shipilev wrote: >> Andrei Pangin has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: >> >> 7904047: JMH: support async-profiler 4.0 options > > On the other hand, we also have GHA check here: https://github.com/openjdk/jmh/blob/872b7203c294d90c17766d19fc9f71cea5885380/.github/workflows/pre-integration.yml#L65-L69 -- which apparently shows this code works with 3.0. I assume 4.0 is the recommended version? If so, bump GHA check to pick up 4.0. @shipilev Thank you for the review, I updated GHA workflow to use async-profiler 4.0. Changes are compatible with all profiler versions. If user specifies an option specific to 4.0 while running and earlier profiler version, JMH will not check it by itself, but an exception will be thrown directly from libasyncProfiler, which I think is expected behavior. ------------- PR Comment: https://git.openjdk.org/jmh/pull/159#issuecomment-3013188340 From shade at openjdk.org Mon Jun 30 13:15:58 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 30 Jun 2025 13:15:58 GMT Subject: RFR: 7904047: JMH: support async-profiler 4.0 options [v3] In-Reply-To: References: Message-ID: On Fri, 27 Jun 2025 12:17:31 GMT, Andrei Pangin wrote: >> JMH has built-in capability for running benchmarks with async-profiler. `-prof async` supports commonly used async-profiler options, however, these options became a bit outdated and don't reflect features appeared in async-profiler 3.0 and 4.0. >> >> Async-profiler users [get confused](https://github.com/async-profiler/async-profiler/discussions/1345) why certain async-profiler options don't work with JMH. >> >> This PR: >> - updates async-profiler stack walking modes: `dwarf`, `vm`, `vmx`; >> - adds native memory profiling option; >> - adds OTLP output format; >> - introduces `norm` and `lib` flags for tuning async-profiler frame names; >> - fixes minor inaccuracies in option description. > > Andrei Pangin has updated the pull request incrementally with one additional commit since the last revision: > > Bump async-profiler version for pre-integration tests OK then, let's go. ------------- Marked as reviewed by shade (Committer). PR Review: https://git.openjdk.org/jmh/pull/159#pullrequestreview-2971184613 From duke at openjdk.org Mon Jun 30 13:22:58 2025 From: duke at openjdk.org (duke) Date: Mon, 30 Jun 2025 13:22:58 GMT Subject: RFR: 7904047: JMH: support async-profiler 4.0 options [v3] In-Reply-To: References: Message-ID: On Fri, 27 Jun 2025 12:17:31 GMT, Andrei Pangin wrote: >> JMH has built-in capability for running benchmarks with async-profiler. `-prof async` supports commonly used async-profiler options, however, these options became a bit outdated and don't reflect features appeared in async-profiler 3.0 and 4.0. >> >> Async-profiler users [get confused](https://github.com/async-profiler/async-profiler/discussions/1345) why certain async-profiler options don't work with JMH. >> >> This PR: >> - updates async-profiler stack walking modes: `dwarf`, `vm`, `vmx`; >> - adds native memory profiling option; >> - adds OTLP output format; >> - introduces `norm` and `lib` flags for tuning async-profiler frame names; >> - fixes minor inaccuracies in option description. > > Andrei Pangin has updated the pull request incrementally with one additional commit since the last revision: > > Bump async-profiler version for pre-integration tests @apangin Your change (at version f573b283dc3acbac74ca25a844e2238234e09b2e) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jmh/pull/159#issuecomment-3019133860 From apangin at openjdk.org Mon Jun 30 13:29:56 2025 From: apangin at openjdk.org (Andrei Pangin) Date: Mon, 30 Jun 2025 13:29:56 GMT Subject: Integrated: 7904047: JMH: support async-profiler 4.0 options In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 01:08:09 GMT, Andrei Pangin wrote: > JMH has built-in capability for running benchmarks with async-profiler. `-prof async` supports commonly used async-profiler options, however, these options became a bit outdated and don't reflect features appeared in async-profiler 3.0 and 4.0. > > Async-profiler users [get confused](https://github.com/async-profiler/async-profiler/discussions/1345) why certain async-profiler options don't work with JMH. > > This PR: > - updates async-profiler stack walking modes: `dwarf`, `vm`, `vmx`; > - adds native memory profiling option; > - adds OTLP output format; > - introduces `norm` and `lib` flags for tuning async-profiler frame names; > - fixes minor inaccuracies in option description. This pull request has now been integrated. Changeset: 2a316030 Author: Andrei Pangin Committer: Aleksey Shipilev URL: https://git.openjdk.org/jmh/commit/2a316030b509aa9874dd6ab04e21962ac92cd634 Stats: 60 lines in 2 files changed: 38 ins; 10 del; 12 mod 7904047: JMH: support async-profiler 4.0 options Reviewed-by: shade ------------- PR: https://git.openjdk.org/jmh/pull/159