I attached to the ticket the current layout of ObjectWaiter. There are a couple of chances to reduce the footprint:
- _thread and _monitor could be part of a union, since they are exclusively non-null (-8 bytes)
- we could use a bitmap to hold all non-volatile booleans (-4 bytes)
These changes would save 12 bytes in total. Considering memory alignment, we could save 16 bytes per instance.
- _thread and _monitor could be part of a union, since they are exclusively non-null (-8 bytes)
- we could use a bitmap to hold all non-volatile booleans (-4 bytes)
These changes would save 12 bytes in total. Considering memory alignment, we could save 16 bytes per instance.
- relates to
-
JDK-8334227 pahole: Optimize Hotspot C++ class layouts
-
- Resolved
-