Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8241583

Shenandoah: turn heap lock asserts into macros

XMLWordPrintable

    • gc
    • b16

        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.

              shade Aleksey Shipilev
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: