RFR: 8347431: Update ObjectMonitor comments [v2]

David Holmes dholmes at openjdk.org
Tue Jan 14 06:34:44 UTC 2025


On Mon, 13 Jan 2025 12:54:58 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Isn't it more than that though? Even though we now calculate the offset in the code that uses this field, isn't it still a compile-time constant value of zero and so generates more efficient code compared to adding an offset that happens to be zero?
>
> I guess it depends on platform whether the instruction is more efficient without an offset.

Well the point is that with a known zero offset you just have a load of the base address, you don't have to do `base + offset` either explicitly, or as part of an index load.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23042#discussion_r1914311632


More information about the hotspot-runtime-dev mailing list