JDK-8254782 : Fix benchmark issues in java/lang/StringIndexOfChar.java benchmark
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-10-14
  • Updated: 2021-12-29
  • Resolved: 2020-10-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b23Fixed
Related Reports
Relates :  
Description
JDK-8173585 introduced a new benchmark, but it has a few benchmark issues:

 *) Inputs should not be in "static final" to avoid constant folding
 *) Outputs ("ret" values) should be at least returned from @Benchmark method

There might be more issues, please look through the JMH Samples first, and then rewrite.
Comments
Added jdk11u-fix-no and added back jdk11u-fix-request to document rejection.
29-12-2021

Removing jdk11u-fix-request as JDK-8173585 was rejected for 11u backport.
26-10-2021

Fix Request (11u): Follow-up to JDK-8173585. Original patch applies cleanly after JDK-8254775. PR: https://github.com/openjdk/jdk11u-dev/pull/45
25-10-2021

Changeset: 72ff8e21 Author: jasontatton-aws <jptatton@amazon.com> Committer: Aleksey Shipilev <shade@openjdk.org> Date: 2020-10-29 12:06:43 +0000 URL: https://git.openjdk.java.net/jdk/commit/72ff8e21
29-10-2020

ILW = Benchmark does not work as expected, single benchmark, no workaround = MMH = P3
15-10-2020