RFR: 8357258: x86: Improve receiver type profiling reliability [v6]

Aleksey Shipilev shade at openjdk.org
Mon Dec 1 13:04:08 UTC 2025


> See the bug for discussion what issues current machinery has. 
> 
> This PR executes the plan outlined in the bug:
>  1. Common the receiver type profiling code in interpreter and C1
>  2. Rewrite receiver type profiling code to only do atomic receiver slot installations
>  3. Trim `C1OptimizeVirtualCallProfiling` to only claim slots when receiver is installed 
> 
> This PR does _not_ do atomic counter updates themselves, as it may have much wider performance implications, including regressions. This PR should be at least performance neutral.
> 
> Additional testing:
>   - [x] Linux x86_64 server fastdebug, `compiler/`
>   - [x] Linux x86_64 server fastdebug, `all`

Aleksey Shipilev has updated the pull request incrementally with three additional commits since the last revision:

 - Simplify third case: no need to loop, just restart the search
 - Actually have a second "fast" case: receiver is not found in the table, and the table is full
 - Pushing/popping for rare CAS path is counter-productive

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/25305/files
  - new: https://git.openjdk.org/jdk/pull/25305/files/c441209a..f3e0fa4d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25305&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25305&range=04-05

  Stats: 157 lines in 1 file changed: 85 ins; 52 del; 20 mod
  Patch: https://git.openjdk.org/jdk/pull/25305.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25305/head:pull/25305

PR: https://git.openjdk.org/jdk/pull/25305


More information about the hotspot-compiler-dev mailing list