RFR: 8350716: [s390] intrinsify Thread.currentThread() [v2]

Amit Kumar amitkumar at openjdk.org
Fri Feb 28 10:45:12 UTC 2025


On Fri, 28 Feb 2025 10:31:03 GMT, Lutz Schmidt <lucy at openjdk.org> wrote:

>> Amit Kumar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   comment from Lutz
>
> src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp line 2010:
> 
>> 2008: 
>> 2009: address TemplateInterpreterGenerator::generate_currentThread() {
>> 2010:   address entry_point = __ pc();
> 
> I would suggest to remember the entry offset, not the entry address, just like in the generator above.
> In general, it is possible that, while generating code, the allocated space gets exhausted. In that case, a new buffer is allocated and the code generated so far is copied to the new space. All remembered addresses become invalid then. Offsets are relative to the begin of the buffer and remain valid. 
> 
> Afaik, this concern is not relevant when generating the interpreter. Here, the allocated space must be large enough from the beginning. Doing it right anyway would be nice. Thanks.

I have updated the code. Thanks for the explanation as well :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23791#discussion_r1975199040


More information about the hotspot-dev mailing list