On Wed, 6 May 2026 07:51:16 GMT, Aleksey Shipilev <[email protected]> wrote:

>> Andrew Haley has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains 111 commits:
>> 
>>  - Merge branch 'master' into JDK-8134940
>>  - Review comments
>>  - Review comments
>>  - Add FrameMap::last_fpu_reg()
>>  - Review comments
>>  - Review comments
>>  - Review comments
>>  - Merge branch 'JDK-8134940' of https://github.com/theRealAph/jdk into 
>> JDK-8134940
>>  - More
>>  - Merge branch 'JDK-8134940' of https://github.com/theRealAph/jdk into 
>> JDK-8134940
>>  - ... and 101 more: https://git.openjdk.org/jdk/compare/3e1d0b8e...4610777b
>
> src/hotspot/share/c1/c1_CodeStubs.hpp line 167:
> 
>> 165:   virtual void print_name(outputStream* out) const { out->print("%s", 
>> _name); }
>> 166: #endif // PRODUCT
>> 167:   virtual void visit(LIR_OpVisitState* visitor) { }
> 
> Is there a problem in having empty `ProfileStub::visit` and deferring emit to 
> lambda? AFAIU, C1 linear scan is using this visitor to figure out register 
> lifetimes. But since this is a stub, we probably do not care? Anyway, from 
> the symmetry with other `CodeStub` subclasses, I think it misses  
> `visitor->do_slow_case(_info);` or some such.

ProfileStubs are generated very late, after linear scan has run. All of the 
registers used by a ProfileStub are captured by its enclosed lambda, so the 
stub itself has no mutable state of its own to visit.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28541#discussion_r3335929514

Reply via email to