-
Enhancement
-
Resolution: Fixed
-
P4
-
8-shenandoah, 11-shenandoah, 14, 15
-
b16
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8243604 | 14.0.2 | Aleksey Shipilev | P4 | Resolved | Fixed | b04 |
Currently, we rely on NOT_DEBUG_RETURN to be optimizeable: compilers are supposed to identify empty methods, inline and eliminate them:
void assert_heaplock_owned_by_current_thread() NOT_DEBUG_RETURN;
void assert_heaplock_not_owned_by_current_thread() NOT_DEBUG_RETURN;
void assert_heaplock_or_safepoint() NOT_DEBUG_RETURN;
...and it is called like the instance method:
_heap->assert_heaplock_owned_by_current_thread()
It feels cleaner and safer to just turn those asserts into macros.
void assert_heaplock_owned_by_current_thread() NOT_DEBUG_RETURN;
void assert_heaplock_not_owned_by_current_thread() NOT_DEBUG_RETURN;
void assert_heaplock_or_safepoint() NOT_DEBUG_RETURN;
...and it is called like the instance method:
_heap->assert_heaplock_owned_by_current_thread()
It feels cleaner and safer to just turn those asserts into macros.
- backported by
-
JDK-8243604 Shenandoah: turn heap lock asserts into macros
-
- Resolved
-