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

Lutz Schmidt lucy at openjdk.org
Fri Feb 28 10:33:52 UTC 2025


On Wed, 26 Feb 2025 04:14:37 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:

> s390x port for [JDK-8278793](https://bugs.openjdk.org/browse/JDK-8278793)

LGTM. 
One minor comment.

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.

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

Marked as reviewed by lucy (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23791#pullrequestreview-2650368145
PR Review Comment: https://git.openjdk.org/jdk/pull/23791#discussion_r1975184533


More information about the hotspot-dev mailing list