JDK-8309978 : [x64] Fix useless padding
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,21,22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: x86
  • Submitted: 2023-06-13
  • Updated: 2025-03-17
  • Resolved: 2023-06-15
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 21 JDK 22
21.0.8Fixed 22 b03Fixed
Related Reports
Blocks :  
Description
Due to typo in IntelJccErratum::compute_padding() useless padding could be generated:

030     B2: #   out( B4 B3 ) <- in( B1 )  Freq: 0.999999
        nop     # 16 bytes pad for loops and calls
040     cmpb    [R12 + R10 << 3 + #144] (compressed oop addressing), #42
049     jle,s   B4  P=0.667944 C=6785.000000

Comments
[jdk21u-fix-request] Approval Request from Satyen Subramaniam for backport. Adjusting code to remove possibility to useless padding in code generation and adding a test for this. Reasoning: Adds test for confirming proper padding, which should help limit any future regressions in performance caused by changes similar to original issue. Change is fixing typo and improves readability of 21 code. Backporting this will help keep 21 closer to tip and streamline future backports (ex: JDK-8341708 performance enhancement, likely others in the future). Risk: Low. Tip change was merged in 2023 and only effects certain platforms (details on original PR). Further, new test explicitly confirms altered functionality. Testing: * GHA Sanity Checks * Tier 1, 2, and 3 tests locally
14-03-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/1491 Date: 2025-03-14 02:11:49 +0000
14-03-2025

Note for backports: IR framework requires JDK-8280378 for the new regression test to work properly.
21-07-2023

Changeset: 0038491a Author: Vladimir Kozlov <kvn@openjdk.org> Date: 2023-06-15 15:32:45 +0000 URL: https://git.openjdk.org/jdk/commit/0038491abda51b8bd39fabed53624c10abcfe077
15-06-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14461 Date: 2023-06-14 04:42:22 +0000
14-06-2023

IR framework Phase "Final Code" output before fix: BB#002: 38 Region === 38 24 [[ 38 22 23 ]] 53 Nop === [[ ]] [5200000000053] RFLAGS 23 compB_mem_imm === 38 14 12 [[ 22 ]] #144/0x0000000000000090#42/0x0000002a 22 jmpCon_short === 38 23 [[ 25 21 ]] P=0.667907, C=5375.000000 !jvms: TestPadding::test @ bci:10 (line 57)
14-06-2023