From shade at openjdk.org Wed Jun 22 10:11:17 2022 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 22 Jun 2022 10:11:17 GMT Subject: RFR: CODETOOLS-7903215: JMH: xperfasm throws incorrect error when xperf is not available In-Reply-To: References: Message-ID: <1yKKcpC0Slr9P1R0QbnkyuRsmjS_kWlU4vrUjQkWJQI=.2b0cdfb9-9fc3-4b95-858a-e01d0c663e7e@github.com> On Mon, 16 May 2022 09:49:09 GMT, XIACYBING wrote: > When Windows Performance Toolkit is not installed in Windows environment, WinPerAsmProfiler will start abnormally and throw wrong message due to wrong operation. Ah, good find. Let's not rely on `Utils.tryWith` returning the `ArrayList`, because that would shun the messages on some failure paths. Instead, let's do this: Collection errsStop = Utils.tryWith(path, "-stop"); if (!errsStop.isEmpty()) { throw new ProfilerException(MSG_UNABLE_STOP + ": " + errsStop.toString()); } ------------- Changes requested by shade (Committer). PR: https://git.openjdk.org/jmh/pull/72 From duke at openjdk.org Thu Jun 23 09:07:04 2022 From: duke at openjdk.org (XIACYBING) Date: Thu, 23 Jun 2022 09:07:04 GMT Subject: RFR: CODETOOLS-7903215: JMH: xperfasm throws incorrect error when xperf is not available [v2] In-Reply-To: References: Message-ID: > When Windows Performance Toolkit is not installed in Windows environment, WinPerAsmProfiler will start abnormally and throw wrong message due to wrong operation. XIACYBING has updated the pull request incrementally with one additional commit since the last revision: modify the way of WinPerfAsmProfiler initializing and ending exception output ------------- Changes: - all: https://git.openjdk.org/jmh/pull/72/files - new: https://git.openjdk.org/jmh/pull/72/files/9ea06aa2..f8d04bf0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jmh&pr=72&range=01 - incr: https://webrevs.openjdk.org/?repo=jmh&pr=72&range=00-01 Stats: 16 lines in 1 file changed: 0 ins; 12 del; 4 mod Patch: https://git.openjdk.org/jmh/pull/72.diff Fetch: git fetch https://git.openjdk.org/jmh pull/72/head:pull/72 PR: https://git.openjdk.org/jmh/pull/72 From duke at openjdk.org Thu Jun 23 09:07:05 2022 From: duke at openjdk.org (XIACYBING) Date: Thu, 23 Jun 2022 09:07:05 GMT Subject: RFR: CODETOOLS-7903215: JMH: xperfasm throws incorrect error when xperf is not available [v2] In-Reply-To: <1yKKcpC0Slr9P1R0QbnkyuRsmjS_kWlU4vrUjQkWJQI=.2b0cdfb9-9fc3-4b95-858a-e01d0c663e7e@github.com> References: <1yKKcpC0Slr9P1R0QbnkyuRsmjS_kWlU4vrUjQkWJQI=.2b0cdfb9-9fc3-4b95-858a-e01d0c663e7e@github.com> Message-ID: On Wed, 22 Jun 2022 10:07:45 GMT, Aleksey Shipilev wrote: > Ah, good find. Let's not rely on `Utils.tryWith` returning the `ArrayList`, because that would shun the messages on some failure paths. Instead, let's do this: > > ``` > Collection errsStop = Utils.tryWith(path, "-stop"); > if (!errsStop.isEmpty()) { > throw new ProfilerException(MSG_UNABLE_STOP + ": " + errsStop.toString()); > } > ``` This is indeed a better way, the code has been modified. ------------- PR: https://git.openjdk.org/jmh/pull/72 From shade at openjdk.org Thu Jun 23 10:17:19 2022 From: shade at openjdk.org (Aleksey Shipilev) Date: Thu, 23 Jun 2022 10:17:19 GMT Subject: RFR: CODETOOLS-7903215: JMH: xperfasm throws incorrect error when xperf is not available [v2] In-Reply-To: References: Message-ID: On Thu, 23 Jun 2022 09:07:04 GMT, XIACYBING wrote: >> When Windows Performance Toolkit is not installed in Windows environment, WinPerAsmProfiler will start abnormally and throw wrong message due to wrong operation. > > XIACYBING has updated the pull request incrementally with one additional commit since the last revision: > > modify the way of WinPerfAsmProfiler initializing and ending exception output This is good. ------------- Marked as reviewed by shade (Committer). PR: https://git.openjdk.org/jmh/pull/72 From duke at openjdk.org Fri Jun 24 06:16:06 2022 From: duke at openjdk.org (XIACYBING) Date: Fri, 24 Jun 2022 06:16:06 GMT Subject: Integrated: CODETOOLS-7903215: JMH: xperfasm throws incorrect error when xperf is not available In-Reply-To: References: Message-ID: On Mon, 16 May 2022 09:49:09 GMT, XIACYBING wrote: > When Windows Performance Toolkit is not installed in Windows environment, WinPerAsmProfiler will start abnormally and throw wrong message due to wrong operation. This pull request has now been integrated. Changeset: 1f2befef Author: wang.yubin <359474377 at qq.com> Committer: Aleksey Shipilev URL: https://git.openjdk.org/jmh/commit/1f2befef92c3eb1466124f37d00f496b4105d3c5 Stats: 8 lines in 1 file changed: 0 ins; 4 del; 4 mod 7903215: JMH: xperfasm throws incorrect error when xperf is not available Reviewed-by: shade ------------- PR: https://git.openjdk.org/jmh/pull/72