RFR: 8357258: x86: Improve receiver type profiling reliability [v6]
Vladimir Ivanov
vlivanov at openjdk.org
Mon Dec 1 23:29:03 UTC 2025
On Mon, 1 Dec 2025 13:04:08 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> 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
src/hotspot/cpu/x86/macroAssembler_x86.cpp line 4826:
> 4824: // and never duplicate the receivers in the list.
> 4825: //
> 4826: // It is tempting to combine these cases into a single loop, and claim the first
Can you elaborate, please, why it is the case? Is it a result of class unloading or something else?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25305#discussion_r2579069740
More information about the hotspot-dev
mailing list