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

Shenandoah: turn heap lock asserts into macros

    XMLWordPrintable

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b16

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: