RFR: 8368938: ObjectWaiter::badObjectWaiterPtr could be static

Aleksey Shipilev shade at openjdk.org
Tue Sep 30 10:54:40 UTC 2025


On Tue, 30 Sep 2025 10:11:34 GMT, Francesco Andreuzzi <fandreuzzi at openjdk.org> wrote:

> There's apparently no reason against having the symbol shared for all instances. This saves a byte from the memory footprint of `ObjectWaiter`.
> 
> Passes tier1 and tier2 (fastdebug).

It does not even have to be a `static` field. It would be cleaner to just use it from our common stash of debugging constants here: https://github.com/openjdk/jdk/blob/ba0a6eed1a6a22bd4c1d159592b62e054afa401a/src/hotspot/share/utilities/globalDefinitions.hpp#L1014-L1032

Maybe add one that discriminates this particular case.

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

PR Review: https://git.openjdk.org/jdk/pull/27571#pullrequestreview-3283986687


More information about the hotspot-runtime-dev mailing list